Unmanaged DLL blocked by aspnet_wp.exe

G

grygoos

Hello,

I've got another kind of DllNotFoundException problem happening to my
Web Application. My application uses a C# dll (lets call it
managed.dll) which has a static wrapper method for a function in a
Win32 dll (lets call it unmanaged.dll) which generates some product
key. So the chain is as follows:

MyWebApp --- calls --> managed.GenerateKey(...) -- calls --> unmanaged
GenerateTheKey(...)

Both dll's are in my WebApplication/bin directory. The wrapper uses
standard PInvoke (dllimport). Normally all webrequests are processed
without any problems, but sometimes after just few requests I get the
System.DllNotFoundException. In fact, the unmanaged dll file IS at its
place but its blocked by the aspnet_wp process and it cannot be
accessed by any other process. I have then manually to kill the
aspnet_wp process to get my appplication run properly again.

I'll be very gratefull for any help

Kind regards,

gryg00s
 
G

grygoos

Hi Scott

thanks for you reply

I already figured out how to avoid this problem:

after each rebuild of my project in VS i need explicitly to kill the
aspnet_wp.exe process otherwsie somehow it blocks the unmanaged dll.
After this is done everything works normal. However i dont know yet why
it gets blocked as the unmanaged.dll isnt rebuilt at all.

gryg00s
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top