Solved

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

Posted on 2010-09-17
3
2,356 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
3 Comments
 
LVL 2

Expert Comment

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

Expert Comment

by:Kumaraswamy R
Comment Utility
0
 
LVL 5

Accepted Solution

by:
2Cs earned 0 total points
Comment Utility
We have resolved this internally.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This article will show, step by step, how to integrate R code into a R Sweave document
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now