System.Security.Permissions.EnvironmentPermission
- From: Zarborg <Zarborg@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 19 Jun 2008 13:52:01 -0700
I have a little program that I wrote in vb.net v2 to process some stuff when
a user logs into the domain.
I have created a manifest for the project so that it would work for XP and
Vista and used mt.exe as a post build process to embed that into my .exe file:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<ms_asmv2:trustInfo xmlns:ms_asmv2="urn:schemas-microsoft-com:asm.v2">
<ms_asmv2:security>
<ms_asmv2:requestedPrivileges>
<ms_asmv2:requestedExecutionLevel level="asInvoker">
</ms_asmv2:requestedExecutionLevel>
</ms_asmv2:requestedPrivileges>
</ms_asmv2:security>
</ms_asmv2:trustInfo>
</assembly>
I also ran:
caspol -pp off -machine -addgroup All_Code -url
file://<ourdomainname>/SYSVOL/* FullTrust -name LoginStuff -description
"Login Programs"
When I try to run the app from the network I get this error:
************** Exception Text **************
System.Security.SecurityException: Request for the permission of type
'System.Security.Permissions.EnvironmentPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand,
StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Environment.get_UserDomainName()
at login.frmLogin.frmLogin_Load(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.EnvironmentPermission
The Zone of the assembly that failed was:
Intranet
I even tried going into IE and setting the local Intranet zone to contain
file://<ourdomainname>/SYSVOL/*
I'm missing something but I'm not getting what I'm missing. Anyone got an
idea for me?
.
- Follow-Ups:
- RE: System.Security.Permissions.EnvironmentPermission
- From: Zarborg
- RE: System.Security.Permissions.EnvironmentPermission
- Prev by Date: Re: Major bug in VS 2008 source code control
- Next by Date: Re: Compatibility between VS2005 and VS2008
- Previous by thread: How do I have VS 2005 Team Edition connect to our VS 2008 TFS server source code control?
- Next by thread: RE: System.Security.Permissions.EnvironmentPermission
- Index(es):
Relevant Pages
|
Loading