MSMQ Problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nikhil

    #1

    MSMQ Problem

    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.Reflecti on.Assembly.nLo ad(AssemblyName fileName, String codeBase,
    Boolean isStringized, Evidence assemblySecurit y, Boolean throwOnFileNotF ound,
    Assembly locationHint, StackCrawlMark& stackMark)
    at System.Reflecti on.Assembly.Int ernalLoad(Assem blyName assemblyRef,
    Boolean stringized, Evidence assemblySecurit y, StackCrawlMark& stackMark)
    at System.Reflecti on.Assembly.Loa d(AssemblyName assemblyRef, Evidence
    assemblySecurit y)
    at System.CodeDom. Compiler.Compil erResults.get_C ompiledAssembly ()
    at System.CodeDom. Compiler.Compil erResults.get_C ompiledAssembly ()
    at System.Xml.Seri alization.Compi ler.Compile()
    at System.Xml.Seri alization.TempA ssembly..ctor(X mlMapping[] xmlMappings)
    at System.Xml.Seri alization.XmlSe rializer..ctor( Type type, String
    defaultNamespac e)
    at System.Xml.Seri alization.XmlSe rializer..ctor( Type type)
    at System.Messagin g.XmlMessageFor matter.Write(Me ssage message, Object obj)
    at System.Messagin g.Message.Adjus tToSend()
    at System.Messagin g.MessageQueue. SendInternal(Ob ject obj,
    MessageQueueTra nsaction internalTransac tion, MessageQueueTra nsactionType
    transactionType )
    at System.Messagin g.MessageQueue. Send(Object obj)
    at Queue.SendReque st.Perform(Stri ng& strRequest, Int32& iRetCode, String&
    strResponse)

    --
    Nikhil Sarathi
  • CT

    #2
    Re: MSMQ Problem

    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

    "Nikhil" <Nikhil@discuss ions.microsoft. com> wrote in message
    news:15A38A87-C17C-4BB0-BF68-48824670D1D4@mi crosoft.com...[color=blue]
    >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.Reflecti on.Assembly.nLo ad(AssemblyName fileName, String
    > codeBase,
    > Boolean isStringized, Evidence assemblySecurit y, Boolean
    > throwOnFileNotF ound,
    > Assembly locationHint, StackCrawlMark& stackMark)
    > at System.Reflecti on.Assembly.Int ernalLoad(Assem blyName assemblyRef,
    > Boolean stringized, Evidence assemblySecurit y, StackCrawlMark& stackMark)
    > at System.Reflecti on.Assembly.Loa d(AssemblyName assemblyRef, Evidence
    > assemblySecurit y)
    > at System.CodeDom. Compiler.Compil erResults.get_C ompiledAssembly ()
    > at System.CodeDom. Compiler.Compil erResults.get_C ompiledAssembly ()
    > at System.Xml.Seri alization.Compi ler.Compile()
    > at System.Xml.Seri alization.TempA ssembly..ctor(X mlMapping[] xmlMappings)
    > at System.Xml.Seri alization.XmlSe rializer..ctor( Type type, String
    > defaultNamespac e)
    > at System.Xml.Seri alization.XmlSe rializer..ctor( Type type)
    > at System.Messagin g.XmlMessageFor matter.Write(Me ssage message, Object
    > obj)
    > at System.Messagin g.Message.Adjus tToSend()
    > at System.Messagin g.MessageQueue. SendInternal(Ob ject obj,
    > MessageQueueTra nsaction internalTransac tion, MessageQueueTra nsactionType
    > transactionType )
    > at System.Messagin g.MessageQueue. Send(Object obj)
    > at Queue.SendReque st.Perform(Stri ng& strRequest, Int32& iRetCode,
    > String&
    > strResponse)
    >
    > --
    > Nikhil Sarathi[/color]


    Comment

    • Nikhil

      #3
      Re: MSMQ Problem

      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" wrote:
      [color=blue]
      > 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" <Nikhil@discuss ions.microsoft. com> wrote in message
      > news:15A38A87-C17C-4BB0-BF68-48824670D1D4@mi crosoft.com...[color=green]
      > >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.Reflecti on.Assembly.nLo ad(AssemblyName fileName, String
      > > codeBase,
      > > Boolean isStringized, Evidence assemblySecurit y, Boolean
      > > throwOnFileNotF ound,
      > > Assembly locationHint, StackCrawlMark& stackMark)
      > > at System.Reflecti on.Assembly.Int ernalLoad(Assem blyName assemblyRef,
      > > Boolean stringized, Evidence assemblySecurit y, StackCrawlMark& stackMark)
      > > at System.Reflecti on.Assembly.Loa d(AssemblyName assemblyRef, Evidence
      > > assemblySecurit y)
      > > at System.CodeDom. Compiler.Compil erResults.get_C ompiledAssembly ()
      > > at System.CodeDom. Compiler.Compil erResults.get_C ompiledAssembly ()
      > > at System.Xml.Seri alization.Compi ler.Compile()
      > > at System.Xml.Seri alization.TempA ssembly..ctor(X mlMapping[] xmlMappings)
      > > at System.Xml.Seri alization.XmlSe rializer..ctor( Type type, String
      > > defaultNamespac e)
      > > at System.Xml.Seri alization.XmlSe rializer..ctor( Type type)
      > > at System.Messagin g.XmlMessageFor matter.Write(Me ssage message, Object
      > > obj)
      > > at System.Messagin g.Message.Adjus tToSend()
      > > at System.Messagin g.MessageQueue. SendInternal(Ob ject obj,
      > > MessageQueueTra nsaction internalTransac tion, MessageQueueTra nsactionType
      > > transactionType )
      > > at System.Messagin g.MessageQueue. Send(Object obj)
      > > at Queue.SendReque st.Perform(Stri ng& strRequest, Int32& iRetCode,
      > > String&
      > > strResponse)
      > >
      > > --
      > > Nikhil Sarathi[/color]
      >
      >
      >[/color]

      Comment

      Working...