Permissions for launching an assembly from network share

W

Wanderer

Hi All,

how knows what must be configured on local machine or (and
better) within .net application in order to allow to start
it from network share without SecurityException?

Application works fine on local drive, but system throws
the following exception when I try to launch it from
network.

Unhandled Exception: System.Security.SecurityException:
Request for the permission of type
System.Security.Permissions.S
ecurityPermission, mscorlib, Version=1.0.3300.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
at
System.Security.CodeAccessSecurityEngine.CheckTokenBasedSet
Helper(Boolean ignoreGrants, TokenBasedSet grants, Toke
nBasedSet denied, TokenBasedSet demands)
at
System.Security.CodeAccessSecurityEngine.CheckSetHelper
(PermissionSet grants, PermissionSet denied, PermissionSet
demands)
at System.Environment.Exit(Int32 exitCode)
at ConsoleAppSecurity.Class1.Main(String[] args) in
d:\work\khids\tests\consoleappsecurity\class1.cs:line 19

The state of the failed permission was:
<IPermission
class="System.Security.Permissions.SecurityPermission,
mscorlib, Version=1.0.3300.0, Culture=neutral, Publi
cKeyToken=b77a5c561934e089"
version="1"
Flags="UnmanagedCode"/>

br
Wanderer
 
A

Alan Pretre

Wanderer said:
how knows what must be configured on local machine or (and
better) within .net application in order to allow to start
it from network share without SecurityException?

Application works fine on local drive

1) Control Panel --> Administrative Tools
2) Select "Microsoft .Net Framework 1.1 Configuration"
3) Select in the left panel the "Runtime Security Policy" item
4) In the right panel, select the "Adjust Zone Security"
5) In the Security Adjustment Wizard, select the "Local Intranet" group
6) With the slider control, slide the Trust Level up to "Full Trust"

-- Alan
 
W

Wanderer

-----Original Message-----
1) Control Panel --> Administrative Tools
2) Select "Microsoft .Net Framework 1.1 Configuration"
3) Select in the left panel the "Runtime Security Policy" item
4) In the right panel, select the "Adjust Zone Security"
5) In the Security Adjustment Wizard, select the "Local Intranet" group
6) With the slider control, slide the Trust Level up
to "Full Trust"

It works so. Thank you.

Is it possible to adjust security only for a particular
application?
 
A

Alan Pretre

Wanderer said:
Is it possible to adjust security only for a particular application?

I'm not aware of a way. I looked all over in .NET Framework configuration
and didn't see anything there. Maybe there's something that can be tweaked
in machine.config, but I don't know.

-- Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top