Solved

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Class Library Dynamics For Connectstring Information 2 28
Pagebreak issue while printing the aspx page 3 24
Web site error 3 41
Bartender Integration Builder 3 20
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

809 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