View Single Post
  #6 (permalink)  
Old 11-10-06, 04:33 AM
dbrook007 dbrook007 is offline
Newbie Coder
 
Join Date: Feb 2006
Location: Yorkshire, UK
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Shane - thanks for the reply.

They Logout by clicking the "LoginStatus" control, which is located on the "unauthorized" page - this is the page that just informs the user that they cannot view the "securepage". The unauthorized page has no code or settings to prevent anyone seeing it.

Then, once logged out and the LoginStatus control on the authorized page changed to "Login", I click that and it takes me to the Login page. This is where you get the ReturnUrl in the querystring.

The thing is, this code is from a tutorial on www.asp.net. You can see it working fine in the video on there, and the "ReturnUrl" is passed in the QueryString just as it is on my PC - you can see it in the video. I have downloaded the code - it just does not work the same on my PC.

I think this is the important thing - if that is the same code (and given it's downloadable, there is good reason to believe that it is), why does it work in their video but not on my machine?

Also, if you look at: http://msdn2.microsoft.com/en-US/lib...onpageurl.aspx

There is part of it which says: -

The DestinationPageUrl property specifies the page that is displayed when a login attempt is successful.

The default behavior of the Login control is to return the user to the referring page, or to the page defined in the defaultUrl attribute of the forms element in the Web.config file.

The DestinationPageUrl property overrides the default behavior of the Login control, as well as the defaultUrl setting made in the configuration file.

So, from this, if by a referring page it means where there is a "ReturnUrl" present in the QueryString, you would assume that the project code is correct and SHOULD work.

I have noticed from the videos that the trainer, Bob Tabor, was using version 2.0.50215 of the .Net framework. However, the up-to-date version, which I believe is now in most common use and the one I am using, is version 2.0.50727.

I was wondering if there was some change that Microsoft made to the way the Login control behaves under this scenario between those two versions? It would seem an odd thing to do but... new to asp.net and clutching at straws..

Any ideas?

thanks
Darren
Reply With Quote