By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,361 Members | 1,683 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,361 IT Pros & Developers. It's quick & easy.

dllimport makes the aspnet application hangs

P: n/a
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?

Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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.

--
Hope this helps,
Bryant Hankins
Numinet Systems Inc.
http://www.numinet.com

"sonyram" <so*****@discussions.microsoft.com> wrote in message
news:65**********************************@microsof t.com...
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?

Nov 18 '05 #2

P: n/a
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

"Bryant Hankins" wrote:
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.

--
Hope this helps,
Bryant Hankins
Numinet Systems Inc.
http://www.numinet.com

"sonyram" <so*****@discussions.microsoft.com> wrote in message
news:65**********************************@microsof t.com...
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?


Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.