Solved

Access Denied Error for process.Kill() - ASP.NET VB Server 2008 Excel

Posted on 2010-09-17
3
2,447 Views
Last Modified: 2013-11-25
Hi - I have an application which users Microsoft.Office.Interop.Excel 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.Win32Exception: 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
0
Comment
Question by:2Cs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Expert Comment

by:greigtech
ID: 33700402
Try running the applcation under the identity of a user that has less restrictive access.
0
 
LVL 29

Expert Comment

by:Kumaraswamy R
ID: 33709921
0
 
LVL 5

Accepted Solution

by:
2Cs earned 0 total points
ID: 33745239
We have resolved this internally.
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question