Geoff Sutton
asked on
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-0 0000000004 6} 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
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-0
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
ASKER
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
Geoff
ASKER
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
Thanks so much.
Geoff
http://blog.crowe.co.nz/archive/2006/03/02/589.aspx
Have a special look at the NOTE in the article towards the end