|
 |
aspdotnet_website_programming thread: installed thePhile - security error
Message #1 by "Brandon Havener" <brandon@d...> on Wed, 19 Feb 2003 21:58:51
|
|
I have recently received my copy of the asp.NET website programming and
am having trouble getting thePhile up and running. I followed the setup
instructions to a T and when I rebooted and tried to browse
to /localhost/thePhile I received the following error:
Server Error in '/thephile' 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 27: protected void LogEvent(string message,
EventLogEntryType entryType)
Line 28: {
Line 29: if (!EventLog.SourceExists
("ThePhile.COM"))
Line 30: {
Line 31: EventLog.CreateEventSource
("ThePhile.COM", "Application");
Source File: C:\wrox\ThePhile\PhilePage.cs Line: 29
Stack Trace:
[SecurityException: Requested registry access is not allowed.]
Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
+473
System.Diagnostics.EventLog.FindSourceRegistration(String source,
String machineName, Boolean readOnly) +295
System.Diagnostics.EventLog.SourceExists(String source, String
machineName) +78
System.Diagnostics.EventLog.SourceExists(String source) +11
Wrox.ThePhile.Web.PhilePage.LogEvent(String message, EventLogEntryType
entryType) in C:\wrox\ThePhile\PhilePage.cs:29
Wrox.ThePhile.Web.PhilePage.PhilePage_Error(Object sender, EventArgs
e) in C:\wrox\ThePhile\PhilePage.cs:54
System.Web.UI.TemplateControl.OnError(EventArgs e) +109
System.Web.UI.Page.HandleError(Exception e) +68
System.Web.UI.Page.ProcessRequestMain() +2065
System.Web.UI.Page.ProcessRequest() +118
System.Web.UI.Page.ProcessRequest(HttpContext context) +18
System.Web.CallHandlerExecutionStep.Execute() +179
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +87
----------------------------------------------------
Does anyone have any idea how to fix this security issue?
Thanks.
-brandon
Message #2 by "Byron Leoppky" <bleoppky@a...> on Wed, 19 Feb 2003 17:38:52 -0600
|
|
You need to change the APS.NET user account name in the machine.config to
"SYSTEM" so that the application has access to the eventlog.
It's documented both in the book, and the readme that came with the source
code.
----- Original Message -----
From: "Brandon Havener" <brandon@d...>
To: "Website Programming with ASP.NET"
<aspdotnet_website_programming@p...>
Sent: Wednesday, February 19, 2003 9:58 PM
Subject: [aspdotnet_website_programming] installed thePhile - security error
> I have recently received my copy of the asp.NET website programming and
> am having trouble getting thePhile up and running. I followed the setup
> instructions to a T and when I rebooted and tried to browse
> to /localhost/thePhile I received the following error:
>
> Server Error in '/thephile' 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 27: protected void LogEvent(string message,
> EventLogEntryType entryType)
> Line 28: {
> Line 29: if (!EventLog.SourceExists
> ("ThePhile.COM"))
> Line 30: {
> Line 31: EventLog.CreateEventSource
> ("ThePhile.COM", "Application");
>
>
> Source File: C:\wrox\ThePhile\PhilePage.cs Line: 29
>
> Stack Trace:
>
>
> [SecurityException: Requested registry access is not allowed.]
> Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
> +473
> System.Diagnostics.EventLog.FindSourceRegistration(String source,
> String machineName, Boolean readOnly) +295
> System.Diagnostics.EventLog.SourceExists(String source, String
> machineName) +78
> System.Diagnostics.EventLog.SourceExists(String source) +11
> Wrox.ThePhile.Web.PhilePage.LogEvent(String message, EventLogEntryType
> entryType) in C:\wrox\ThePhile\PhilePage.cs:29
> Wrox.ThePhile.Web.PhilePage.PhilePage_Error(Object sender, EventArgs
> e) in C:\wrox\ThePhile\PhilePage.cs:54
> System.Web.UI.TemplateControl.OnError(EventArgs e) +109
> System.Web.UI.Page.HandleError(Exception e) +68
> System.Web.UI.Page.ProcessRequestMain() +2065
> System.Web.UI.Page.ProcessRequest() +118
> System.Web.UI.Page.ProcessRequest(HttpContext context) +18
> System.Web.CallHandlerExecutionStep.Execute() +179
> System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
> completedSynchronously) +87
>
> ----------------------------------------------------
>
> Does anyone have any idea how to fix this security issue?
>
> Thanks.
>
> -brandon
> ---
> Professional Design Patterns in VB.NET:
> Building Adaptable Applications
>
> Want to know how design patterns bring reusable
> design and adaptabilty to your applications? How
> to recognize the need for a design pattern
> solution? How to select, design, and implement
> the right patterns? How parts of the .NET Framework
> (like the .NET Data Providers and .NET Remoting)
> take advantage of design patterns? This book
> presents a practical approach to using design
> patterns in VB.NET, by focusing on the relevance
> of design patterns in the different tiers of a
> distributed n-tier architecture.
>
> http://www.wrox.com/books/1861006985.htm
>
>
Message #3 by "Brandon Havener" <brandon@d...> on Thu, 20 Feb 2003 00:08:21
|
|
I already changed the asp.NET user account name in the machine.config
to "SYSTEM" - any other possibilities?
> You need to change the APS.NET user account name in the machine.config
to
"SYSTEM" so that the application has access to the eventlog.
It's documented both in the book, and the readme that came with the source
code.
----- Original Message -----
From: "Brandon Havener" <brandon@d...>
To: "Website Programming with ASP.NET"
<aspdotnet_website_programming@p...>
Sent: Wednesday, February 19, 2003 9:58 PM
Subject: [aspdotnet_website_programming] installed thePhile - security
error
> I have recently received my copy of the asp.NET website programming and
> am having trouble getting thePhile up and running. I followed the setup
> instructions to a T and when I rebooted and tried to browse
> to /localhost/thePhile I received the following error:
>
> Server Error in '/thephile' 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 27: protected void LogEvent(string message,
> EventLogEntryType entryType)
> Line 28: {
> Line 29: if (!EventLog.SourceExists
> ("ThePhile.COM"))
> Line 30: {
> Line 31: EventLog.CreateEventSource
> ("ThePhile.COM", "Application");
>
>
> Source File: C:\wrox\ThePhile\PhilePage.cs Line: 29
>
> Stack Trace:
>
>
> [SecurityException: Requested registry access is not allowed.]
> Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
> +473
> System.Diagnostics.EventLog.FindSourceRegistration(String source,
> String machineName, Boolean readOnly) +295
> System.Diagnostics.EventLog.SourceExists(String source, String
> machineName) +78
> System.Diagnostics.EventLog.SourceExists(String source) +11
> Wrox.ThePhile.Web.PhilePage.LogEvent(String message,
EventLogEntryType
> entryType) in C:\wrox\ThePhile\PhilePage.cs:29
> Wrox.ThePhile.Web.PhilePage.PhilePage_Error(Object sender, EventArgs
> e) in C:\wrox\ThePhile\PhilePage.cs:54
> System.Web.UI.TemplateControl.OnError(EventArgs e) +109
> System.Web.UI.Page.HandleError(Exception e) +68
> System.Web.UI.Page.ProcessRequestMain() +2065
> System.Web.UI.Page.ProcessRequest() +118
> System.Web.UI.Page.ProcessRequest(HttpContext context) +18
> System.Web.CallHandlerExecutionStep.Execute() +179
> System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
> completedSynchronously) +87
>
> ----------------------------------------------------
>
> Does anyone have any idea how to fix this security issue?
>
> Thanks.
>
> -brandon
> ---
> Professional Design Patterns in VB.NET:
> Building Adaptable Applications
>
> Want to know how design patterns bring reusable
> design and adaptabilty to your applications? How
> to recognize the need for a design pattern
> solution? How to select, design, and implement
> the right patterns? How parts of the .NET Framework
> (like the .NET Data Providers and .NET Remoting)
> take advantage of design patterns? This book
> presents a practical approach to using design
> patterns in VB.NET, by focusing on the relevance
> of design patterns in the different tiers of a
> distributed n-tier architecture.
>
> http://www.wrox.com/books/1861006985.htm
>
>
|
|
 |