473,385 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Security Issue

Hi,

I set up my wifes machine to run .NET, some of my stuff runs but not all.

First example:

I have a windows program that displays environment info. It runs fine on my
machine. Whan I run it on my wifes' machine over the network it fails on
the statement:

values.Add ("WorkingSet: " + System.Environment.WorkingSet.ToString());

It gave the error message (most of it is shown):

The application attempted to perform an operation not allowed by the
security policy. The operation required the SecurityException. To grant
this application the required permission ... or use the Microsoft .net
security policy administratiopn tool

Request for the permission of type
System.Security.Permissions.EnvironmentPermissions , mscorlib
Version n1.0.5000.0 Culture=neutral
Public key token ... failed

How do I get round this?

Thanx,
Bill

Nov 16 '05 #1
1 2361
.NET introduces a new layer of security called Code Access Security (CAS). CAS isn't concerned with *who* is running the code but rather what are the origins of the code (physically or author). By default, if you run code from your local hard disk then the code runs with fulltrust. This means that CAS will not limit what the code can do (although you are still of course constrained by the operating system security infrastructure). When you load code from off-machine locations then it runs with a lower level of trust. Code considered to be from the Intranet gets more permissions than code from the Internet, but is still very limited in what it is allowed to do *by default*.

What is happening is that you are running the code acorss the network so the code is probably considered to be on the intranet. Obtaining the working set is not allowed by default from the intranet. There are a number of ways to fix this of increasing complexity but apart from 1) they increasingly cut down teh security implications of changing policy as they become more focussed:

1) copy the .exe to your wifes machine and run it from the hard disk

2) go into the .NET Configuration tool (look in admin tools in control panel) and in the security settings set the intranet zone permissions to fulltrust

3) go into the .NET Configuration tool (look in admin tools in control panel) and in the security settings set up a Code Group mapping the URL of the location the code is running from to FullTrust

4) ) go into the .NET Configuration tool, create a new permission set that grants the environment permission (and any others that turn up as security exceptions and map the URL of the code to this new permission set via a code group

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

Hi,

I set up my wifes machine to run .NET, some of my stuff runs but not all.

First example:

I have a windows program that displays environment info. It runs fine on my
machine. Whan I run it on my wifes' machine over the network it fails on
the statement:

values.Add ("WorkingSet: " + System.Environment.WorkingSet.ToString());

It gave the error message (most of it is shown):

The application attempted to perform an operation not allowed by the
security policy. The operation required the SecurityException. To grant
this application the required permission ... or use the Microsoft .net
security policy administratiopn tool

Request for the permission of type
System.Security.Permissions.EnvironmentPermissions , mscorlib
Version n1.0.5000.0 Culture=neutral
Public key token ... failed

How do I get round this?

Thanx,
Bill

Nov 16 '05 #2

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

Similar topics

28
by: grahamd | last post by:
Who are the appropriate people to report security problems to in respect of a module included with the Python distribution? I don't feel it appropriate to be reporting it on general mailing lists.
11
by: TC | last post by:
Hello All, I have recently had the pleasure of installing Norton Internet Security 2005 and finding that I can no longer create or open a web-based application in Visual Studio .Net. The IDE...
5
by: Ken Cox [Microsoft MVP] | last post by:
MS has posted this here: http://www.asp.net/faq/ms03-32-issue.aspx Fix for: 'Server Application Unavailable' Error after Applying Security Update for IE...
1
by: Earl Teigrob | last post by:
Background: When I create a ASP.NET control (User or custom), it often requires security to be set for certain functionality with the control. For example, a news release user control that is...
5
by: cdlipfert | last post by:
Our intranet is running under windows integrated security. We have domain users that want to access our intranet site via ssl vpn. SSL VPN can not authenticate against services that run under...
0
by: Charles Leonard | last post by:
I am having yet another issue with Windows Server 2003. This time, the web service (a file import web service) appears to run except for one odd message: "ActiveX component can't create object". ...
0
by: Jay C. | last post by:
Jay 3 Jan. 11:38 Optionen anzeigen Newsgroups: microsoft.public.dotnet.framework.webservices.enhancements Von: "Jay" <p.brunm...@nusurf.at> - Nachrichten dieses Autors suchen Datum: 3 Jan...
10
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...
1
by: WebServiceSecurity | last post by:
The issue involves the following technologies: - 1. .NET 2.0 Framework 2. WSE2.0 (WS-Security) 3. X.509 certificates 4. BEA Weblogic 8.1.5
0
by: Anthony Baxter | last post by:
SECURITY ADVISORY Buffer overrun in repr() for UCS-4 encoded unicode strings http://www.python.org/news/security/PSF-2006-001/ Advisory ID: PSF-2006-001 Issue Date: October 12, 2006...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.