469,933 Members | 2,594 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,933 developers. It's quick & easy.

access denied using a dll that calls a com object

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.


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;Con nect Timeout=30";
Line 26:
Line 27: ActivationCodeLibrary.ActivationCode a = new
ActivationCodeLibrary.ActivationCode(connectionStr ing);
Line 28:
Line 29: a.AddRegistrationKey(txtRegKey.Text,false);
Source File:
c:\webprojects\vwright_view\web\licmanage\licmanag e\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\licmanag e\test.aspx.cs:27
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750

Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Jul 22 '05 #1
3 2223

Hello Vincent,

I'm having the exact same issues - I wonder, have you found a


Posted via http://www.codecomments.com

Jul 22 '05 #2
jdall wrote:
Hello Vincent,

I'm having the exact same issues - I wonder, have you found a

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.

Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
Jul 22 '05 #3
I used impersonation and gave that user rights to the dll.
Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Yohancef Chin | last post: by
7 posts views Thread by hufaunder | last post: by
1 post views Thread by cpajoe2001 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.