Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 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 March 23rd, 2007, 06:52 PM
Registered User
 
Join Date: Feb 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 4 error: The role 'Posters' was not found

I am adapting the code to a gaming site that I'm developing as a learning excercise. But, I keep coming up with this error when I try to register a test user.

The role 'Posters' was not found.

This is in Register.aspx. It is found in this code snippet:
Line 34: {
Line 35: // add the current user to the Posters role
Line 36: Roles.AddUserToRole(CreateUserWizard1.UserName, "Posters");
Line 37: }
Line 38: }

Any ideas on just what can cause this error?

PS, In aspnetdb.mdf, the membership table is getting an entry, but the roles table remains null.

 
Old March 23rd, 2007, 09:38 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

>the roles table remains null.

Have you tried creating the role, first?

 
Old March 23rd, 2007, 09:57 PM
Registered User
 
Join Date: Feb 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It didn't say anything about creating the role in the book (that I could find). Perhaps I missed something. I am a newbie to ASP.NET, so it isn't surprising that I am having troubles.

So.... how does one go about creating roles?

 
Old March 23rd, 2007, 10:11 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Short answer: Website Admin Tool.
Long answer:
http://msdn2.microsoft.com/en-us/library/ms998314.aspx

 
Old March 24th, 2007, 12:34 AM
Registered User
 
Join Date: Feb 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks so much!!
It worked.


 
Old March 25th, 2007, 10:13 AM
Registered User
 
Join Date: Feb 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The Posters role is implemented in either chapter 6 or 7 can't remember.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM
Name not found? chapter 1 syedmahasan BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 2 November 22nd, 2006 02:40 PM
error found Chapter 10 pg 439 dogfish227 BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 1 April 8th, 2004 01:08 PM
Chapter 16 - Driver Not Found - Please Help wil324 JSP Basics 0 November 2nd, 2003 05:22 AM
package not found error nightsurfer JSP Basics 8 October 13th, 2003 10:20 PM





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