MSMQ Problem

G

Guest

I have an MSMQ dll created in C# when called through a C# windows form
application it works fine but when I call it using an ASP page I get an error
while trying to send a message attached the stack trace, any insight would be
highly appreciated.

at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase,
Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound,
Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence
assemblySecurity)
at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, String
defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type)
at System.Messaging.XmlMessageFormatter.Write(Message message, Object obj)
at System.Messaging.Message.AdjustToSend()
at System.Messaging.MessageQueue.SendInternal(Object obj,
MessageQueueTransaction internalTransaction, MessageQueueTransactionType
transactionType)
at System.Messaging.MessageQueue.Send(Object obj)
at Queue.SendRequest.Perform(String& strRequest, Int32& iRetCode, String&
strResponse)
 
C

CT

Well, the only thing I do read from your post is that it's to do with
security. Is the user account used for your ASP.NET worker process (ASPNET
on Windows XP) allowed to load your MSMQ assembly? What's the offending
code, do you perform any other actions on your MSMQ assembly from your
ASP..NET application that actually works?
 
G

Guest

The only thing that both ASP & the .NET application do is to instantiate an
object of the dll & call a method. The offending line of code is the
queue.Send & I pass a message object to it. I saw a couple of posts on the
internet which said I should give everyone access to my Windows\Temp
directory, Im not sure why that would be required.

CT said:
Well, the only thing I do read from your post is that it's to do with
security. Is the user account used for your ASP.NET worker process (ASPNET
on Windows XP) allowed to load your MSMQ assembly? What's the offending
code, do you perform any other actions on your MSMQ assembly from your
ASP..NET application that actually works?
--
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
Nikhil said:
I have an MSMQ dll created in C# when called through a C# windows form
application it works fine but when I call it using an ASP page I get an
error
while trying to send a message attached the stack trace, any insight would
be
highly appreciated.

at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase,
Boolean isStringized, Evidence assemblySecurity, Boolean
throwOnFileNotFound,
Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence
assemblySecurity)
at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, String
defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type)
at System.Messaging.XmlMessageFormatter.Write(Message message, Object
obj)
at System.Messaging.Message.AdjustToSend()
at System.Messaging.MessageQueue.SendInternal(Object obj,
MessageQueueTransaction internalTransaction, MessageQueueTransactionType
transactionType)
at System.Messaging.MessageQueue.Send(Object obj)
at Queue.SendRequest.Perform(String& strRequest, Int32& iRetCode,
String&
strResponse)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top