How to Use COM Dll in ASP.Net?
-
Hi I have one COM Dll which needs to be used in my ASP Page. But it is giving Error like this: Retrieving the COM class factory for component with CLSID {60527433-1464-42EF-A657-3ACE4390AF84} failed due to the following error: 80070005. 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: Retrieving the COM class factory for component with CLSID {60527433-1464-42EF-A657-3ACE4390AF84} failed due to the following error: 80070005. 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 , the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user. To grant ASP.NET 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 20: protected void Page_Load(object sender, EventArgs e) Line 21: { Line 22: **objLICGen = new EsdLICGenLib.EsdLicenseGeneratorClass();**Line 23: Line 24: string strCon = ConfigurationSettings.AppSettings["strConnection"]; Source File: c:\Inetpub\wwwroot\ProductRegistration\frmProductRegistration.aspx.cs Line: 22 Can you Help me how to solve this Problem?? Thanks ..swamy
-
Hi I have one COM Dll which needs to be used in my ASP Page. But it is giving Error like this: Retrieving the COM class factory for component with CLSID {60527433-1464-42EF-A657-3ACE4390AF84} failed due to the following error: 80070005. 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: Retrieving the COM class factory for component with CLSID {60527433-1464-42EF-A657-3ACE4390AF84} failed due to the following error: 80070005. 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 , the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user. To grant ASP.NET 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 20: protected void Page_Load(object sender, EventArgs e) Line 21: { Line 22: **objLICGen = new EsdLICGenLib.EsdLicenseGeneratorClass();**Line 23: Line 24: string strCon = ConfigurationSettings.AppSettings["strConnection"]; Source File: c:\Inetpub\wwwroot\ProductRegistration\frmProductRegistration.aspx.cs Line: 22 Can you Help me how to solve this Problem?? Thanks ..swamy
You're using a COM dll on the back end ? So, it's not something the client will see, right ? What's the COM dll and why do you need it ? ASP.NET cannot access your file system above the root of the web app. Your COM dll needs to be in your bin directory ( and regstered, of course ).
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
You're using a COM dll on the back end ? So, it's not something the client will see, right ? What's the COM dll and why do you need it ? ASP.NET cannot access your file system above the root of the web app. Your COM dll needs to be in your bin directory ( and regstered, of course ).
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
I added my COM Dll Reference to my ASP Page and now it's in my bin directory ofcourse, but the actual problem araise when iam trying to create the object for my dll class. Thanks & Regards