To give a file share FullTrust permission:
Start mscorcfg.msc. (outil de config interactif)
Expand the Runtime Security Policy node, then expand the Machine node, then expand the Code Groups node, then expand the All_Code node, and then highlight the LocalIntranet_Zone node.
In the right pane select Add a new child code group to this code group.
Choose Create a new Codegroup, give it a reasonable name for the share then click Next.
I used Shateiel Storage Tutor
corresponds to my server name, the share, and the folder
Choose a Condition Type of URL
URL can mean http, ftp, or file share
then add the .NET Framework SDK to the share location of your project. Click Next.
I used //SHATEIEL/STORAGE/Tutor/*
This was changed to file://SHATEIEL/STORAGE/Tutor/*
This corresponded to the Server name, followed by the share, followed by the folder and lastly a wildcard * was used to allow all assemblies under this location
If you have to get more specific you can do so
Choose Use Existing Permission Set of FullTrust. Click Next.
For added security you could create your own customized permission set
To keep my intranet on an even keel with my computer I chose FullTrust
Click Finish.
Some documents claim that you need to restart Visual Studio
Sometimes you do
Sometimes it just works straight away.
You may now run your project on a intranet UNC
Caspol.exe
Using caspol.exe to accomplish this change, you would use the following command line, you must have administrator rights on the machine to make this change.
caspol -m -ag 1.2 -url urlname FullTrust
Partager