Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 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 Display Modes
  #1 (permalink)  
Old February 6th, 2012, 10:10 AM
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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?
Reply With Quote
  #2 (permalink)  
Old February 13th, 2012, 06:38 AM
Friend of Wrox
Points: 742, Level: 10
Points: 742, Level: 10 Points: 742, Level: 10 Points: 742, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2009
Location: Tehran, Iran
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 06:46 AM.
Reply With Quote
  #3 (permalink)  
Old February 13th, 2012, 09:24 AM
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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!
Reply With Quote
  #4 (permalink)  
Old February 13th, 2012, 09:28 AM
Friend of Wrox
Points: 742, Level: 10
Points: 742, Level: 10 Points: 742, Level: 10 Points: 742, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2009
Location: Tehran, Iran
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
Reply With Quote
  #5 (permalink)  
Old February 13th, 2012, 09:59 AM
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Reply With Quote
Reply


Thread Tools
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
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 10:49 AM



All times are GMT -4. The time now is 01:25 AM.


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