access denied using a dll that calls a com object

V

vincentw56

This is the first time I have tried this. What we have is a com object the
generates keys. A developer here wrote a .Net wrapper in C# for this com
object. I am trying to call her dll wrapper with my ASP.NET page and I get
an access denied error. I can use the test Windows Form just fine, but not
my ASP.NET form. This is all local to my machine. The error is below.
Thanks.

Vincent

Here is the error that I get:

Server Error in '/LicManage' Application.
--------------------------------------------------------------------------------

Access is denied.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access is denied.

ASP.NET is not authorized to access the requested resource. Consider
granting access rights to the resource to the ASP.NET request identity.
ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or
Network Service on IIS 6) that is used if the application is not
impersonating. If the application is impersonating via <identity
impersonate="true"/>, the identity will be the anonymous user (typically
IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET write access to a file, right-click the file in Explorer,
choose "Properties" and select the Security tab. Click "Add" to add the
appropriate user or group. Highlight the ASP.NET account, and check the boxes
for the desired access.

Source Error:


Line 25: String connectionString = "Persist Security Info=False;User
ID=sa;Pwd=mtdew;database=vantive;server=crmdev;Connect Timeout=30";
Line 26:
Line 27: ActivationCodeLibrary.ActivationCode a = new
ActivationCodeLibrary.ActivationCode(connectionString);
Line 28:
Line 29: a.AddRegistrationKey(txtRegKey.Text,false);


Source File:
c:\webprojects\vwright_view\web\licmanage\licmanage\test.aspx.cs Line: 27

Stack Trace:


[UnauthorizedAccessException: Access is denied.]
ActivationCodeLibrary.ActivationCode..ctor(String connectionString)
LicManage.test.Page_Load(Object sender, EventArgs e) in
c:\webprojects\vwright_view\web\licmanage\licmanage\test.aspx.cs:27
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
 
B

Bob Barrows [MVP]

jdall said:
Hello Vincent,

I'm having the exact same issues - I wonder, have you found a
solution?
If it's the exact same issue, then you should post to the aspnet group. This
one's for classic asp ...

You probably need to grant permissions for the dll to the aspnet user
account on the web server.
 

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,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top