473,416 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Access denied when executing Process.Start() on my Server 2003

Hello,

I'm currently developping a web application and I'm trying to execute a
batch file (.cmd) on the server side when the client presses a button on a
web page.
When I do this on my local machine (where I'm developping my application),
no problem occurs. But when I put the web application on my Windows server
2003 server, I always get the following error message. Can someone help me ?

Here is the config of my webconfig file :
<authentication mode="Windows" />

<identity impersonate="true"/>

And Here is the section process model of my machine.config file:

<processModel enable="true" timeout="Infinite" idleTimeout="Infinite"
shutdownTimeout="0:00:05" requestLimit="Infinite" requestQueueLimit="5000"
restartQueueLimit="10" memoryLimit="60" webGarden="false"
cpuMask="0xffffffff" userName="SYSTEM" password="AutoGenerate"
logLevel="Errors" clientConnectedCheck="0:00:05"
comAuthenticationLevel="Connect" comImpersonationLevel="Impersonate"
responseDeadlockInterval="00:03:00" maxWorkerThreads="20"
maxIoThreads="20"/>
Server Error in '/NetGuard' Application.
--------------------------------------------------------------------------------

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 63: myProcess.StartInfo.FileName =
"C:\\Inetpub\\wwwroot\\NetGuard\\CMD\\NetSH.cm d";
Line 64: myProcess.StartInfo.WorkingDirectory =
"C:\\Inetpub\\wwwroot\\NetGuard\\CMD";
Line 65: myProcess.Start();
Line 66:
Line 67: /*StreamReader sOut = myProcess.StandardOutput;
Source File: c:\inetpub\wwwroot\netguard\netguard_agent.cs Line: 65

Stack Trace:
[Win32Exception (0x80004005): Access is denied]
System.Diagnostics.Process.StartWithCreateProcess( ProcessStartInfo
startInfo) +1106
System.Diagnostics.Process.Start() +85
NetGuard.Sys.NetGuard_Agent.ProcessCommand(NetGuar d_Data _NetGuard_Data,
String _RoomName, String _RuleName) in
c:\inetpub\wwwroot\netguard\netguard_agent.cs:65
NetGuard.Generation.ScriptButton_Click(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\NetGuard\Generation.aspx.cs:62
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277


Thanks in advance for all responses !

Cédric
Nov 18 '05 #1
2 18024
Try going into the .Net framework configuration permission set to "Full
Access" on the Runtime Security Policy --> Machine --> Code Groups -->
All_Code --> Internet Zone. By default, the "security" permission set that
is applied to the internet zone does not allow calls to unmanaged code.

You can acess this by going to Administrative tools and .Net framework
configuration V1.1

Also ensure that the impersonated user or group has access to the respective
files and directories.

--
- Paul Glavich
Microsoft MVP - ASP.NET
"Cédric Rossé" <ce**********@eiaj.ch> wrote in message
news:Or*************@TK2MSFTNGP11.phx.gbl...
Hello,

I'm currently developping a web application and I'm trying to execute a
batch file (.cmd) on the server side when the client presses a button on a
web page.
When I do this on my local machine (where I'm developping my application),
no problem occurs. But when I put the web application on my Windows server 2003 server, I always get the following error message. Can someone help me ?
Here is the config of my webconfig file :
<authentication mode="Windows" />

<identity impersonate="true"/>

And Here is the section process model of my machine.config file:

<processModel enable="true" timeout="Infinite" idleTimeout="Infinite"
shutdownTimeout="0:00:05" requestLimit="Infinite" requestQueueLimit="5000"
restartQueueLimit="10" memoryLimit="60" webGarden="false"
cpuMask="0xffffffff" userName="SYSTEM" password="AutoGenerate"
logLevel="Errors" clientConnectedCheck="0:00:05"
comAuthenticationLevel="Connect" comImpersonationLevel="Impersonate"
responseDeadlockInterval="00:03:00" maxWorkerThreads="20"
maxIoThreads="20"/>
Server Error in '/NetGuard' Application.
-------------------------------------------------------------------------- ------
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 63: myProcess.StartInfo.FileName =
"C:\\Inetpub\\wwwroot\\NetGuard\\CMD\\NetSH.cm d";
Line 64: myProcess.StartInfo.WorkingDirectory =
"C:\\Inetpub\\wwwroot\\NetGuard\\CMD";
Line 65: myProcess.Start();
Line 66:
Line 67: /*StreamReader sOut = myProcess.StandardOutput;
Source File: c:\inetpub\wwwroot\netguard\netguard_agent.cs Line: 65

Stack Trace:
[Win32Exception (0x80004005): Access is denied]
System.Diagnostics.Process.StartWithCreateProcess( ProcessStartInfo
startInfo) +1106
System.Diagnostics.Process.Start() +85
NetGuard.Sys.NetGuard_Agent.ProcessCommand(NetGuar d_Data _NetGuard_Data, String _RoomName, String _RuleName) in
c:\inetpub\wwwroot\netguard\netguard_agent.cs:65
NetGuard.Generation.ScriptButton_Click(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\NetGuard\Generation.aspx.cs:62
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePo
stBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277


Thanks in advance for all responses !

Cédric

Nov 18 '05 #2
Humm...

Just try going through the following link i am sure your problem will get
resolved after this:
"http://support.microsoft.com/default.aspx?scid=kb;en-us;842789"

Best of luck!
-Hitesh Jain

"Cédric Rossé" wrote:
Hello,

I'm currently developping a web application and I'm trying to execute a
batch file (.cmd) on the server side when the client presses a button on a
web page.
When I do this on my local machine (where I'm developping my application),
no problem occurs. But when I put the web application on my Windows server
2003 server, I always get the following error message. Can someone help me ?

Here is the config of my webconfig file :
<authentication mode="Windows" />

<identity impersonate="true"/>

And Here is the section process model of my machine.config file:

<processModel enable="true" timeout="Infinite" idleTimeout="Infinite"
shutdownTimeout="0:00:05" requestLimit="Infinite" requestQueueLimit="5000"
restartQueueLimit="10" memoryLimit="60" webGarden="false"
cpuMask="0xffffffff" userName="SYSTEM" password="AutoGenerate"
logLevel="Errors" clientConnectedCheck="0:00:05"
comAuthenticationLevel="Connect" comImpersonationLevel="Impersonate"
responseDeadlockInterval="00:03:00" maxWorkerThreads="20"
maxIoThreads="20"/>
Server Error in '/NetGuard' Application.
--------------------------------------------------------------------------------

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 63: myProcess.StartInfo.FileName =
"C:\\Inetpub\\wwwroot\\NetGuard\\CMD\\NetSH.cm d";
Line 64: myProcess.StartInfo.WorkingDirectory =
"C:\\Inetpub\\wwwroot\\NetGuard\\CMD";
Line 65: myProcess.Start();
Line 66:
Line 67: /*StreamReader sOut = myProcess.StandardOutput;
Source File: c:\inetpub\wwwroot\netguard\netguard_agent.cs Line: 65

Stack Trace:
[Win32Exception (0x80004005): Access is denied]
System.Diagnostics.Process.StartWithCreateProcess( ProcessStartInfo
startInfo) +1106
System.Diagnostics.Process.Start() +85
NetGuard.Sys.NetGuard_Agent.ProcessCommand(NetGuar d_Data _NetGuard_Data,
String _RoomName, String _RuleName) in
c:\inetpub\wwwroot\netguard\netguard_agent.cs:65
NetGuard.Generation.ScriptButton_Click(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\NetGuard\Generation.aspx.cs:62
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277


Thanks in advance for all responses !

Cédric

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: access denied response | last post by:
problem accessing a asp.net COM component. in web service, getting error message "Acess denied " from when the code tries to access it. works find when run locally thought when run on a server thats...
1
by: Lyn Duong | last post by:
Hi, I have tried creating a linked server in microsoft sql 2000 to a db2 for vm database. I use a db2 v8 admin client, configure it via client configuration setup and then in Microsoft SQL...
2
by: Rob | last post by:
Apologies if this is a frequently asked question but i haven't been able to find a satsifactory answer anywhere else at the moment. My problem is that i'm trying to convert an Access97 database...
1
by: lou | last post by:
This is the error that Visual Studio 2003 gives me when trying to open some of my Web Projects: "The Web server reported the following error when attempting to create or open the Web project...
0
by: Anton Sokolovsky | last post by:
Hello All, Please help. I am completely stuck. Any suggestions are very welcomed. I have ASP.NET application that impersonates certain user <impersonate="true" userName="registry:..."...
14
by: jolinlim | last post by:
Warning: mysql_connect(): Access denied for user: 'ODBC@localhost' (Using password: NO) in c:\appserv\www\sql.php on line 12 Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link...
0
by: Jeremy | last post by:
If I create a folder in outlook and give it a homepage url to an ajax asp.net page I've developed, I get ajax errors on my page when viewed in outlook. If I click on a button in an update panel...
4
by: =?Utf-8?B?RUdPTg==?= | last post by:
nHi! We have a C# .NET application (exe) that is started by a service (like a watchdog) and the application is thereby runing as Local System account. On cetain computers (only a very few of...
1
by: premMS143 | last post by:
Hi, I want to create a new MS Access file as Front end & SQL Server 2003 as back end. This server is located in somewhere in a network. User can retrieve data from Server in Access, view it, print...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.