473,473 Members | 1,959 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

.NET 2.0, Security Permissions and caspol.exe

The overall problem:
-I've got .Net 2.0 code running from a network share
(\\server01\share\vb.netcode.exe we'll assume).
-Windows won't run code from a share unless it's trusted.
-I need to configure the security on the workstation to trust the
server.

Ok, that being said. I can configure the workstation using the
Microsoft .NET Framework 2.0 Configuration Utility *IF* the SDK is
installed on said workstation. This works, and is a solution to my
problem.

The downside is that if I have a machine that does not have the SDK
with said Configuration Utility installed, I don't have an easy way to
remedy this. To overcome this, I've created a batch file that will
work using caspol.exe that is provided with the .NET Framework. The
line of code to run caspol in the script is:

call %windir%\Microsoft.NET\Framework\v2.0.50727\caspol -q -m -ag 1.2
-url %1\* FullTrust -n %1 -d "FullTrust granted to: %1"

where %1 is the server share (eg \\server01\share)
Now, this script works perfectly *IF* the SDK is installed (sigh,
re-run?). I run it on a machine that doesn't have the .NET SDK
installed the .NET code still will not run. I'm kind of at a loss
because I thought that's exactly what the caspol utility was for, to
adjust the permissions? The script runs and caspol says that it was
successful, but the code just doesn't have the security to run (I test
for security permissions before running code).

The code itself is a very simple utility that I don't want to create a
deployment package for since that will be overkill. I'm hoping that
this caspol will provide a fix but I can't seem to get it to work. Any
help would be appreciated, thanks!
-Jesse Albert

Jul 14 '06 #1
0 1471

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

Similar topics

6
by: Olaf Baeyens | last post by:
Can someone out there point me to a URL or other reference how to use these security stuff in .NET? I know everything can be found online on the msdn but since I am new to this security stuff, I...
1
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 ...
7
by: Tim Bücker | last post by:
Hello. I have written a little program that uses some unmanaged code - . I´ve send this program to a friend of mine and now he gets a security error. Two questions about that: 1) How can...
0
by: Namratha Shah \(Nasha\) | last post by:
Hey Guys, Today we are going to look at Code Access Security. Code access security is a feature of .NET that manages code depending on its trust level. If the CLS trusts the code enough to...
16
by: Marina | last post by:
Hi, I am trying to find the minimum security settings to allow a windows control embedded in IE have full trust. If I give the entire Intranet zone full trust, this works. However, this is...
19
by: Diego F. | last post by:
I think I'll never come across that error. It happens when running code from a DLL that tries to write to disk. I added permissions in the project folder, the wwwroot and in IIS to NETWORK_SERVICE...
2
by: leeedw | last post by:
Hi All, I have a windows app that runs perfectly on my machine, but when I try to run it over the network it bombs. I get a permissions error. Here is the code, I even tried adding...
2
by: John Kotuby | last post by:
Hello all, Note: This is the full version of a Post that I inadvertently sent before it was complete. About a year ago I wrote a VB.NET 2003 solution that consists of a number of assemblies...
5
by: Henry Stock | last post by:
I am trying to understand the following error: Any thing you can tell me about this is appreciated. Security Exception Description: The application attempted to perform an operation not allowed...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
0
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.