 |
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
|
|
|
|
|

February 2nd, 2007, 05:41 AM
|
|
Authorized User
|
|
Join Date: Feb 2007
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Imar,
OK, sent a few things to your e-mail I your profile.
Thanks.
Mike
|
|

February 2nd, 2007, 06:12 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
I think it should work now.
I created the role Administrator (which wasn't there) and added the existing account to it. You should now be able to log in with the account you created.
I also added applicationName="/" to the roleProvider in web.config, so you should also add that to your version and upload it to the remote server:
<roleManager defaultProvider="SqlProvider" enabled="true"
cacheRolesInCookie="true" cookieName=".ASPROLES"
cookieTimeout="30" cookiePath="/" cookieRequireSSL="false"
cookieSlidingExpiration="true" cookieProtection="All">
<providers>
<add name="SqlProvider"
type="System.Web.Security.SqlRoleProvider" applicationName="/"
connectionStringName="WebShop"
/>
</providers>
</roleManager>
Hope this helps,
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
|
|

February 2nd, 2007, 06:17 AM
|
|
Authorized User
|
|
Join Date: Feb 2007
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I think we previously created the Administrator role??? so why wasn't it there??? (don't need to answer, unless there is some goof up we did).
Did you do something special to add the Administrator role?
Let me chew on this for a minute, but yes, looks to be working and I see Imar as an Administrator and one as Administrator, so I see two Administrators...hmmmmm...
|
|

February 2nd, 2007, 06:19 AM
|
|
Authorized User
|
|
Join Date: Feb 2007
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
We will clear the database again and try to add the Administrator as we see it in there three times??? he we go...
|
|

February 2nd, 2007, 06:26 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Yeah, clearing the database is a good idea. I already removed my own account, but but by clearing it, you're sure everything is gone.
Then applicationName="/" ensures that all providers use the same application. Then create the role, then the user and you should be good to go...
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
|
|

February 2nd, 2007, 06:31 AM
|
|
Authorized User
|
|
Join Date: Feb 2007
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Imar,
OK, cleared out the database, creted the role, etc.
Looks OK.
One question: how to setup the registration form so when "regular" people register so that there role will be "member"?
Yes, the problem appears to be linked to having that applicationName="/" in the code, maybe add a note to your book?
Thanks a bunch!!!
Mike
|
|

February 2nd, 2007, 06:40 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
In the Login.aspx page, in the CreateUserWizard1_ContinueButtonClick event, you can add this code:
Roles.AddUserToRole(CreateUserWizard1.UserName, "Member")
This assigns the new user to the Member role.
And yes, we'll add this to the "notes" somewhere. We had similar issues with the CMS chapter, but you're the first to report problems with the Shop.
Cheers,
Imar
|
|

February 2nd, 2007, 01:49 PM
|
|
Authorized User
|
|
Join Date: Feb 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks Imar, I've been working with Mike to get this site up and tested so we can use parts of it in our own site. Thanks for all your help.
I've got a couple other questions for you; first we've got another problem with the addproduct function. We can login now without problems to the admin section, but when we try to add a new product we get an error. Can't see what is causing this problem. Any ideas?
Second, when the host used the .bak file to setup the database the products, categories, customers, etc. data didn't get uploaded for some reason. Do you have a SQL script to populate those tables with the original site data? If so, can we please have a copy of it to save us time uploading the data manually? So far Iâve added the âMugsâ category manually, to test the add products form, but had the above problem.
Third, your book talks about adding an add product categories form to the WebShop site and that we should know how to do this from other sections in the book. Can you point out any specific sections of the book or provide some ideas on this that will help us add this new web form to the site using the same 3 tiered programming architecture? Iâm a little confused on how all the pieces are fitting together with the structure.
Thanks again for your outstanding support!!!
Robert
|
|

February 3rd, 2007, 05:50 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi Robert,
What error do you get when you create a new product? Most likely, you get an error because the web server account isn't allowed to save the uploaded product images?
It's weird that when you send them a bak file, you don't get the actual data. Looks like your host messed it up a little, as a .bak is a back up file that should contain structure and data. There isn't that much in the existing tables but if you want to create SQL insert scripts from existing tables, take a look here:
http://weblogs.asp.net/scottgu/archi...nt-part-1.aspx
http://weblogs.asp.net/scottgu/archi...-database.aspx
This add-in for Visual Studio allows you to script the contents of your database to .sql files that you can run remotely. In the mean time, run this to add the three categories:
INSERT INTO Category (Description) VALUES ('Mugs')
INSERT INTO Category (Description) VALUES ('T-Shirts')
INSERT INTO Category (Description) VALUES ('Posters')
Products should be added through the Admin interface as you need to hook the up to categories and ImageUrls. And obviously, Order should be added to the website as well... ;)
If you look at the CMS chapter, you'll see some general ideas about managing content in the database. Additionally, you could take a look at the CustomerSupport chapter, with Categories Management in particular. That shows you how to create, change and delete existing categories in the system.
Hope this answers your questions....
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
|
|

February 5th, 2007, 10:41 AM
|
|
Authorized User
|
|
Join Date: Feb 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks, yes it was just a permissions issue. All fixed now.
Can this site also be used with a SQL server 2000 database? If so what modifications if any are needed to make it work?
Thanks
Robert
|
|
 |