473,326 Members | 2,114 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,326 software developers and data experts.

Urgent

Does anyone have any advise on how I can fix the error message shown below?
Thanks in advance for any ideas,
Shane
Server Error in '/' 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:
Line 42: {
Line 43:
Line 44: Logger.Write("Application_Start");
Line 45:
Line 46: // Initializes various security providers
Source File:
C:\Inetpub\customers\interface\framework\aspnet\ba seApplication.cs Line:
44

Stack Trace:
[SecurityException: Requested registry access is not allowed.]
Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +440
System.Diagnostics.EventLog.CreateEventSource(Stri ng source, String
logName, String machineName, Boolean useMutex) +443
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type, Int32 eventID, Int16 category, Byte[] rawData) +347
System.Diagnostics.EventLog.WriteEntry(String source, String message,
EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData) +68
System.Diagnostics.EventLog.WriteEntry(String source, String message,
EventLogEntryType type, Int32 eventID, Int16 category) +21
System.Diagnostics.EventLog.WriteEntry(String source, String message,
EventLogEntryType type, Int32 eventID) +15
System.Diagnostics.EventLog.WriteEntry(String source, String message,
EventLogEntryType type) +11

Microsoft.Practices.EnterpriseLibrary.Logging.Dist ributor.DistributorEventLogger.WriteToLog(Exceptio n exception, Severity severity)

Microsoft.Practices.EnterpriseLibrary.Logging.Dist ributor.DistributorEvents.LogProcessLogException(L ogEntry logEntry, Exception ex)

Microsoft.Practices.EnterpriseLibrary.Logging.Dist ributor.LogDistributor.ProcessLog(LogEntry log)

Microsoft.Practices.EnterpriseLibrary.Logging.Dist ributor.InProcLogDistributionStrategy.SendLog(LogE ntry logEntry)

Microsoft.Practices.EnterpriseLibrary.Logging.LogW riter.SendMessage(LogEntry
logEntry)
Microsoft.Practices.EnterpriseLibrary.Logging.LogW riter.Write(LogEntry log)
Microsoft.Practices.EnterpriseLibrary.Logging.Logg er.Write(LogEntry log)
Microsoft.Practices.EnterpriseLibrary.Logging.Logg er.Write(Object
message, String category, Int32 priority, Int32 eventId, Severity severity,
String title, IDictionary properties)
Microsoft.Practices.EnterpriseLibrary.Logging.Logg er.Write(Object message)

PointMethod.Customers.Interface.Web.IFS.framework. aspnet.baseApplication.Application_Start(Object
sender, EventArgs e) in
C:\Inetpub\customers\interface\framework\aspnet\ba seApplication.cs:44


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Version:1.1.4322.2032

Feb 6 '06 #1
2 2684
It seems you are running a web application that acceses Windows registry.
Obviously, the web app running user account (by default, ASPNET or Network
Services) does not have permission to access the registry key.

It also seems you are using MS Enterprise Library Block. So, you may want to
go through the document to see what user privilege is required for that
piece of code to access that Registry Key.

To solve that, you either give appropriate permission to access the said
registry Key (using RegEdt32.exe); or change the web app user account
(impersonate); or, if you think both are pening a security hole, then,
simply do not use that code and change the logic with your own code.

"Shane" <Sh***@discussions.microsoft.com> wrote in message
news:F3**********************************@microsof t.com...
Does anyone have any advise on how I can fix the error message shown
below?
Thanks in advance for any ideas,
Shane
Server Error in '/' 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:
Line 42: {
Line 43:
Line 44: Logger.Write("Application_Start");
Line 45:
Line 46: // Initializes various security providers
Source File:
C:\Inetpub\customers\interface\framework\aspnet\ba seApplication.cs
Line:
44

Stack Trace:
[SecurityException: Requested registry access is not allowed.]
Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
+440
System.Diagnostics.EventLog.CreateEventSource(Stri ng source, String
logName, String machineName, Boolean useMutex) +443
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type, Int32 eventID, Int16 category, Byte[] rawData) +347
System.Diagnostics.EventLog.WriteEntry(String source, String message,
EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData) +68
System.Diagnostics.EventLog.WriteEntry(String source, String message,
EventLogEntryType type, Int32 eventID, Int16 category) +21
System.Diagnostics.EventLog.WriteEntry(String source, String message,
EventLogEntryType type, Int32 eventID) +15
System.Diagnostics.EventLog.WriteEntry(String source, String message,
EventLogEntryType type) +11

Microsoft.Practices.EnterpriseLibrary.Logging.Dist ributor.DistributorEventLogger.WriteToLog(Exceptio n
exception, Severity severity)

Microsoft.Practices.EnterpriseLibrary.Logging.Dist ributor.DistributorEvents.LogProcessLogException(L ogEntry
logEntry, Exception ex)

Microsoft.Practices.EnterpriseLibrary.Logging.Dist ributor.LogDistributor.ProcessLog(LogEntry
log)

Microsoft.Practices.EnterpriseLibrary.Logging.Dist ributor.InProcLogDistributionStrategy.SendLog(LogE ntry
logEntry)

Microsoft.Practices.EnterpriseLibrary.Logging.LogW riter.SendMessage(LogEntry
logEntry)
Microsoft.Practices.EnterpriseLibrary.Logging.LogW riter.Write(LogEntry
log)
Microsoft.Practices.EnterpriseLibrary.Logging.Logg er.Write(LogEntry log)
Microsoft.Practices.EnterpriseLibrary.Logging.Logg er.Write(Object
message, String category, Int32 priority, Int32 eventId, Severity
severity,
String title, IDictionary properties)
Microsoft.Practices.EnterpriseLibrary.Logging.Logg er.Write(Object
message)

PointMethod.Customers.Interface.Web.IFS.framework. aspnet.baseApplication.Application_Start(Object
sender, EventArgs e) in
C:\Inetpub\customers\interface\framework\aspnet\ba seApplication.cs:44


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
ASP.NET
Version:1.1.4322.2032

Feb 6 '06 #2
MS Enterprise library's default logging provider is the Event Log. When
you write a log entry using Logger.Write ("") without specifying a
category it will use the default logging categor which is "INFO".

The exception occurs when the enterprise lib is trying to write an
entry to the event log, and might be trying to register an event source
with the event log, which will fail as ASPNET account does not have
prevliges to register write to the event source event log key. Options:

1. Change the default log category of the app to not use Event Log.

- OR -

2. Register the event source used by the enterprise library. (You can
find the event source at loggingdistributorconfiguration.config file,
look for the eventLogName and eventSourceName attributes in the xml
file).

You dont need to provide registry permissions to ASPNET for this. The
only thing required is to register the event source.

Hope this helps...

- NuTcAsE

Feb 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Rob | last post by:
I have a form - when you click the submit button, it appends a variable to the URL (e.g. xyz.cgi?inputID=some_dynamic_variable) It also opens a new page. Now, that some_dynamic_variable is...
9
by: Stefan Bauer | last post by:
Hi NG, we've got a very urgent problem... :( We are importing data with the LOAD utility. The input DATE field data is in the format DDMMYYYY (for days) and MMYYYY (for months). The target...
8
by: Mike | last post by:
Hello, I have a few rather urgent questions that I hope someone can help with (I need to figure this out prior to a meeting tomorrow.) First, a bit of background: The company I work for is...
28
by: Tamir Khason | last post by:
Follwing the struct: public struct TpSomeMsgRep { public uint SomeId;
16
by: | last post by:
Hi all, I have a website running on beta 2.0 on server 2003 web sp1 and I keep getting the following error:- Error In:...
7
by: zeyais | last post by:
Here is my HTML: <style> ..leftcolumn{float:left;width:300px;border: 1px solid #ccc} ..rtcolumn{float:left;width:600px;border: 1px solid #ccc} </style> <body> <div class="leftcolumn"...
33
by: dembla | last post by:
Hey Frnds can anyone help me in this i need a program in 'c' PROGRAM to print NxN Matrix 9 1 8 1 2 3 2 7 3 as 4 5 6 6 4 5 7 8 9 in sorted form
8
by: ginnisharma1 | last post by:
Hi All, I am very new to C language and I got really big assignment in my work.I am wondering if anyone can help me.........I need to port compiler from unix to windows and compiler is written...
3
by: N. Spiker | last post by:
I am attempting to receive a single TCP packet with some text ending with carriage return and line feed characters. When the text is send and the packet has the urgent flag set, the text read from...
7
by: Cirene | last post by:
I used to use the Web Deployment Project with my VS2005 projects. Now I've fully upgraded to VS2008. Do I have to download a new version of the Web Deployment Project? If so where can I find...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.