473,387 Members | 1,502 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,387 software developers and data experts.

Security Exception in ASP.NET application

5
I am getting following error on accessing a asp.net application from virtual directory /website.

Please suggest me the solution.


Server Error in '/website' Application.
--------------------------------------------------------------------------------

Security Exception
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.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SecurityException: Requested registry access is not allowed.]
System.ThrowHelper.ThrowSecurityException(Exceptio nResource resource) +48
Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +2781177
System.Security.Cryptography.Utils.get_FipsAlgorit hmPolicy() +99
System.Security.Cryptography.MD5CryptoServiceProvi der..ctor() +23
System.Web.Compilation.AssemblyBuilder.AddChecksum Pragma(BuildProvider buildProvider, CodeCompileUnit compileUnit) +191
System.Web.Compilation.AssemblyBuilder.AddCodeComp ileUnit(BuildProvider buildProvider, CodeCompileUnit compileUnit) +47
System.Web.Compilation.BaseResourcesBuildProvider. GenerateStronglyTypedClass(AssemblyBuilder assemblyBuilder, IResourceReader reader) +134
System.Web.Compilation.BaseResourcesBuildProvider. GenerateCode(AssemblyBuilder assemblyBuilder) +324
System.Web.Compilation.AssemblyBuilder.AddBuildPro vider(BuildProvider buildProvider) +144




--------------------------------------------------------------------------------
Mar 14 '07 #1
3 1595
kenobewan
4,871 Expert 4TB
Please provide more information - relevant settings in web.config, authentication method etc.
Mar 14 '07 #2
ajl
5
My web.config file looks something like this.

<configuration>
<system.web>
<httpModules>
<add name="LogModule" type="LogModule"></add>
</httpModules>
<compilation debug="true"/>
<authentication mode="Windows" />
<identity impersonate="true"/>
<trust level="Full"/>
<trace traceMode="SortByCategory" enabled="true" localOnly="true" pageOutput="false" requestLimit="10"/>
</system.web>
</configuration>
Mar 15 '07 #3
By Default

ASPNET or IUSR account which is used to execute ASP.net websites has only guset permissions. you must sent executeable permission for your website to some Administrator Level account. in that case you will be able to access registry. otherwise it will throw an exception
Mar 15 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: James B | last post by:
OMA (Outlook Mobile Access) under Exchange is giving me a System.Security.SecurityException error. From what I gather this is a problem with the security level under which the OMA application is...
0
by: James B | last post by:
OMA (Outlook Mobile Access) under Exchange is giving me a System.Security.SecurityException error. From what I gather this is a problem with the security level under which the OMA application is...
9
by: John Stemper | last post by:
I've recently moved an ASP.Net app to our deployment server after it was verified on our integration test server. On the deployment server I am now getting the following error:...
29
by: Patrick | last post by:
I have the following code, which regardless which works fine and logs to the EventViewer regardless of whether <processModel/> section of machine.config is set to username="SYSTEM" or "machine" ...
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...
0
by: Carl Gilbert | last post by:
Hi I am trying to get an online gallery to work (www.ngallery.org). I have managed to get it all working on my local host but I can not get it to work on my web space. The site can be found...
5
by: CyberLotus | last post by:
Hi, I've created a web application and through this I want to import Excel data to database. Following is the code that I've written, ...
5
by: wenning | last post by:
Hello, I am struggling with a website on a W2K3 server which has the actual content on a NAS server (also W2K3 based). The servers doesn't run in a domain and arent intended to. I did make...
2
by: KaNos | last post by:
Hello world, I've made a webservice (c# v2) to install in a server IIS 6 on a Windows 2000 last SP. We can use the webservice in local, throw the pages wich present the methods, with a windows...
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
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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...

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.