Webservices and dlls  
Author Message
Fredrik aslin

PostPosted: ASMX Web Services and XML Serialization, Webservices and dlls Top

I have developed a web service and deployed it successfully, on local and remote web servers. A few days ago I added functions that loads a dll (which act as an entry point for a software I'm running). The dll in question connects by sockets to another server and sends some data, and then unload itself.

The web service works fine if I use the web server that comes with Visual Studio 2005 but I get an exception thrown on any other web server.

"'System.CannotUnloadAppDomainException' occurred in System.Web.dll
Additional information: Error while unloading appdomain. (Exception from HRESULT: 0x80131015)"

I'm figure there is some permissions that needs to be given to the web service / asp.net user, but I can't seem to find where I set permission. Already have the weakest security on the virtual directory where my service are deployed.

Tried to set userName="System" password="Autogenerate" at the <processMachine> element in machine.config and set <identity impersonate="true"/> in the web.config. Didn't work though.

Have anyone else have the same problem with web services and external dlls

.NET Development18  
Alex DeJarnatt - MSFT

PostPosted: ASMX Web Services and XML Serialization, Webservices and dlls Top

Simple tests of web services calling out to dlls work fine.

I suspect there is a problem with this particular dll. I'm not sure why you suspect a permissions issue, but maybe that's it. Have you tried the following

a) check the eventlog

b) debug the asp.net worker process and look for exceptions

c) contact the owner of the dll

hope this helps!