473,508 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Custom redirectURL

In Forms based authentication mode, say my login page has to be
redirected to "db.aspx" if the login was successful, how do I supply
this redirect without a Response.Redirect() using FormsAuthentication
class?

If I simply say,

If MyDatabaseUserAuthenticationMethod(txtUserName.Tex t,
txtPassword.Text) Then
FormsAuthentication.RedirectFromLoginPage(txtUserN ame.Text, False)
Else
lblMessage.Text = "Please jump into the well and die."
End If

and if the user logs in correctly, then he will, by default, be
redirected automatically to the "default.aspx" page if it exists. If
the page does not exist, he will come back to the login page because no
where in the login page have we specified an equivalant of the
primitive "action" attribute that tells whom to POST the page to, so
the same page will recieve a POSTBACK.

How do I tell ASP.NET that if the forms based authentication is
successful, take this guy to this page, say, "db.aspx"?

Nov 21 '05 #1
2 1223
it depends on what the user initially requested ,,,

if he comes to www.yourdomain.com the default is ofcourse default.aspx
( however you may change this in IIS )
and will after succesfull validation be redirected to this page

however if was asked www.yourdomain.com/db.aspx then it willredirect to
this page and not to the default page
without you having to write a single line of code . :-)

regards

Michel Posseth [MCP]

"Water Cooler v2" <wt*****@yahoo.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...
In Forms based authentication mode, say my login page has to be
redirected to "db.aspx" if the login was successful, how do I supply
this redirect without a Response.Redirect() using FormsAuthentication
class?

If I simply say,

If MyDatabaseUserAuthenticationMethod(txtUserName.Tex t,
txtPassword.Text) Then
FormsAuthentication.RedirectFromLoginPage(txtUserN ame.Text, False)
Else
lblMessage.Text = "Please jump into the well and die."
End If

and if the user logs in correctly, then he will, by default, be
redirected automatically to the "default.aspx" page if it exists. If
the page does not exist, he will come back to the login page because no
where in the login page have we specified an equivalant of the
primitive "action" attribute that tells whom to POST the page to, so
the same page will recieve a POSTBACK.

How do I tell ASP.NET that if the forms based authentication is
successful, take this guy to this page, say, "db.aspx"?

Nov 21 '05 #2
it depends on what the user initially requested ,,,

if he comes to www.yourdomain.com the default is ofcourse default.aspx
( however you may change this in IIS )
and will after succesfull validation be redirected to this page

however if was asked www.yourdomain.com/db.aspx then it willredirect to
this page and not to the default page
without you having to write a single line of code . :-)

regards

Michel Posseth [MCP]

"Water Cooler v2" <wt*****@yahoo.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...
In Forms based authentication mode, say my login page has to be
redirected to "db.aspx" if the login was successful, how do I supply
this redirect without a Response.Redirect() using FormsAuthentication
class?

If I simply say,

If MyDatabaseUserAuthenticationMethod(txtUserName.Tex t,
txtPassword.Text) Then
FormsAuthentication.RedirectFromLoginPage(txtUserN ame.Text, False)
Else
lblMessage.Text = "Please jump into the well and die."
End If

and if the user logs in correctly, then he will, by default, be
redirected automatically to the "default.aspx" page if it exists. If
the page does not exist, he will come back to the login page because no
where in the login page have we specified an equivalant of the
primitive "action" attribute that tells whom to POST the page to, so
the same page will recieve a POSTBACK.

How do I tell ASP.NET that if the forms based authentication is
successful, take this guy to this page, say, "db.aspx"?

Nov 21 '05 #3

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

Similar topics

4
3429
by: jjjooooohhnnn | last post by:
Greetings, I have encountered what appears to be a fairly common problem: RedirectFromLoginPage is not redirecting to RedirectUrl. I have tried all the advice that I could on the 'net, and...
5
2513
by: Graham | last post by:
I have created a custom MembershipProvider called "LassieMembershipProvider" that derives from "MembershipProvider". This providor is located in a Businesslogic layer dll called...
2
2565
by: Suzanne | last post by:
Hi all, I'm reposting this message as I'm experiencing this problem more and more frequently : I really hope someone out there can help me as I've been tearing my hair out on this one for a...
27
45488
by: Wayne | last post by:
I've been clicking around Access 2007 Beta 2 and can't see the custom menu bar designer. Is it in the beta? Maybe I'm blind. The question that comes to mind is: Will custom menu bars be the same...
1
4979
by: Jakob Lithner | last post by:
When I started a new ASP project I was eager to use the login facilities offered in Framework 2.0/VS 2005. I wanted: - A custom principal that could hold my integer UserID from the database -...
15
6474
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
2
19404
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
1
4365
by: asharda | last post by:
I have a custom property grid. I am using custom property grid as I do not want the error messages that the propertygrid shows when abphabets are entered in interger fields. The custom property...
0
2897
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
7227
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
7331
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
7391
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
7501
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...
1
5056
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4713
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1564
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
768
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
424
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.