"The return URL specified for request redirection is invalid" error when using forms authentication


In SharePoint Server 2007, when you try and login to a forms-based site the .RedirectFromLoginPage results in the following error:

"The return URL specified for request redirection is invalid"

Basically, this would happen when you navigate to a URL like http://server/_layouts/login.aspx?ReturnUrl=default.aspx%3f%3a 

So, why does this happen ?

This is a problem with the URL validation on the login.aspx page. The reason why this fails is because we have the ' : ' colon character (the escape character ‘ %3a ’ in the query string. The URL query string validator does not seem to like the colon character at all.

The colon is a reserved character, per the URI RFC. You CANNOT put an unencoded ' : ' in the query or hash of a URI, period.

One workaround would be the need to %-encode the colon.

Another one would be to use a code snippet. For more information on this, please see http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/cf27c390-07b1-4a48-b337-130a8e220069

Comments (15)
  1. Anonymous says:

    ,polo hollister
    Ukraine’s National Security Bureau news announceme polo hollister nt says,abercrombie brasil, "in January 4th,air max femme pas cher, accordi abercrombie brasil ng to Tymoshenko’s lawyer,piumini peuterey, Fra SAST’s request,peuterey

  2. Anonymous says:

    After the

    ,timberland earthkeepers
    politics as "chess game timberland earthkeepers ,chaussure louboutin femme, Nao chaussure louboutin femme to Kan wrong board" is the general. The 12 day,blusa abercrombie, the ruling Democratic Party of Japan

  3. Anonymous says:

    abercombie 2003 piumino peuterey December to 2009 July

    Croatia anti-corruption Department conducted a number of surveys of Mr Nader,piumino peuterey, i escarpins louboutin ncluding the investigation of alleged breach of privilege and

  4. Anonymous says:

    it is repo nike air max tn rted,nike air max tn, "33 days" is directed by Teng Huatao and starring will de soldes hollister but at the fourth Okinawa International Film Festival, in March 24th to 31 day held in Okinawa Naha and ancient town. This film

  5. Anonymous says:

    ,louboutin so louboutin soldes ldes
    inter timberland outlet national online report on March 27th South Korean singer Tablo belonged to YG entertainment said 26 days,timberland hollister outlet outlet, the artist’s Tablo’s father in Korea 26 (today)

  6. Anonymous says:

    ,loubou louboutin prix tin prix
    many small and medium cost films also love the use of i tn pas cher nland star, Sichuan sister Deng Jiajia has been the darling, appear in this film festival is for the film "Baoshima Douxiong" (micro-blog) pla nike tn

  7. Anonymous says:

    see photos of users have a mess peuterey prezzi age: "now very well",peuterey prezzi, "that you really do the opera peuterey donna tion.". Li Yizhi / text copyright Han Xingwang prohibited reproduced

    Super Junior members,peuterey donna.The Sina

  8. Anonymous says:

    Regulat scarpe timberland uomo ion of

    ,scarpe timberland uomo
    Aguer said: "Gaye has been nike air max in the last week with the people’s Liberation Army of Sultan signed the cease-fire agreement. A gang he led the armed factions in the intentional

  9. Anonymous says:

    Syria riots after, tn pas cher Assad to stabilize the situation more than once to make c peuterey donna oncessions to the opposition,tn pas cher, including the restructuring of the cabinet,peuterey donna, the end of nearly air max 2014 half a century

  10. Anonymous says:

    Recently, become the water industry landmark event, which me hollister magasin ans that more than si abercrombie france x of the public cultural life level is still at the primary stage. become the social public to the public cultural demand. but arrived

  11. Anonymous says:

    people.com.cn entertainment news; a year late timberland milano r,timberland milano, the end of Beijing, Karen Mok of Shanghai yar holister d "back to the" personal concert in Chengdu popular success, hot stature of Karen Mok at the scene like Chengdu

  12. Anonymous says:

    AP-GfK during the period nike air max tn from October 13th tn pas cher to 17,nike air max tn, the fixed telephone and mobile phone survey of 10000 adults USA. The results show,tn pas cher, half American said Obama should not be re peuterey elected president

  13. Anonymous says:

    in new network on nike air max 26 September,nike air max, according to foreign soldes hollister reports, the Democratic Republic of Congo (hereinafter referred to as the Congo (DRC)) an official said,soldes hollister holister france , the 25 day,holister

  14. Anonymous says:

    ,air max air max 1 1

    Annan a tiffany jewelry nd his working group is currently working with the Syria government and the opposition parties to keep in touch,tiffany jewelry, to ensure the implement tiffany ation of the ceasefire commitment.

  15. Anonymous says:

    the city on the tiffany & co 24 day 17 am to 25 noon to stop water supply,tiffany & co.

    A staff memb boutique hollister er of the company customer service department to reporters,boutique hollister, "this album was recorded,nike air max hyperfuse,"

Comments are closed.

Skip to main content