473,480 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

dllimport makes the 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.

Anybody faced this earlier?

Nov 18 '05 #1
2 1812
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
18511
by: Michael Tissington | last post by:
I have a C# function that calls into a C++ DLL I have placed the DLL in the 'bin' folder of my asp.net project I'm using something like However when I try to call the function I'm getting...
15
4431
by: Jim | last post by:
I am extremely frustrated. I am building c# application for a call center and am using a third party API to access some hardware. When develop and test my class using the windows console the...
1
3681
by: Daniel Frede | last post by:
Hello, I Created a AxSHDocVw.AxWebBrowser in a class and want to Post Values to a WebPage. When I use this class in a Windows application, everything is fine, but in an ASPX page it hangs...
2
10461
by: Brian Anderson | last post by:
Hello, is it possible to use DllImport to call a DLL in ASP.NET ? Or is it necessarry that my DLL has to be copied into \System32 ? My DLL is a native C++ 7.1 DLL (not managed, no COM, no...
8
2913
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using vs2005, .net 2, C# for Windows application. I use DllImport so I can call up a function written in C++ as unmanaged code and compiled as a dll us vs2005. My application is able to...
1
8049
by: Thomas Due | last post by:
Hi, I manage an rather old application in which we have some fairly complex (ugly) Delphi code. This is Delphi 6 we're talking about. Among all this Delphi code there is method for formating a...
1
2072
by: Seth Gecko | last post by:
Hi I am developing a complex VB.Net Windows application for an engineering firm (don't ask me why they prefer VB.Net...). All the engineering calculations are done in FORTRAN which is compiled...
0
1689
by: Nelson R. | last post by:
Greetings, I've already posted this message on aspnet.security group (think its related to security issues), but since didn't get any response, I post it here. -- I have a problem, and been...
4
2213
by: tk121 | last post by:
Hello - I have some code I'm invoking with DllImport and the functions work flawlessly while executing through the debugger, but not in the stand-alone executable. When running the exe, the...
0
7051
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7097
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5353
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4794
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4493
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3003
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2993
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
567
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.