BizTalk Gurus

MSMQ "GetTempFileName Failed" error while receiving a message from a queue

rated by 0 users
This post has 9 Replies | 0 Followers

Top 25 Contributor
Posts 69
Zx7R Posted: Wed, Feb 20 2008 4:38 AM

Hi..

 A strange failure occurres while i try to receive a message from a certain queue. I have a receive location defined with the same security properties, all the same as in other projects for this very application. I have nothing initiated in HAT, neither in BTS Administration console. In an EventViewer I've got a warning in which is written the next thing: MSMQ Adapter "GetTempFileName" failed. After googling a bit I've found that GetTempFileName belongs to Path.GetTempFileName();  - so the question is : what is connection between this method and Biztalk and MSMQ ?

The message I receive is an XML, which contains as a part of it a PDF file converted to a Base64String string...

 

I would be very appreciate to get help.

Yonathan Masovich

 

Top 25 Contributor
Posts 69
Zx7R replied on Thu, Feb 21 2008 6:33 AM

In an addition I must say that it's seems that I've found where the problem is: if I delete a queue and create a new one with the same name it works for couple of time and the same error returns back. And.. every like 15-25 messages I can receive the message as I supposed. I did try change type of a queue from transactional to non-transactional (It's a remote queue btw.), I played with definitions of Trans and Nontrans/actional on receiveloacation, nothing helps.

Yonathan Masovich

 

Top 25 Contributor
Posts 69
Zx7R replied on Wed, May 14 2008 6:29 AM

 Well, solved the issue!

The problem: BizTalk server had failes from time to time while getting messages from remote MSMQ server.

we have found that if the message is bigger then 100Kb +/- - it is copied to "Temp" file on local server, after that it is taken by adapter and proceeded.

the solution: to give a permission to "Temp" file to user under which the adapter is working (whith the username the adapter reads messages from remote queue.)

Good luck

 

Yonathan Masovich

 

Not Ranked
Posts 2

Hi,

I'm getting same problem. bigger messages dont pass through MSMQ adapter.

MSMQ and Biztalk aplication ar installed on separate servers.

Could you point which servers "Temp" folder message is being copied to ?

 

Not Ranked
Posts 2

I have set Full control permisions to user account adapter is running. on C:\Windows\Temp folder, but it doesnt fix the issue.

Top 25 Contributor
Posts 69
Zx7R replied on Sat, Oct 31 2009 12:39 PM

Hi, Im in doubght that your question is still relevant, but still - Ill answer: The MSMQ adapter - when it takes messages from a remote queue - it copies bigger than definite size to temp machine. I.e. - if you have a queue on a server A, and your adapter is installed on BTS server on server B, the file is copied to temp on server B. I dont remember, but I think it was on windows/system/temp   file - give permissions for user under which the adapter runs. (read/right)

Yonathan Masovich

 

replied on Tue, Jan 5 2010 1:04 PM

I'm having the same problem. 

I gave the user that is connecting to the remote queue access to the local c:\Windows\Temp directory but that didn't seem to fix anything.

My error message: The adapter "MSMQ" raised an error message. Details "GetTempFileName Failed.".

My message size is about 500kbs.

Any ideas?

 

Top 25 Contributor
Posts 69
Zx7R replied on Tue, Jan 12 2010 9:05 AM

It must be an issue of creating incoming message to temp folder on local machine.

Run FileMon.exe from microsoft - try to recognize what errors cause you to get an error of GetTempFileName().

While the message comes from remote queue - first it's copied to temp folder and only afterwards adapter picks it from that folder for processing in BTS.

Yonathan Masovich

 

Top 25 Contributor
Posts 69
Zx7R replied on Tue, Jan 12 2010 9:06 AM

I presume it may differ from system to system. Run FileMon.exe to find where that error occurres.

Yonathan Masovich

 

replied on Tue, Jan 26 2010 6:51 PM

Ok, Fixed it.

 

Zx7R was on the right path.  Here's the steps I used:

 

1.) Download procMon.exe from Microsoft.  Run procMon, filter on the BTSNTSvc.exe

2.) Turn on your queue, make sure you're receving the "GETTempFileName Failed" error message.

3.) Check procMon for Operation CreateFile, you can also filter on this.  You should see where BizTalk is trying to write to a temp folder and is getting an ACCESS DENIED error.  For me, this location was: C:\Users\BizTalk_User\AppData\Local\Temp

4.) Go to that folder, and give the MSMQ user access. Done, fixed!

 

-Clay

Page 1 of 1 (10 items) | RSS