I am building web application on a client server that generates an Excel Workbook and Worksheets upon request. Initially, I ran into the problem shown below:
The server process could not be started because the configured identity is incorrect
//Start Excel and get Application object.
Excel.Application oXL= new Excel.Application();
To fix this issue, I changed the identity to Admin under Component Services for Microsoft Excel Application. Now the error that I encounter is this:
//Get a new workbook.
oWB = (Excel._Workbook)(oXL.Workbooks.Add(Missing.Value));
[COMException (0x80010105): The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))]
Microsoft.Office.Interop.Excel.Workbooks.Add(Object Template) +0
Reports_ProductionMatrix.CreateProductionMatrix(Object sender, EventArgs e) in C:\xxx\Reports\ProductionMatrix.aspx.cs:92
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9815014
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +204
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +12
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1639
Do I need to change the Identity of another service? If so, which one?
User contributions licensed under CC BY-SA 3.0