2Cs
asked on
Access Denied Error for process.Kill() - ASP.NET VB Server 2008 Excel
Hi - I have an application which users Microsoft.Office.Interop.E xcel to create and excel workbook. It worked on our dev server but on the production server it throws this error.
Access is denied
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ComponentModel.Win3 2Exception : Access is denied
Source Error:
Line 121: Dim AllProcesses() As Process = Process.GetProcessesByName ("Excel")
Line 122: For Each ExcelProcess As Process In AllProcesses
Line 123: ExcelProcess.Kill()
Line 124: Next
Line 125: AllProcesses = Nothing
On the dev server it opens excel using the ASPNET user but this doesn't appear to exist in Server 2008(?) so I have had to use the NETWORK SERVICE account.
Any suggestions much appreciated
Access is denied
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ComponentModel.Win3
Source Error:
Line 121: Dim AllProcesses() As Process = Process.GetProcessesByName
Line 122: For Each ExcelProcess As Process In AllProcesses
Line 123: ExcelProcess.Kill()
Line 124: Next
Line 125: AllProcesses = Nothing
On the dev server it opens excel using the ASPNET user but this doesn't appear to exist in Server 2008(?) so I have had to use the NETWORK SERVICE account.
Any suggestions much appreciated
Try running the applcation under the identity of a user that has less restrictive access.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.