Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 1st, 2008, 04:32 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hampshire, United Kingdom.
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post
Default Login ReturnURL and SiteMap

Hi All,

OK, here's my newest problem :)

I have created a custom SiteMap provider, while testing, I am getting problems when logging in..

Basically, I want the SiteMap to have a single node when logging in, this will just basically be the "Home" page, which can display information to unauthenticated users. So, I added an entry to my SiteMap, marking the parent of URL '~/login.aspx' to be the home page.

However, this is not working when a query string is passed. Since the rawUrl is different, its not returning the desired results.

I know I could just hack it and see if the rawUrl contains 'login.aspx' and return a set node, but I dont really like the idea of that (what if I had a form called 'createlogin.aspx' ?

Is there any way to wildcard the url query? Or perhaps hide the return url and send it via POST rather than query string?

Any/all help gratefully received!

Rob
http://robzyc.spaces.live.com
__________________
Rob
http://cantgrokwontgrok.blogspot.com
Reply With Quote
  #2 (permalink)  
Old May 2nd, 2008, 08:12 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Rob,

You might be better off using the membership control that toggles its output based on the login state. I forget which one it is. When logged in the regular sitemap is displayed. When not, a simple list of what you want to link to is displayed.

-Peter
peterlanoie.blog
Reply With Quote
  #3 (permalink)  
Old May 2nd, 2008, 08:24 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hampshire, United Kingdom.
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Peter,

Thanks for the reply, I think the control you are referring to is "LoginView". This would work, although I thought I would ask because even though in this case, all users MUST be logged in, what if there was a public "landing" page, and other, secured content.. In these cases I would like to be able to navigate back up to the "public" portion of the site.

The root of the problem was not really whats going on (although it does kinda suck you cant change the way the return URL is sent) but my implementation.

I decided I was not having another day of seeing no success, so I came back in the office, started again, and stubbed every single method with trace calls everywhere so I could examine exactly what the code was doing..

30 minutes later I had the thing cracked :D lesson learned: never underestimate the value of going back to basics and just feeling your way through the code.

I am now happily beavering away on getting the actual database-linked implementation up and running and code complete. Should have most done by the end of the day so I can relax over the weekend!

Thanks for the suggestion, I will definately keep that in mind for future.

Have a great weekend, do you guys get your Maypoles out and start dancing around and get a free day off Monday as well? ;)

Rob
http://robzyc.spaces.live.com
Reply With Quote
  #4 (permalink)  
Old May 2nd, 2008, 08:47 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Unfortunately no. The US is pretty stingy with holidays. According to Wikipedia: "Strictly speaking, the United States does not have national holidays." Getting days off of work is determined by employers (but obviously most respect the US Federal holidays).

I work with a team from Belarus and it seems they are off for half of May. We'll get the last Monday off for Memorial Day.

-Peter
peterlanoie.blog
Reply With Quote
  #5 (permalink)  
Old May 2nd, 2008, 08:58 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hampshire, United Kingdom.
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post
Default

Wow, you're not kidding! So whats your average annual leave with employers there then?

I ask because part of my career plan is to begin seeing as much of the US, with possible intent of emigrating!

Code:
void Robs_Contract_Amendment()
{
 _holidays.AddRange(British_Holidays);
 _amendments.Notes.Add("Need my tea and crumpet breaks");
}
:D

Still don't really understand the odd perception of us Brits always appearing in US comedy/toons with big teeth?!??! But I do like my tea and crumpets! :)

Rob
http://robzyc.spaces.live.com
Reply With Quote
  #6 (permalink)  
Old May 3rd, 2008, 03:05 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Fearing that this thread is veering way off topic, I'll provide one more reply. (If you want to continue the conversation, catch me offline.)

We get 2 weeks (10 days) standard when you start working. As you accumulate time with a single employer you typically get more. The amount depends on the employer. I think I get another week at the 5 year mark, another at 10. Also depending on your employer you get sick/personal time that can sometimes be used for vacations if you don't happen to get sick much. Fortunately, my group is flexible and is more concerned about getting things done than clocking hours. If you're lucky, you can find a job with a group like that. Or work as a contractor and you can make your own hours. (And probably get paid more, but of course you'll have to spring for your own health insurance: no socialized medicine. :()

-Peter
peterlanoie.blog
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sitemap melania ASP.NET 3.5 Basics 0 October 27th, 2008 01:20 PM
sitemap and navigation help -Dman100- ASP.NET 2.0 Basics 0 July 17th, 2006 10:28 PM
Sitemap Problems mattid ASP.NET 2.0 Basics 1 May 29th, 2006 01:13 AM
sitemap generators zoltac007 ASP.NET 2.0 Basics 1 May 22nd, 2006 11:02 AM
chapter 3 sitemap try it out diango BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 January 16th, 2006 11:40 AM



All times are GMT -4. The time now is 09:43 AM.


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