C
cssnow
I'm doing a PInvoke call to a c++ dll in a web service. I'm able to do
the PInvoke call 1 time successfully. The next time I call it and
every time after that I get an exception "null reference".
The reason I think that aspnet_wp.exe is the root of this problem is
because I can get my PInvoke call to work again by resetting IIS which
shuts aspnet_wp down. When I do the iisreset I get this message:
"aspnet_wp.exe - Application Error. The instruction at ### referenced
memory at ###. The memory could not be read. Click OK to terminate."
What I think is happening is that the thread which makes the first
PInvoke call loads the dll successfully, and makes the call, but for
some reason it can't unload the dll. That explains the exception I see
when I try to PInvoke it again. Then when I reset IIS aspnet_wp shuts
down. Aspnet_wp then tries to close all of it's running threads which
includes the one that is hanging while trying to unload my dll, and
that's when I get this error message.
What do you think of my theory, and why would aspnet_wp choke on my
dll??
the PInvoke call 1 time successfully. The next time I call it and
every time after that I get an exception "null reference".
The reason I think that aspnet_wp.exe is the root of this problem is
because I can get my PInvoke call to work again by resetting IIS which
shuts aspnet_wp down. When I do the iisreset I get this message:
"aspnet_wp.exe - Application Error. The instruction at ### referenced
memory at ###. The memory could not be read. Click OK to terminate."
What I think is happening is that the thread which makes the first
PInvoke call loads the dll successfully, and makes the call, but for
some reason it can't unload the dll. That explains the exception I see
when I try to PInvoke it again. Then when I reset IIS aspnet_wp shuts
down. Aspnet_wp then tries to close all of it's running threads which
includes the one that is hanging while trying to unload my dll, and
that's when I get this error message.
What do you think of my theory, and why would aspnet_wp choke on my
dll??