I am sitting with the following issue: after a new instance of Interop.Excel.Application() is initialized, my application hangs without timeout or any other progress/exception, nadda.
A bit of background, it is a brand new installation of Office 2013
on a Windows 2012 R2
server. I have got an IIS application pool running under a unique built-in account. This specific account has got full administrative rights on the server. I have added Local Launch
and Local Activation
DCOM configuration permissions for this specific user under the Component Services > Launch and Activation Permissions
section and also created the Desktop
folder on System32\config\systemprofile
.
Below is the code I use to instantiate a new instance of Excel:
var excelApplication = new Microsoft.Office.Interop.Excel.Application();
On our dev environment, I do not have this issue and I also did not have to specifiy the DCOM configuration permissions
. The Dev environment is running on a Windows 2008 R2 Standard
server and Office was also newly installed a couple of weeks ago. Same configuration on IIS applies whereas it is a unique built-in account for the application pool identity.
Any help would be greatly appreciated!
It turned out that the IIS custom-account user did not have adequate permissions on the production server. Once the account was updated, it worked.