Avatar of jerute
jerute

asked on 

Security Exception in ASP.NET - Registry access

Due to an earlier issue with winforms in VS 2005 and 2008 (see https://www.experts-exchange.com/questions/23579806/Inner-Exception-The-Path-is-not-of-a-legal-form.html) I am trying to build my application in a web based environment. My application requires access to the registry but when run, I recieve this error:

Description: 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.

Exception Details: System.Security.SecurityException: Requested registry access is not allowed.

I made appropriate changes to the web.config file, adding the following lines...

<securityPolicy>
      <trustLevel name="Full" policyFile="internal" />
</securityPolicy>

...but that didn't make a difference...

I then found this post: http://forums.codecharge.com/posts.php?post_id=67135 and tried to make the recommended changes. I successfully changed the security settings for the ASPNET user but could find the settings in the machine.config file as outlined in part 2 of the solution....

...None of that helped...

So, does anybody have any other suggestions as to how to allow my application the necessary permission to read and write to the registry.

Thanks in advance.

Jerute
Web ApplicationsSecurityMicrosoft Forefront ISA Server

Avatar of undefined
Last Comment
jerute
ASKER CERTIFIED SOLUTION
Avatar of scout_in
scout_in
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of jerute
jerute

ASKER

No change. Same error.

Tx anyway.
Avatar of scout_in
scout_in
Flag of India image

May be this will help you
http://support.microsoft.com/kb/329291
Avatar of jerute
jerute

ASKER

Hi Scout

Sorry about the average marks but I still havren't found a solution to this problem but I hate open questions so you can have the points for being the only person to answer!

Thanks again.
Security
Security

Security is the protection of information systems from theft or damage to the hardware, the software, and the information on them, as well as from disruption or misdirection of the services they provide. The main goal of security is protecting assets, and an asset is anything of value and worthy of protection. Information Security is a discipline of protecting information assets from threats through safeguards to achieve the objectives of confidentiality, integrity, and availability or CIA for short. On the other hand, disclosure, alteration, and disruption (DAD) compromise the security objectives.

32K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo