ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » amqmdnet.dll

Post new topic  Reply to topic
 amqmdnet.dll « View previous topic :: View next topic » 
Author Message
madiba
PostPosted: Tue Jan 10, 2006 8:58 pm    Post subject: amqmdnet.dll Reply with quote

Novice

Joined: 14 Oct 2005
Posts: 23

I have used this dll to successfully put/get messages into MQ queues in my .NET windows app. However, when I use the same code in my ASP.NET app to put/get messages my app. fails. Is the dll intended for use with both Windows and ASP.NET applications?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Jan 11, 2006 4:21 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

"Fails" is not specific enough.

What's the reason code?

Is it 2035?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
madiba
PostPosted: Wed Jan 11, 2006 5:10 am    Post subject: Reply with quote

Novice

Joined: 14 Oct 2005
Posts: 23

It just returns a "Error in application" message. No codes. So I assume that the dll is for use with both Windows .Net and ASP.Net application?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Jan 11, 2006 5:12 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I would be very surprised to learn that the .NET API is not useable from ASP.NET.

Check the IIS logs. Add more debugging to your program.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
dpchiesa
PostPosted: Tue Jan 17, 2006 11:33 am    Post subject: Fails in ASP.NET Reply with quote

Apprentice

Joined: 29 May 2002
Posts: 46

This happens often. People say, "when I build a command line or windows Forms app, no problem. If I try to use the library within ASP.NET, it fails. What gives?"

Not just with MQ. With any library.

The most common reason is permissions. ASP.NET is just a .NET library. An ASP.NET app is a .NET app. The big difference is, ASP.NET does not run as "you". It runs as a restricted user which probably does not have permission to do the thing you are trying to do. you said,

Quote:

It just returns a "Error in application" message. No codes.


Guessing: maybe ASPNET cannot load the amqmdnet.dll from the filesystem? verify that the dll is in the GAC. (ASPNET can load from the GAC)

after you take care of the basics, like loading the library, you will need to grant ASPNET perms to do put or get from your queues.

you could add ASPNET to the domain/mqm group, or otherwise grant ASPNET perms on the MQ objects.

Thinking back, I have not written an ASP.NET app that connects to MQ via this library, but I feel pretty sure it should just work, given the proper security config.
_________________
-dpchiesa
Back to top
View user's profile Send private message
dpchiesa
PostPosted: Wed Jan 18, 2006 1:46 pm    Post subject: Following up Reply with quote

Apprentice

Joined: 29 May 2002
Posts: 46

Judging from a quick search, others on this forum have successfully used the MQ Classes for .NET, from witihn an ASP.NET app.

I just tried and it works for me, too, though I had to make some adjustments.

#1, I had to add the amqmdnet.dll assembly into web.config:

Code:

  <system.web>
    <compilation batch="false" debug="true">
      <assemblies>
        <!-- for MQ Classes for .NET -->
        <add assembly="amqmdnet, Version=1.0.0.3, Culture=neutral, PublicKeyToken=dd3cb1c9aae9ec97" />
      </assemblies>
    </compilation>
...


#2, add the <mqdir>\bin to the system path, so that it is picked up by the ASP.NET worker process.

#3, I had to grant the ASP.NET user permissions on MQSeries and on the mq\bin directory. This didn't quite work for me, I don't know why. I added ASP.NET to the mqm group, which I think has rights on MQ. But that didn't work. Kept getting 2035 errors when trying to instantiate the MQQueueManager. It might be a registry-reading thing. In the end I punted and ran the ASP.NET app impersonating myself. This worked.
_________________
-dpchiesa
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Jan 18, 2006 1:57 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You would have had to run the "REFRESH SECURITY" command after adding ASP.NET to the mqm group.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » amqmdnet.dll
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.