H
HTM
Hi All,
I have a third party COM object done in C++. I want to use this COM object in my asp.net project. I'm able to add reference and initialize the object but when I'm getting a run-time error below:
Server Error in '/aspnet/fsc' Application.
--------------------------------------------------------------------------------
ERROR: Unable to Create an Instance of the Server
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: ERROR: Unable to Create an Instance of the Server
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:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[UnauthorizedAccessException: ERROR: Unable to Create an Instance of the Server]
STEALTHRATERAPILib.AutoClass.GetMaritalStatus(Int32 nAgentID) +0
fsc.auto_profile.Page_Load(Object sender, EventArgs e) in f:\aspnet\fsc\auto_profile.aspx.cs:25
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
The ASP.Net account has been granted the access to the DLL but I'm still getting this error. Is there something else I'm missing when referencing the DLL? Should there be an Interop DLL to be added to the project in order for this to work?
Thanks very much
Henry
I have a third party COM object done in C++. I want to use this COM object in my asp.net project. I'm able to add reference and initialize the object but when I'm getting a run-time error below:
Server Error in '/aspnet/fsc' Application.
--------------------------------------------------------------------------------
ERROR: Unable to Create an Instance of the Server
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: ERROR: Unable to Create an Instance of the Server
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:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[UnauthorizedAccessException: ERROR: Unable to Create an Instance of the Server]
STEALTHRATERAPILib.AutoClass.GetMaritalStatus(Int32 nAgentID) +0
fsc.auto_profile.Page_Load(Object sender, EventArgs e) in f:\aspnet\fsc\auto_profile.aspx.cs:25
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
The ASP.Net account has been granted the access to the DLL but I'm still getting this error. Is there something else I'm missing when referencing the DLL? Should there be an Interop DLL to be added to the project in order for this to work?
Thanks very much
Henry