Error accessing Office Web Components from production server in ASP.NET

Hey All,

I am writing an "ExportToExcel" function which takes a simple datatable and exports it to excel.  I am using this to ensure the number formatting comes out correctly since CSV automatically imports text as numbers.
I added a refeerence to OWC11 in my development machine, built the code and ran it and it works.  But when I copied to my production server I am getting errors: "Retrieving the COM class factory for component with CLSID {0002E569-0000-0000-C000-000000000046} failed due to the following error: 80040111. "

I have installed Visual studio and office on the production server, along with the Office Web Components DLL, but am still getting the error.  I have looked for the COM object in DCOMCNFG, but it was not present.  I set permissions to Full Control for Everyone out of desperation, but that also failed.

The system throws the error as soon as I try to instantiate OWC11.SpreadsheetClass() as a new object.  Everything I have read says permissions, but I am unable to find anything that works.

Thanks,
Geoff
LVL 10
GeoffSuttonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

masterpassCommented:
Hope this will help you

http://blog.crowe.co.nz/archive/2006/03/02/589.aspx

Have a special look at the NOTE in the article towards the end
0
GeoffSuttonAuthor Commented:
Hey Masterpass.  
I have already been through this article.  It's where I got the idea that it was a permissions issue, and was looking at DCOMCNFG.  With no results, unfortunately.  I am now trying some of the additinoal tips in the comments to see if I can force a resolution.  Any other ideas?

Thanks,
Geoff
0
masterpassCommented:
I had this error once, which took me into this blog ....

this is what solved my error :

Remember if you are running on Windows 2003 Server you must use the application pool identity as the account and not the ASPNET account.

you have to give permissions for the NETWORK SERVICE and NETWORK

I think you will have it solved then !!!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GeoffSuttonAuthor Commented:
The problem is it's not the same error.  Also the OWC11 is not showing up in the DCOMCNFG application, which makes thing more difficult.  I will set different NTFS permissions on it, but that's he best I can do.
Geoff
0
GeoffSuttonAuthor Commented:
Turns out you were right :)  Assigning full control to "EVERYONE" didn't succeed, but assigning it to Network and to IIS_IUSR<machinename> worked perfectly.  I guess I just didn't read far enough into the article.
Thanks so much.
Geoff
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming Languages-Other

From novice to tech pro — start learning today.