473,786 Members | 2,368 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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.Reg istryPermission " 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?
Jan 16 '06 #1
2 2166
"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.Reg istryPermission "
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.newtellig ence.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/>

Jan 16 '06 #2
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]" <hi************ ***@gmx.at>
???????:%2***** ***********@TK2 MSFTNGP11.phx.g bl...
"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.Reg istryPermission " 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.newtellig ence.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/>

Jan 16 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2365
by: Namratha Shah \(Nasha\) | last post by:
Hey Guys, Before we start with our sample app we need to view the security configuration files on the machine. You will find them under <drive>\WInNT\Microsoft.NET\FrameWork\<version>\Config Enterprise Level Security configuration file is :- enterprise.config Machine Level Security configuration file is :- security.config
0
1135
by: Michael Hauer | last post by:
Hi, First my system(s): We want to migrate one server from NT 4.0 to Linux (small company). Clients are NT + XP. The application is .NET 1.0 and all clients run 1.0 SP3. A network drive contains a .NET application. At the beginning I had to change intranet security to allow all, and than it ran without any problems. But after changing the path from the drive from the Windows to the Linux
6
3670
by: Eran Kampf | last post by:
I am trying to dynamically create directories in my ASP.NET application (I am using Server.MapPath("/")+"test" as the folder) and I am getting a DirectoryNotFoundException saying "Could not find a part of the path "D:\". My site is hosted on a public ISP that for obvious security reasons does not allow my read access above my wwwroot folder which seems to be a problem when trying to create directories... Is there any way to solve this?
3
1168
by: CsharpGuy | last post by:
I have an asp.net (C#) web form that needs to run an exe off of a network drive and when i load the page i'm getting the following error message: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application’s trust level in the configuration file. Now, I'm running IIS 5 and I've tried on this...
10
1683
by: Richard MSL | last post by:
I am having problems working with .net security. I have been attempting to use the Microsoft .Net Framework 2.0 Configuration tool (version 2.0.50727.42), but it won't work for me. I have a simple test application that works, when I run to Manage Applications - View Assembly Dependencies, I get an error that says: Unfortunately, the .NET Framework Configuration tool cannot show this list of assembly dependencies for this application due...
6
5699
by: alex | last post by:
Hi, this always works: private ConsoleToTextbox myConsole; Console.SetOut(myConsole); But now (a few weeks later i started this project again) i get a non handeld security exception from system.security.permissions.securitypermission when i try to run the program.
2
2212
by: Kathy | last post by:
One of my customers is running an Access 2003 application. They have the Macro Security Level set to Low. When the .mde app is executed directly from the C: drive on their server, they get into the application just fine. When they execute the app from a mapped network drive (a link to the app on the C: drive), they get get the Security Warning and have to click on Open to get into the application. I have seen this same app run at...
7
5613
by: GMiller | last post by:
I am fairly new to .NET programming so this may be a simplistic question. I wrote a C# application that reads and writes files. If the program resides on a local drive everything is fine. If the program resides on a network drive then I get the following error. System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral,...
3
1343
by: =?Utf-8?B?SmFtZXMgV29uZw==?= | last post by:
Hi everybody, I'm facing a problem to run an appliation in a shared network drive. The application is developed in VB2005. I understand I have to add a signature with strong name key to all assambies. I found that I have to modify security policy to trust strong names. I want to clarify the followings: 1. Does it mean I have to modify the security policy for each client machine which runs my application in network drive?
1
10104
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9959
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4063
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.