0

my .net web application has a option of uploading a excel file, which has around 1k entries of products, the upload works fine when i run the application on localhost, but results in the following error when it is hosted on iis7 & accessed by some other computer on the network..

error

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

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 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

I googld it, and found some talking about 32-bit or 64-bit OS.

Thanks.

5
  • seems to be permission issue .. Commented Mar 13, 2013 at 7:27
  • @Pranav is there anything that can be done Commented Mar 13, 2013 at 7:46
  • 1
    try to give the permission to DefaultAppPool ...see this link :- iis.net/learn/manage/configuring-security/… Commented Mar 13, 2013 at 8:00
  • 1
    also some helpful link :- stackoverflow.com/questions/1491123/… Commented Mar 13, 2013 at 8:02
  • @Pranav thanks, i have to do both the things to get it working, also in my case i changed microsoft excel application properties. Commented Mar 13, 2013 at 11:41

3 Answers 3

2

You should avoid using Excel Interop in a server application for the reasons described in this KB article.

Instead, consider using a third-party product to manipulate the Excel document, such as EPPlus (Excel 2007+), Aspose Cells, SpreadsheetGear.

Probably your ASP.NET app is running under an account that doesn't have a profile.

Sign up to request clarification or add additional context in comments.

Comments

1

Ensure the upload folder is given full permission so as to upload from other computers. First start by giving permission to EVERYONE. Then you may restrict it to IIS user only.

Comments

1

Sounds to me that when your implementing your application on the server, something isn't getting installed that your using on your development machine. Whatever your using to upload, if it is a third party upload control or something, you might not be distributing that file.

Another possibility is, that the server your installing your application on is a 64 bit machine, and the upload control your using is built for 32 bit only. You might want to set the server to 32 bit for IIS 7.

http://www.depotsystems.com/ds_mobile_webhelp/webhelp/index.htm#page=Enabling_32_bit_mode.htm

1 Comment

Thanks, but i think that's not the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.