asp.net + unmanaged dll security issues

G

Guest

Hi,
I'm developing an ASP.NET application. I imported a C++ dll into the C# code.
When I tried to access a function in that dll, application threw an exception
"System.Runtime.InteropServices.SEHException:External component has thrown
an exception". I debugged the unmanaged C++ code & found that the code that
generated this exception is

CDaoDatabase db;
db.open("C:\\VM.mdb") // this is the code that generated exception

I tried using try catch blocks
but the control does'nt come to catch block
How do i determine the exception?
The same dll function works fine if the dll is impoted in a Windows
application.
Is there any security issues in Web application?

Thanks in advance
Priya
 
B

bruce barker

to get better error reporting, the c++ nneds to trap errors, and supply an
error reporting function. in your case the error is probably permission, as
asp.net does not have access rights to @"c:\" by default.


-- bruce (sqlwork.com)
 
G

Guest

I tried setting the write permission to the database file(I:\data\VM.mdb) ,
the folder containing the database file , to the aspx file and the folder
containing it in ASPNET account , Everyone , IUSR_Machinename account.

I added <identity impersonate ="true"> in web.config file.
The ASP.NET state service has default logon as Local System Account.

I modified username= "machine " to username = "system" in machine.config
(C:\Winnt\Microsoft.Net\Config\machine.config)
still it does'nt work.

What is the mistake i'd done???
Thanks
Priya
 

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

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top