473,320 Members | 1,961 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,320 software developers and data experts.

FormsAuthentication (web app)

i have prepared my web config file as follow;
<authentication mode="Forms" >

<forms name="jedi" loginUrl = "WebForm1.aspx" protection = "All" timeout =
"10" path="/"></forms>

</authentication>

<authorization>

<deny users="?" />

</authorization>

i have write code for login page as follow;

FormsAuthenticationTicket ticket = new
FormsAuthenticationTicket("jedi",false,10);

after here how i can redirect to page that i want

if i use

FormsAuthentication.RedirectFromLoginPage("jedimus tdie",false);

it rediretcs me to ReturnUrl

thank in advance
Nov 15 '05 #1
2 1499
Hi,

Instead of using RedirectFromLoginPage function which
redirects to the page initially request or the default
page, use SetAuthCookie or GetAuthCookie which will allow
you to redirect to any page you what.

http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/cpref/html/frlrfsystemwebsecurityformsauthenticationcla
ssgetauthcookietopic.asp

http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/cpref/html/frlrfsystemwebsecurityformsauthenticationcla
ssgetauthcookietopic1.asp

Hope this helps...

Regards,
Madhu

MVP | MCSD.NET
-----Original Message-----
i have prepared my web config file as follow;
<authentication mode="Forms" >

<forms name="jedi" loginUrl = "WebForm1.aspx" protection = "All" timeout ="10" path="/"></forms>

</authentication>

<authorization>

<deny users="?" />

</authorization>

i have write code for login page as follow;

FormsAuthenticationTicket ticket = new
FormsAuthenticationTicket("jedi",false,10);

after here how i can redirect to page that i want

if i use

FormsAuthentication.RedirectFromLoginPage ("jedimustdie",false);
it rediretcs me to ReturnUrl

thank in advance
.

Nov 15 '05 #2
"Madhu [MVP]" <an*******@discussions.microsoft.com> wrote in message
news:07****************************@phx.gbl...

http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/cpref/html/frlrfsystemwebsecurityformsauthenticationcla
ssgetauthcookietopic.asp

http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/cpref/html/frlrfsystemwebsecurityformsauthenticationcla
ssgetauthcookietopic1.asp


Please use < and > on each side of an URL to prevent linebreaks.

Cheers
Rolighed
Nov 15 '05 #3

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

Similar topics

3
by: T. Regan | last post by:
I have a test app where I have Forms Authentication set up. When I build and run the app as http://localhost/testapp/login.aspx, it runs correctly. I get the login prompt and the proper...
3
by: Fredrik Elestedt | last post by:
Hi, I've been trying to use FormsAuthentication agains windows users and groups - not Active Directory. I couldn't find any articles on this directly, not to say that there aren't any out...
2
by: Grant Merwitz | last post by:
Hi, i am using forms authentication in an ASP.NET project I am setting the Forms authentication cookie by using: FormsAuthentication.RedirectFromLoginPage(UserName.Text, false); Now when i...
1
by: Dean R. Henderson | last post by:
I setup FormsAuthentication on a couple websites where it has been working as expected for a long time. I used this code to setup the same type of authentication on a new website I am working on...
1
by: Jeremy Chapman | last post by:
I have built a web app. While testing I have found that if I browse to a page in the app, then get redirected to the login page and enter my credentials. The...
5
by: Åženol Akbulak | last post by:
Hello; I use in my web application FormsAuthentication. Also I use Session state (InProc). When a user logged in, I can read Session parameters. (For example Session). Problem is that, when...
3
by: Noremac | last post by:
My google skills must be dwindling. I am trying to determine how in ASP.NET 2.0 I can get the ReturnUrl querystring variable in Forms Authentication to contain the absolute url. Just like others...
2
by: rn5a | last post by:
A web.config file has the following code: <configuration> <system.web> <authentication mode="Forms"> <forms name="NETConnectCookie" loginUrl="Login.aspx"> <credentials passwordFormat="SHA1"/>...
2
by: john | last post by:
Hi, I am using FormsAuthentication in my web app. I was wondering if I could add some user specific data to the FormsAuthentication cookie. Is this possible? Thanks
0
by: Rodrigo m. Ferreira | last post by:
Can you help me to solve the following problem? on my loggin page I have the code: protected void LoginButton_Click(object sender, EventArgs e) { if(Membership.ValidateUser(TXTUsuario.Text,...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.