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:
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.
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.
[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.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
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?