dllimport makes the aspnet application hangs

G

Guest

As our application design requires us to use one of the validation API engine
which was written on C(so basically all I have is a dll) and I tested calling
the functions using small windows application using DllImport for each
functions and it works without any problem. But when I try to use the same
Dll in my asp.net web application, it hangs with the first call. I tried
giving the dll path as a hardcoded path like C:\validation.dll in my
dllimport funciton call but did not help.

I am wondering it has something to do with ASPNET account security. So I
gave full control for ASPNET account for my application directory and still
my application hangs.

Anybody faced this earlier?
 
B

Bryant Hankins

You might try running FileMon from http://www.sysinternals.com and
use it to monitor all file access activities on your machine. It should give
you an idea of what's going on with your DLL. My guess is that you are on
the right track. If you can run it from a windows app and not a web app then
it is most likely a permission or file path issue.
 
G

Guest

Thanks Bryant for your reply. Actually I solved the problem. The reason is
not security which I come to know after series of trying(like giving the
aspnet account more privs). The reason is the first init call requires a
filename parameter and I just gave only the filename and as it is an aspnet
application, it tries to find that file system32 directory where it could not
locate and it was waiting there. Once I hardcoded the value to local bin
directory, it started working
 

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,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top