Solved

ASP.net applciation on windows 2000 IIS gives security error.

Posted on 2006-11-03
1
578 Views
Last Modified: 2008-01-09
Hi,

I have developed an ASP.net web application in Microsofts Visual Studio 2005 and it runs fine when i run it on my local machine.

I have been given a Windows 2000 server running IIS as a host for the site which is ready to go live.

However when deploy the site and navigate to the page I get the following error:

"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(ExceptionResource resource) +48
   Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +2780809
   Microsoft.Win32.RegistryKey.OpenSubKey(String name) +6
   System.Diagnostics.PerformanceCounterLib.FindCustomCategory(String category, PerformanceCounterCategoryType& categoryType) +373
   System.Diagnostics.PerformanceCounterLib.IsCustomCategory(String category) +14
   System.Diagnostics.PerformanceCounterLib.IsCustomCategory(String machine, String category) +67
   System.Diagnostics.PerformanceCounter.Initialize() +303
   System.Diagnostics.PerformanceCounter.set_RawValue(Int64 value) +29
   System.Data.ProviderBase.Counter..ctor(String categoryName, String instanceName, String counterName, PerformanceCounterType counterType) +195
   System.Data.ProviderBase.DbConnectionPoolCounters..ctor(String categoryName, String categoryHelp) +370
   System.Data.SqlClient.SqlPerformanceCounters..ctor() +47
   System.Data.SqlClient.SqlPerformanceCounters..cctor() +19"

I have rad elsewhere that this is due to the ASPNET account not having the correct permissions to be able to write to the eventlogger.

However I cannot see an ASPNET account on the Windows 2000 box.

Can someone tell me how to create one or another way to overcome this problem?
0
Comment
Question by:Lamont77
1 Comment
 
LVL 15

Accepted Solution

by:
OMC2000 earned 500 total points
ID: 17867286
ASPNET account belongs to local computer, not to domain, that's might be the reason why you don't see it on Win2000 machine.
If there is really no such account, I would run
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
in order to re-enable ASP.NET integration with IIS
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now