Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using windows 7 enterprise 64 bits.
I have googled everything but still getting these error.

Server Error in '/MITDryRun' Application.
--------------------------------------------------------------------------------

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} 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 {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 <identity impersonate="true"/>, 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: 

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: Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.]
   Reporting.GenerateExcel(DataSet d) +60
   AdminModifyIssue.Button1_Click(Object sender, EventArgs e) +189
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +115
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +140
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.5466; ASP.NET Version:2.0.50727.5456 
Posted
Comments
manognya kota 7-Feb-13 1:35am    
How are you opening the excel? interop or adapters?
Member 9581909 7-Feb-13 4:12am    
I AM USING INTEROP.
AND USING IIS 7.5
bbirajdar 7-Feb-13 2:22am    
Problem with your code..
Member 9581909 7-Feb-13 4:13am    
when i am running in debug mode in VS2008,its working fine.
but after hosting on IIS 7.5, its not working.
bbirajdar 7-Feb-13 4:21am    
Yes.. You have not written any code.. Thats the problem...it i snot working.. otherwise you would have posted the code...

See how a technical question is to be posted so that it can be understood by others -

http://www.codeproject.com/Questions/537758/ErrorplusreadingplusexcelplusfileplususingplusOleD

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900