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 October 19th, 2007, 12:57 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

It's not a code issue, but a configuration issue.

Once everything is set to /, open up the site in Visual Web Developer, start the Website Administration tool and create a new user and role. Make sure the user is assigned to this new role, and that the role name matches the one used in web.config used to block access to the Management folder.

Does this help?

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.
 
Old October 19th, 2007, 12:59 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
quote:Why do I have two Administrator accounts in my aspnet_users
That may indeed be part of the problem. Your database has two applications with two Admin users. I think only one of those (the wrong one) is assigned to a role.

Did my article help to fix your security issues?

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.
 
Old October 19th, 2007, 07:56 AM
Authorized User
 
Join Date: Oct 2007
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar,

I'm using Visual Web Developer Express and I dont see "open up the site in Visual Web Developer, start the Website Administration tool and create a new user and role." The Website Administration tool to create and add new users and roles. How do I get to this tool in the developer. Please let me know.
Thanks,

Matt

 
Old October 19th, 2007, 08:15 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 Matt,

Check out the second half of page 270....

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
 
Old October 19th, 2007, 11:04 AM
Authorized User
 
Join Date: Oct 2007
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK I've accessed the Administration tool. I gone through the entire process of creating a new user then an new role (I named it Admin) and then mapping the user to the role and then mapping the role to the folder (Management). Once I was completed I stopped and started my site but when I log in with the new user I still do not see the Admin tab and if I go to the management folder I get redirected to the login page. Can I send you the configuratin information so you can take a look. Please let me knwo what you need.
Thanks,
Matt

 
Old October 19th, 2007, 01:02 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

The thing is, I am not sure what to suggest or what to ask for at this stage. I am a little lost as to how you have configured your system, what database you are using an so on. Here's what I would do:

1. Unpack original source

2. Open site in VWD

3. Modify the web.config to set the applicationName to /

4. Run the WSAT

5. Create a role, then a user and assign it to the role

6. Use that same role to block the Management folder.

That works for me every single time. If it doesn't work for you, I don't know why not and I need more information about your current setup.

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
 
Old October 19th, 2007, 01:17 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

One more thing: did you add an applicationName to the role provider? Your last web.config doesn't have one....

http://p2p.wrox.com/topic.asp?TOPIC_...pplicationName

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
 
Old October 20th, 2007, 04:59 PM
Authorized User
 
Join Date: Oct 2007
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar,

I seem to have everything working in MSSQL 2000 now except that when I add a product it is not showing up in my database or in my webpage. I can add users. When I add new products the pictures show up in the pictures directory. When I run the procedure through sql query analyzer it runs. What would cause the products to now update? Please let me know.

Thanks,

Matt

 
Old October 20th, 2007, 06:04 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hard to tell without seeing the actual site run. Try setting a breakpoint in FormView1_ItemInserting in the AddProducts page and in the InsertProduct method in the ShopManagerDB class and see what fires. Maybe somehow an exception occurs?

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
 
Old July 28th, 2011, 04:22 AM
Registered User
 
Join Date: Jul 2010
Posts: 9
Thanks: 5
Thanked 0 Times in 0 Posts
Default

i also used your code from p2p, but when using code in VS 2008 i used to get "ProfileCompleted is not a part of ......."
How do i get rid of this problem ....





Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding products to a shoping cart Guerra BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8 4 March 16th, 2009 10:15 AM
Adding Color and Size parameters to WEBSHOP Cart. DJPrice BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 3 March 10th, 2008 01:39 PM
Adding update feature to Webshop mcarol44 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 January 4th, 2008 12:53 PM
Webshop adding tables. Rebel BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 25 October 28th, 2007 09:28 AM
Updating Products in the WebShop ASPLee BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 March 10th, 2007 11:24 PM





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