Wrox Programmer Forums
|
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 22nd, 2004, 01:36 AM
Registered User
 
Join Date: Jul 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default machine.config

Hi,
I am not quite sure how to set the step 7 of the 'getting set the site up' fot the sample file
Step 7:
Open Machine.Config (by default in C:\WINNT\Microsoft.NET\Framework\v1.0.3705\CONFIG) in a text editor, find the <processModel> section, and set the userName attribute to "SYSTEM". This is required to enable event logging in ASP.NET Applications -- which we use in our custom error handling.

and I get the following error, please help

Thanks,
Sillygiu

Server Error in '/ThePhile' Application.
--------------------------------------------------------------------------------

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: This is an unexpected token. Expected 'QUOTE'. Line 34, position 43.

Source Error:


Line 32: <section name="httpModules" type="System.Web.Configuration.HttpModulesConfigur ationHandler, System.Web, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 33: <section name="processModel" type="System.Web.Configuration.ProcessModelConfigu rationHandler, System.Web, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineOnly"/>
Line 34: <section name="ThePhile" type=System>
Line 35: </section>
Line 36:


Source File: c:\winnt\microsoft.net\framework\v1.0.3705\Config\ machine.config Line: 34


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


 
Old August 22nd, 2004, 07:40 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

Change to type="System"

Brian
 
Old August 22nd, 2004, 08:56 PM
Registered User
 
Join Date: Jul 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks, Brian,
I changed the type=system to type="system". I don't get the machine.config error any more. According to step 7 : [and set the userName attribute to "SYSTEM".] I don't know if the section name should be "ThePhile" ? I just guess.

But I still have different error:(I try to fix by going to .Net Framework Configuration--> Run time security Policy --> machine --> allcode : to add a new name "localhost" and grant its permission to Fulltrust. The fix didn't work for me)

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 29: if (!EventLog.SourceExists("ThePhile.COM"))
Line 30: {
Line 31: EventLog.CreateEventSource("ThePhile.COM", "Application");
Line 32: }
Line 33: EventLog.WriteEntry("ThePhile.COM", message, entryType);


Source File: C:\wrox\ThePhile\PhilePage.cs Line: 31

Stack Trace:


[SecurityException: Requested registry access is not allowed.]
   Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +473
   System.Diagnostics.EventLog.CreateEventSource(Stri ng source, String logName, String machineName, Boolean useMutex) +445
   System.Diagnostics.EventLog.CreateEventSource(Stri ng source, String logName, String machineName) +11
   System.Diagnostics.EventLog.CreateEventSource(Stri ng source, String logName) +11
   Wrox.ThePhile.Web.PhilePage.LogEvent(String message, EventLogEntryType entryType) in C:\wrox\ThePhile\PhilePage.cs:31
   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(IExecutionS tep step, Boolean& completedSynchronously) +87




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


 
Old August 23rd, 2004, 07:38 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

Your type probably needs to be something in appearance of:

type="System.Web.Configuration.ProcessModelConfigu rationHandler, System.Web, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

But it needs to be the link to your component, which you may need to put in the GAC. The first part should be the path to the component, and the second part is the name of the assembly. The remaining parts are version, key, and current culture type.

Brian
 
Old August 23rd, 2004, 02:16 PM
Registered User
 
Join Date: Jul 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,bmains,

I am totally lost about what to do. I am very new to ASP.net
I try to set up the sample project the book provides - "ThePhile".
According to the instruction step 7 it says "Open Machine.Config (by default in C:\WINNT\Microsoft.NET\Framework\v1.0.3705\CONFIG) in a text editor, find the <processModel> section, and set the userName attribute to "SYSTEM". This is required to enable event logging in ASP.NET Applications -- which we use in our custom error handling"

I don't have any idea. I add line 34 after line 33 "processModal".
I even don't know if it is what I am supposed to do. Please help.

Thanks



 
Old August 23rd, 2004, 02:41 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

I think you need to change the <processModel> element, and not add a section. The section area defines the DLL's that interact with the elements in the configuration file (sort of).

Search for <processModel in the machine.config, then change the userName and password properties.

Remove your code.

Brian
 
Old August 23rd, 2004, 07:32 PM
Registered User
 
Join Date: Jul 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, Brian,

After I Search for <processModel in the machine.config, how to change the userName and password properties. (I see :

section name="processModel" type="System.Web.Configuration.ProcessModelConfigu rationHandler, System.Web, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineOnly"/>

Thanks


 
Old August 24th, 2004, 07:21 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

You still are in the section, which defines the DLL used to represent the processModel component in the framework. Go way beyond this and search further. You need to look for a:

<process model ...with many attributes...>

In the file.

Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
Config error--machine.config sunithavasudevan ASP.NET 1.0 and 1.1 Professional 2 October 10th, 2006 07:14 AM
machine.config Mike McClanahan BOOK: ASP.NET Website Programming Problem-Design-Solution 9 September 8th, 2004 07:18 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.