Home All Groups Group Topic Archive Search About

Question on VB.Net security for the application to run on network drive

Author
16 Jan 2006 12:08 PM
Steven
I have developed an application using VB.NET, it works fine in my local
drive. However, security exception is flowed when I try to run the release
program under a network drive. I have signed the exe and dll files with
sn.exe and configure the security policy in the dot net framework
configuration. Finally, I can run the program successfully on the network
drive.

My question is how can I create the security in the dot net framework
configuration automatically? Coz I want to create an installation program to
auto install the software when it is delivered to the client side. I have
tried caspol.exe but I found that it only works for the "Visual Studio .NET
2003 Command Prompt", an error message "Runtime error: Request for the
permission of type System.security.permission.RegistryPermission" is
displayed when I run it on the command dos prompt. So how can I ensure the
program work fine on the computer in client side if they put it to run on a
network drive?

Author
16 Jan 2006 12:30 PM
Herfried K. Wagner [MVP]
"Steven" <a@a.com> schrieb:
> My question is how can I create the security in the dot net framework
> configuration automatically? Coz I want to create an installation program
> to auto install the software when it is delivered to the client side. I
> have tried caspol.exe but I found that it only works for the "Visual
> Studio .NET 2003 Command Prompt", an error message "Runtime error: Request
> for the permission of type System.security.permission.RegistryPermission"
> is displayed when I run it on the command dos prompt. So how can I ensure
> the program work fine on the computer in client side if they put it to run
> on a network drive?

You can alter security settings by using the "CASPOL.EXE" command-line
tool which is part of the .NET Framework.  In large heterogenous corporate
networks it may be possible to deploy a security policy via an MSI
package alternatively:

How do I deploy my security policy?
<URL:http://staff.newtelligence.net/michaelw/PermaLink.aspx?guid=b424f73a-f762-42e2-9046-edaa08a75b8c>

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
16 Jan 2006 1:40 PM
Steven
Sorry, I still not sure how to apply the code to deploy the security policy
in the MSI setup package.
How can I add the code shown in the URL to my installer?


"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at>
???????:%23H1fHipGGHA.1***@TK2MSFTNGP11.phx.gbl...
Show quoteHide quote
> "Steven" <a@a.com> schrieb:
>> My question is how can I create the security in the dot net framework
>> configuration automatically? Coz I want to create an installation program
>> to auto install the software when it is delivered to the client side. I
>> have tried caspol.exe but I found that it only works for the "Visual
>> Studio .NET 2003 Command Prompt", an error message "Runtime error:
>> Request for the permission of type
>> System.security.permission.RegistryPermission" is displayed when I run it
>> on the command dos prompt. So how can I ensure the program work fine on
>> the computer in client side if they put it to run on a network drive?
>
> You can alter security settings by using the "CASPOL.EXE" command-line
> tool which is part of the .NET Framework.  In large heterogenous corporate
> networks it may be possible to deploy a security policy via an MSI
> package alternatively:
>
> How do I deploy my security policy?
> <URL:http://staff.newtelligence.net/michaelw/PermaLink.aspx?guid=b424f73a-f762-42e2-9046-edaa08a75b8c>
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://classicvb.org/petition/>