473,394 Members | 1,739 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Cannot redirect to desire page

I have set the following parameters in web.config to prevent user direct
access the web page without user login.
<authentication mode="Forms">
<forms loginUrl="Initial/index.aspx" name="adAuthCookie"
timeout="60" path="/" >
</forms>
</authentication>

The application did success to redirect to login page, but it cannot
redirect back to desire page which I specify in URL. What's wrong with my
setting or do i need to add some code in the aspx file??

Million Thanks

Nov 18 '05 #1
1 1793
Here's a code sample for redirection. You'll be most interested in the line
reading "FormsAuthentication.RedirectFromLoginPage(... )" under step 4:
http://msdn.microsoft.com/library/de...entication.asp.

Also, take a look at the documentation for the FormsAuthentication class
(http://msdn.microsoft.com/library/de...-us/cpref/html
/frlrfsystemwebsecurityformsauthenticationmembersto pic.asp) for more
information regarding the RedirectFromLoginPage() method.

I've not used forms authentication extensively but I played with it a while
back. If memory (and a little reading) serves me correctly, when accessing
a site under forms authentication, the user is redirected from the page
being requested to the login page. Upon successful
authentication/authorization, the RedirectFromLoginPage() method will return
the user to the originally requested page. You can check the value returned
by the GetRedirectUrl() method to determine which page was originally
requested and determine from there if you should use RedirectFromLoginPage()
or Response.Redirect (or Server.Transfer).

"Grey" <er*******@i-cable.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
I have set the following parameters in web.config to prevent user direct
access the web page without user login.
<authentication mode="Forms">
<forms loginUrl="Initial/index.aspx" name="adAuthCookie"
timeout="60" path="/" >
</forms>
</authentication>

The application did success to redirect to login page, but it cannot
redirect back to desire page which I specify in URL. What's wrong with my
setting or do i need to add some code in the aspx file??

Million Thanks

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Bob | last post by:
I am displaying a form with a datagrid populated from a select of database records which now exceed 12,000 when I select them all. The form displays just fine with all 12,000+ entries but when I...
3
by: Vardan Kushnir | last post by:
Please forgive me if my English is poor. Also please tell me if this is wrong place to ask this question and tell me better place. When searching web for information Re: .htaccess and...
8
by: msnews.microsoft.com | last post by:
I want to redirect the user to a url outside of our website but I want it to preserve our application's window by opening a new window. We have a datagrid that has five hyperlink columns containing...
3
by: Adie | last post by:
Hi, Ive recently updated our companies site and have been looking at the server logs and it appears a bunch of people are entering the site at specific pages that no longer exist. I wonder if...
6
by: DotNetGruven | last post by:
I've got a page that does a search... There is an ImageButton on it that allows the user to reset the search. The Click Handler for the button clears out the Data and then redirects to the same...
2
by: caldera | last post by:
Hi, I have a authentication from form authentication. It is redirect to an other web page. But it isnot redirected to desire page. What is reason for this problem and how can I solve this...
8
by: Andreas Klemt | last post by:
Hello, I get this error Message "cannot redirect after http headers have been sent" when I do this response.redirect ("home.aspx") How can I find out with vb.net if already a http header has...
3
by: Thomas | last post by:
Hi All, i am getting this error once i submit my page to a payment gateway and when it returns the reponse back. Redirect URI cannot contain newline characters. Description: An unhandled...
3
by: j-in-uk | last post by:
Hi, I'm using the login control for asp.net 2.0. Once a user logs in I want to set timeouts for certain pages not the whole app, so if the page they on has expired I want to redirect the user...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.