Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Denied in System.Security.Permissions.EnvironmentPermission

Status
Not open for further replies.

saadabc

Programmer
Aug 5, 2004
107
US
I have a .net solution (code's in Vb .net). The solution folder is on the network. I'm a

Domain Admin and local admin on the development machine. When I build the solution, the

first Application Intro screen shows up, but then the application crashes out with the

following error:




An unhandled exception of type 'System.Security.SecurityException' occurred in mscorlib.dll

Additional information: Request for the permission of type

System.Security.Permissions.EnvironmentPermission, mscorlib, Version=1.0.5000.0,

Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.


Unhandled Exception: System.Security.SecurityException: Request for the permission of type

System.Security.Permissions.EnvironmentPermission, mscorlib, Version=1.0.5000.0,

Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet grantedSet,

PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken permToken)
at System.Security.CodeAccessSecurityEngine.Check(PermissionToken permToken,

CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames, Int32

unrestrictedOverride)
at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap,

StackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
at System.Environment.get_MachineName()
at RMSecurity.RMSecurity.Main()

The state of the failed permission was:
<IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib,

Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Unrestricted="true"/>
The program '[5576] SecurityAudit.exe' has exited with code 0 (0x0).



Does anyone have any idea on why
 
By default .Net does not trust anything that is not running local. To change this you need to open the control panel -> Administrator Tools window, select the .Net Wizards, select the Trust assembly wizard, and use it to set the trust level of your app (and any .dlls you made with it) to full.

Or use the security wizard to set the local area network to full trust.

Or deploy the app locally.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top