Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 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 April 10th, 2006, 04:23 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 Danny,

What do you see when you look into the tables in the database directly? Which records do you see in the aspnet_Applications table?

And if you look at the records in the Role table, do they line up with the right application in the Applications table?

I'd like to get to the bottom of this, so we can fix this problem. However, I need a bit more information, because I cannot reproduce the problem with the files from the book (after applying the changes I posted earlier).

If you want, you can contact me directly through my profile so we can work this out. I'm a bit busy at the moment but I promise I'll try to fix this ASAP.

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old April 10th, 2006, 05:14 AM
Registered User
 
Join Date: Apr 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

There are two applications in the application table. One is for "/" and the other is for "CMS". When I copy the application ID from the "CMS" and replace the members application ID with that of the CMS it works. My question is why does this occur in the first place?

Danny
 
Old April 10th, 2006, 05:19 AM
Registered User
 
Join Date: Apr 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just reviewing your earlier posts and I see you had already identified the problem but not the solution. I have only just realised that the users table is different to the membership table. I was looking at the users table.

Still, it does seem like there is a problem here.

Danny
 
Old April 10th, 2006, 06:20 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 Danny,

Applications are created by the provider automatically whenever one is needed. What it should create depends on the applicationName in the provider's configuration.

The Membership provider in the web.config file has an explicit applicationName attribute, while the roleManager doesn't (my bad).

So, depending on how you configure your application, and run it (e.g. using IIS or the built-in server), you may end up with a different application than the one you expect. Even though there is already an application record, a new one may be created if it has a different name than the one already present.

The provider model uses two tables to store users: aspnet_Users and aspnet_Membership.

The Users table stores *all* users, so also the anonymous accounts for anonymous Profiles, for example. Only when you sign up for an account through the CreateUserWizard or the Membership API, you get an associated record in the Membership table.

Both Users and Membership accounts are linked to an Application through the Applications table. In fact, you should consider the UserId / ApplicationId as *the* primary ley for a user; not just the UserId.

Is it working properly now??

Sorry for the confusion.

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old April 18th, 2006, 06:28 PM
Authorized User
 
Join Date: Apr 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I too am having problems logging in as Administrator using pswd Admin123#. I have gone through everything you have outlined in the book and on the forum, but nothing seems to work.

I made sure:
The application id for "/" is in all the rest of the corresponding tables, matter of fact I deleted the "/Cms" from the aspnet_application table
Made sure there is only one administrator and the user, role and membership tables have the correct user id and deleted the other administrator account that was in there
Made sure the web.config file is pointing to "/" instead of "/Cms"

Any other ideas
 
Old April 19th, 2006, 01:14 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 mpremji,

What do you see when you start the Website Administration Tool? Do you see both the Administrator account and the Administrator role?

You could open the WAT, then delete the role and the user account, and then recreate them. Other than security, there's no data associated with the Administrator account so you can safely delete it.

Once you recreate the roles with the WAT, things should work as expected....

Please let me know if this works for you....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old April 19th, 2006, 05:10 PM
Authorized User
 
Join Date: Apr 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar,

I deleted the role and the user account and recreated them but it still does not let me log in.

mpremji
 
Old April 19th, 2006, 05:15 PM
Authorized User
 
Join Date: Apr 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am going to try to reinstall the files and delete the user account and role and see if it works........does this problem exist with all the projects in your book?
 
Old April 20th, 2006, 12:56 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

AFAIK, no, only the CMS database has this problem, but please let me know if you find other issues.

That said, I think many of the issues people are having with the projects are database and security related. The account used by the web server needs permissions to the database in the App_Code folder.

Chapter 5, page 163 and 164 explain how to set this up for the Cms database, but the same principle applies to other database chapters.

If someone can confirm they have the CMS site working with the instructions from this thread, and the pages 163 and 164 of the book, please let me know. I'll the post a sticky thread in this forum detailing the steps you need to take.

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old April 22nd, 2006, 07:34 AM
Authorized User
 
Join Date: Feb 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am having a problem logging the CMS too. It seems to be a readonly problem with the database. I even deleted the Administrator user and recreated the account and it still says Your login attempt was not successful. Please try again.

Any solutions yet?





Similar Threads
Thread Thread Starter Forum Replies Last Post
CMS problem trieuanhl BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 5 November 23rd, 2008 05:38 AM
JavaScript Problem in CMS sankar2chat Javascript 0 August 19th, 2008 10:39 PM
CMS - admin login does not work peppie BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 October 20th, 2007 08:46 AM
CMS Envelope problem chapter 9 luke.koziol BOOK: Beginning Cryptography with Java 1 May 6th, 2007 05:15 PM
CMS-Cant Login SoftMind BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 42 August 10th, 2006 03:23 PM





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