can you add reference of your office interop dll as external refernce. Just copy the dll to one folder and add reference from there to in your project insted of GAC
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 {00024500-0000-0000-C000-000000000046} 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 File 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 1070: else Line 1071: { Line 1072: ExcelApp = new Excel.Application(); Line 1073: ExcelApp.Visible = false; Line 1074: ExcelWork = (Excel._Workbook)(ExcelApp.Workbooks.Add(Missing.Value));
Iftikar HussainPosted Jul 30, 2013, 6:02 AM
Regards,
Iftikar
Manj NPosted Jul 30, 2013, 5:59 AM
Iftikar HussainPosted Jul 30, 2013, 5:37 AM
Regards,
Iftikar
Manj NPosted Jul 30, 2013, 5:35 AM
Sunny SharmaPosted Jul 30, 2013, 3:51 AM
try this:
Go to properties of your bin folder.
Go to: Security > Edit > Add.
Add NETWORK_SERVICE and allow all permissions.
restart your web server.
Hope it helps.
Manj NPosted Jul 30, 2013, 3:08 AM
Exception Details: System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} 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
To grant ASP.NET access to a file, right-click the file in File 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 1070: else Line 1071: { Line 1072: ExcelApp = new Excel.Application(); Line 1073: ExcelApp.Visible = false; Line 1074: ExcelWork = (Excel._Workbook)(ExcelApp.Workbooks.Add(Missing.Value));Iftikar HussainPosted Jul 30, 2013, 2:12 AM
Regards,
Iftikar
Manj NPosted Jul 30, 2013, 2:10 AM
but when i use IIS 8 it gives error...
Iftikar HussainPosted Jul 30, 2013, 1:58 AM
Regards,
Iftikar
Manj NPosted Jul 30, 2013, 1:50 AM
Iftikar HussainPosted Jul 30, 2013, 1:44 AM
Regards,
Iftikar
Sanjeeb LenkaPosted Jul 30, 2013, 1:40 AM
http://blog.crowe.co.nz/archive/2006/03/02/589.aspx
Manj NPosted Jul 30, 2013, 1:34 AM
Iftikar HussainPosted Jul 30, 2013, 1:25 AM
Regards,
Iftikar
Manj NPosted Jul 30, 2013, 1:22 AM
Posted Jul 30, 2013, 12:59 AM
http://forums.asp.net/t/1303594.aspx/1
Iftikar HussainPosted Jul 30, 2013, 12:58 AM
Please refer the below link
http://www.codeproject.com/Questions/274286/microsoft-office-interop-error
http://forums.asp.net/t/1303594.aspx/1
Regards,
Iftikar