Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : in C# and VB 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 February 23rd, 2014, 05:55 PM
Authorized User
Points: 416, Level: 7
Points: 416, Level: 7 Points: 416, Level: 7 Points: 416, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2013
Posts: 84
Thanks: 29
Thanked 2 Times in 2 Posts
Default Ch 16-17 User accounts

Hi Imar,

I decided to build a new site to make sure I understand the principles in the book. I am copying major concepts from the book, but I am putting them into the new site one at a time. I ran into an issue with authentication to access certain pages.

I put the Login, Profile and Signup pages into a folder thinking I would move them aside. I couldn't get the <location> element in web.config to properly block access to the Profile page for anonymous users.

I also found that the Logged In template "Logout" link (at the bottom of the FrontEnd Master) would always look for Login.aspx in the root of the site no matter what I tried to do. I even tried to add a NavigateURL property to try to adjust the linking behavior but that didn't seem to work. I may have had to many things going wrong to be certain I had things setup correctly...

So, my ultimate question is: Do the Login, Profile and Signup pages have to be in the root of the website?

If not, do you have some pointers about what needs to be changed to place these pages off of the root?

Thanks.

Best Regards,
Alan
 
Old February 24th, 2014, 04:54 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Alan,

Quote:
So, my ultimate question is: Do the Login, Profile and Signup pages have to be in the root of the website?
No. Profile and Signup are "yours" so you can place them anywhere (just update the links pointing to these pages). Login is - by default - searched for in the root but you can override that. See the discussion of the Login control on page 613 which shows this code:

Code:
<authentication mode="Forms">
<forms loginUrl="~/Account/MyLoginPage.aspx" />
</authentication>
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:
AlanWheeler (February 24th, 2014)




Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch 17 Storing Basic User Data in the Profile - dateOfBirth Error! leeWozyWarren BOOK: Beginning ASP.NET 4 : in C# and VB 1 December 6th, 2011 06:22 PM
User Accounts ASPNET.mdf pschulz ASP.NET 2.0 Basics 3 June 19th, 2008 12:41 PM
I need suggestion about user accounts hcusto ASP.NET 2.0 Professional 15 December 6th, 2006 08:30 AM
Blocking user accounts Ben Horne Forum and Wrox.com Feedback 10 April 29th, 2004 10:19 PM





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