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;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
Version:1.1.4322.2032