Using C++ COM from c# web application

H

Hari

Hi,

I write simple COM object (from c++) using 'ATL Simple Object'
template, than I make reference to
compiled dll from c# application and everithing works ok. Next step is
to move this dll to web application,
but i got next mesage (at bottom of post).

I change dll permisions to full control for asp.net app, but same
error is reported.

Any ideas?

Thanks,
Pasalic Zaharije

------------------------------------------ SERVER RETURN THIS
MESSAGE ----------------------------

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 26: XMLCoder.CXMLCompressClass cmp = new
XMLCoder.CXMLCompressClass();

Source File: c:\www\xmlcodertest\webform1.aspx.cs Line: 26

Stack Trace:


[UnauthorizedAccessException: Access is denied.]
XMLCoderTest.WebForm1.Page_Load(Object sender, EventArgs e) in c:
\www\xmlcodertest\webform1.aspx.cs:26
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
 
H

Hari

Hari je napisao:
Hi,

I write simple COM object (from c++) using 'ATL Simple Object'
template, than I make reference to
compiled dll from c# application and everithing works ok. Next step is
to move this dll to web application,
but i got next mesage (at bottom of post).

I change dll permisions to full control for asp.net app, but same
error is reported.

Any ideas?

Thanks,
Pasalic Zaharije

------------------------------------------ SERVER RETURN THIS
MESSAGE ----------------------------

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 26: XMLCoder.CXMLCompressClass cmp = new
XMLCoder.CXMLCompressClass();

Source File: c:\www\xmlcodertest\webform1.aspx.cs Line: 26

Stack Trace:


[UnauthorizedAccessException: Access is denied.]
XMLCoderTest.WebForm1.Page_Load(Object sender, EventArgs e) in c:
\www\xmlcodertest\webform1.aspx.cs:26
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()

I find solution : forget to make regsvr32 :(
 

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

Top