Solved

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

Posted on 2006-11-03
1
577 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

First of all, clustering IIS is something you should rarely consider doing. In almost all cases, Microsoft Network Load Balancing (NLB) (http://technet.microsoft.com/en-us/library/cc758834(WS.10).aspx) is a much better solution when you need to p…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
This video discusses moving either the default database or any database to a new volume.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

14 Experts available now in Live!

Get 1:1 Help Now