Last post May 22, 2008 06:51 PM by willgreg
May 22, 2008 06:51 PM|willgreg|LINK
Posting on behalf of Paul_IRET
I have a website running that uploads excel files.
In order to make sure the excel files are in the correct format, I call a web service, which uses the Microsoft.Interop.Excel assembly dll.
This process was set up on a production server for Excel 2003 and it worked fine.
However, we needed to upgrade its capability for Excel 2007.
I therefore set the web service up on my laptop, installed the Office 2007 PI Assemblies, and got it working fine locally.
I tried to set the same exact thing up on a test server before pushing it to production, but cannot get it to work.
What happens is the web service is running under a local user account on the server, which is a local admin on the server.
The web service tries to open Excel, and inspect the document.
On my local machine, if I run task manager, Excel opens when I run the code, has activity for a couple seconds, closes, and the file uploads perfectly.
When I go do it on the server, Excel opens, has a little activity, but then just stays open in task manager and the website times out. On my local machine, Excel opens as the ASPNET user, and on the server, it opens as the local user mentioned earlier.
Here's the kicker.
When I log in to the server as the web service user, it works fine when I go to the website on my local machine. I watch task manager on the server, Excel opens, has activity, closes, and the file uploads.
When I'm logged in to the server as another user, or not logged into the server at all, Excel hangs and doesn't ever close.
It DOES work with Excel 2003 files though when not logged in!
If it helps, the part of the code where I can debug to is the Application.Workbooks.Open function, and then when it calls this function, that's when it hangs.
I'm confused, I've tried so many things and cannot figure out what it is.
Please help, it would be very greatly appreciated! Thanks a lot!