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

S

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?
 
H

Herfried K. Wagner [MVP]

Steven said:
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>
 
G

Guest

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?
 

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