Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

Can't use Environment.CommandLine

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dom - 27 Mar 2008 22:01 GMT
I have a program that uses Environment.CommandLine.  Works fine.  Then
I move the exe to a networked drive so others can use it.  Now I get
the message:

System.Security.SecurityException: Request for the permission of type
'System.Security.Permissions.EnvironmentPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed.

When I take the CommandLine out, it works.

What is going on?  How do I get around it?

Dom
Simon Hart [MVP] - 27 Mar 2008 22:33 GMT
You need to escalate your code access security (localintranet code group) to
include code permission Directory Services. Lookup code access security on
MSDN.

You can easily change security configuration by selecting the ".NET
Configuration <ver>" in Administrative Tools under Control Panel.
Signature

Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com

> I have a program that uses Environment.CommandLine.  Works fine.  Then
> I move the exe to a networked drive so others can use it.  Now I get
[quoted text clipped - 10 lines]
>
> Dom

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.