Wrox Programmer Forums
|
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals 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 6th, 2012, 11:10 AM
Registered User
 
Join Date: Feb 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default returnurl issue

Hi Folks,
Recently I have a very very annoying issue crop up and cannot seem to get it solved.

I have a ASP.NET application on my server (IIS) in which default.aspx is the only default content page. I am using forms authentication and everything works well.....apart from one thing.

If I visit:

http://<myserver>/PMS

it turns into:

http://<myserver>/PMS/Default.aspx?ReturnUrl=%2fpms

which means that when I log in it redirects me to the homepage again (http://<myserver>/PMS) which in effect logs me out. Therefore I have to log in again when it does take me to the main menu as the second time the returnurl has gone.

any ideas how I can get it so that the returnurl does not appear when I visit my site?
 
Old February 13th, 2012, 07:38 AM
Friend of Wrox
 
Join Date: Nov 2009
Posts: 156
Thanks: 13
Thanked 16 Times in 16 Posts
Default web.config

Hi my friend

in web.config you can set some parameters

<Authentication Mode="Forms" defaultUrl="Default.aspx" loginUrl="login.aspx" />

set loginUrl to know that is authentication problem or not.
__________________
happy every time, happy every where

Reza Baiat

Last edited by irProject; February 13th, 2012 at 07:46 AM..
 
Old February 13th, 2012, 10:24 AM
Registered User
 
Join Date: Feb 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi there,
Thanks for the reply! My Web.config is currently set as below:

<authentication mode="Forms">
<forms name=".ASPXAUTH" loginUrl="Default.aspx" defaultUrl="MemberPages/mainMenu.aspx" protection="All" path="/" timeout="60" />
</authentication>

so I am still stumped!
 
Old February 13th, 2012, 10:28 AM
Friend of Wrox
 
Join Date: Nov 2009
Posts: 156
Thanks: 13
Thanked 16 Times in 16 Posts
Default yes

Hi mtullockTwice
so you can implement your login inteface in default.aspx
__________________
happy every time, happy every where

Reza Baiat
 
Old February 13th, 2012, 10:59 AM
Registered User
 
Join Date: Feb 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi
Thats right, The user types in:

server/PMS

and they are immediately presented with the login screen (default.aspx). However the system automatically puts the

server/PMS/Default.aspx?ReturnUrl=%2fPMS%2f

in by default, and then of course if they log in they are redirected back to the login screen. its really doing my head in! :)

Cheers
Magnus





Similar Threads
Thread Thread Starter Forum Replies Last Post
Not sure Excel issue or Batch file issue - Application.Workbooks("Book2.xls").Close justinferns Excel VBA 3 October 4th, 2011 03:09 PM
returnURL zondre BOOK: Professional ASP.NET MVC 1.0 ISBN: 978-0-470-38461-9 0 May 24th, 2009 02:22 PM
Firefox issue timeout08 Dreamweaver (all versions) 2 September 29th, 2008 02:55 PM
Login ReturnURL and SiteMap robzyc ASP.NET 2.0 Basics 5 May 3rd, 2008 03:05 PM
Another issue islandtiu BOOK: Beginning ASP 3.0 1 February 14th, 2005 11:49 AM





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