473,657 Members | 3,021 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SecurityExcepti o nduring start of a new Process form Application under Windows Server 2003


Hi, I've got a simple problem when I try to start a new process from my
application.
I'm starting a new process like this:

Process proc = new Process();
proc.StartInfo. Arguments = "";
proc.StartInfo. FileName = @"C:\Submit.bat ";
proc.StartInfo. CreateNoWindow = false;
proc.Start();
proc.WaitForExi t();

label1.Text = "ExitCode = " + proc.ExitCode.T oString();

....everything works fine, but only under Windows XP....when I start the same
application under Windows Server 2003, I'm getting this exception:

System.Security .SecurityExcept ion: Request failed.

at
System.Security .CodeAccessSecu rityEngine.Thro wSecurityExcept ion(Assembly
asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHa ndle rmh,
SecurityAction action, Object demand, IPermission permThatFailed)
at System.Security .CodeAccessSecu rityEngine.Thro wSecurityExcept ion(Object
assemblyOrStrin g, PermissionSet granted, PermissionSet refused,
RuntimeMethodHa ndle rmh, SecurityAction action, Object demand, IPermission
permThatFailed)
at System.Security .CodeAccessSecu rityEngine.Chec kSetHelper(Perm issionSet
grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHa ndle
rmh, Object assemblyOrStrin g, SecurityAction action, Boolean throwException)
at
System.Security .CodeAccessSecu rityEngine.Chec kSetHelper(Comp ressedStack cs,
PermissionSet grants, PermissionSet refused, PermissionSet demands,
RuntimeMethodHa ndle rmh, Assembly asm, SecurityAction action)
at WindowsApplicat ion1.Form1.butt on1_Click(Objec t sender, EventArgs e)
at System.Windows. Forms.Control.O nClick(EventArg s e)
at System.Windows. Forms.Button.On Click(EventArgs e)
at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs mevent)
at System.Windows. Forms.Control.W mMouseUp(Messag e& m, MouseButtons
button, Int32 clicks)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.ButtonBas e.WndProc(Messa ge& m)
at System.Windows. Forms.Button.Wn dProc(Message& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
The action that failed was:
LinkDemand
The type of the first permission that failed was:
System.Security .PermissionSet
The Zone of the assembly that failed was:
Internet

....how can I set the Security for starting of a new process ?
Sep 6 '06 #1
0 1393

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

Similar topics

2
717
by: DanP | last post by:
I have intranet web app that I'm trying to execute a exe using Process.Start. I get "Logon failure: unknown user name or bad password ". The exe is a simple vb6 app that prints a Crystal report. My web app is on webserver and the exe is on appserver, does any know how to get past this error. Thanks in advance.. -- Daniel J. Plocica
2
3194
by: Tobias Johansson | last post by:
Hello, I'm having what I believe a security problem to execute an executable file from a windows service in windows server 2003. It works fine in WIN XP SP2 The program(the service) itself just continues as if nothing where wrong after process.Start is executed and I get an Exit code from the process
3
2827
by: Trevor Andrew | last post by:
Hi There, I have a small ASP.NET application under development. I am using VS.NET 2002 (2003 upgrade is on the way) with .NET Framework 1.1. It is hosted on a web hosting service in the US. I am experiencing the "Viewstate corrupted" error message on a particular page, when that page is left for a period of time and I return to it again, and submit it again. The page in question has a drop-down list of various RSS news feeds I am...
16
4198
by: Serdar Kalaycý | last post by:
Hi everybody, My problem seems a bit clichè but I could not work around. Well I read lots of MSDN papers and discussions, but my problem is a bit different from them. When I tried to run the project in debug mode (by hitting F5) it gives an error message "Error while trying to run project: Unable to start debugging on the web server.
2
18051
by: Cédric Rossé | last post by:
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 :
6
14191
by: kk | last post by:
hello to all, I want to call an exe file on other system(on the same LAN)though a webservice(by placing the dll).For that i use the following code in C#...... Process ps = new Process(); ps.StartInfo.FileName = exeFilePath ps.StartInfo.Arguments = arguments; ps.Start();
0
1798
by: Daniel | last post by:
System.Diagnostics.Process.Start fails on windows server 2003 the process returns process.ExitCode == 0 but executing any process with System.Diagnostics.Process.Start on windows xp works fine. anything to do different for windows server 2003? some special permission for the process that executes another executable with System.Diagnostics.Process.Start ?? here is the code:
2
6946
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of attending interviews. If you own a company best way to judge if the candidate is worth of it. http://www.questpond.com/InterviewRatingSheet.zip
0
8302
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8718
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7314
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5630
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1937
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.