Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

Dllimport call - aspnet application hangs

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.

Any suggestions?

Ram
Wednesday, August 04, 2004

Actually, I solved the problem. It has nothing to do with security which I came to know after series of debugging. It so happened that the first init function in the dll expects an filename parameter. For ASPNET application it expects that file also to be in system32 directory and as it was not found, the dll function still waits there and aspnet seems to be hanging. Once I try hardcoded the file name with pathname, it started working.

Ram
Monday, August 09, 2004

*  Recent Topics

*  Fog Creek Home