Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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 19th, 2009, 12:21 AM
Registered User
 
Join Date: Aug 2009
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default Appendix B error Unrecognized configuration section profile

Hi

I think I have found the answer to the problem below but will leave the post here for others. I checked the machine.config file and saw that the <profile> was in the sectionGroup <sytem.web> so moved the code down the page to under <system.web> and the site is running again.

I am trying to modify the web.config file so that the Application Services use my own SQLServer database instead of aspnetdb.mdf as per the code on page 704 of Appendix B.

I think that I have successully used aspnet_regsql to configure the database in that 11 new tables in the form aspnet_Applications etc have appeared in my database.

However, when I save the web.config file with the code on page 704 added or try to run any of my existing pages, I get the error "Error 42 Unrecognized configuration section profile." on line 29 of web.config which is the first line of code on page 704.

Maybe is is something to do with where I have placed the code on the web.config page which is immediately after this code below or maybe I need to add something else in the page or another page or do I have a typo......

<configuration>

<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensions SectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGro up, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptReso urceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebService sSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerial izationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
<section name="profileService" type="System.Web.Configuration.ScriptingProfileSer viceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthentica tionServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServic eSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>

<!-- start of inserted code from page 704 of Beginning ASP.NET 3.5 book -->

<profile> this is line 29
<providers>
<clear/>
<add
type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
name="AspNetSqlProfileProvider"
connectionStringName="HotSearchConnectionString"
applicationName="/"
/>
</providers>
<properties>
<add name="FirstName"/>
<add name="LastName"/>
</properties>
</profile>

<roleManager enabled="true">
<providers>
<clear />
<add
type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
name="AspNetSqlRoleProvider"
connectionStringName="HotSearchConnectionString"
applicationName="/"
/>
</providers>
</roleManager>

<membership>
<providers>
<clear/>
<add
type="System.Web.Security.SQLMembershipProvider, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
name="AspNetSqlMembershipProvider"
connectionStringName="HotSearchConnectionString"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
applicationName="/"
requiresUniqueEmail="false"
passwordFormat="hash"
maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="8"
passwordAttemptWindow="10"
passwordStrengthRegularExpression=""
/>
</providers>
</membership>

<!-- end of inserted code from page 704 of Beginning ASP.NET 3.5 book -->

<appSettings/>




Thank you for your help.

David

Last edited by davidh08; August 19th, 2009 at 12:40 AM..
 
Old August 19th, 2009, 05:36 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi David,

Your web.config doesn't look valid to me. You're missing the <system.web> element that should be the container for the <profile> element.

The easiest thing to do is create a new web site that includes a config file. Then copy and paste your code into this file at the right location (under system.web, that is).

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
davidh08 (August 19th, 2009)
 
Old August 19th, 2009, 05:40 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Oh, right, just saw you had modified your post with the solution...

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old August 19th, 2009, 03:52 PM
Registered User
 
Join Date: Aug 2009
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks very much Imar.

I had <system.web> in the web.config file but I had placed the code above it not under it.

Your book is great - I had asked a .net developer with 4 years experience about how to get the role management services working in my database and he did not know so I went back to the book again and found it in Appendix B.

David
 
Old August 20th, 2009, 07:28 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

That's the whole idea of this book: years of knowledge packed in under 800 pages.... ;-)

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Project-Build-Configuration section disappeared Dmitriy General .NET 1 May 7th, 2008 02:31 PM
Error:Unrecognized configuration section cacheSize SKhna ASP.NET 2.0 Basics 0 February 15th, 2008 05:17 AM
Error When Reading Appendix B riswan13 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 December 16th, 2007 10:24 PM
Unrecognized configuration section 'sessionState' Shihanshin BOOK: ASP.NET Website Programming Problem-Design-Solution 1 May 27th, 2005 05:30 PM
Appendix F Error w/ Firefox. Palefrei BOOK: Beginning ASP 3.0 2 March 7th, 2005 02:16 PM





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