|
-
Jul 15th, 2004, 11:20 PM
#1
FormsAuthentication question
I'm using FormsAuthentication.RedirectFromLoginPage() and I dont have a default.aspx page for my application. So if I open a new browser window and go to the login page, it tries to go to the default page and I get an error. Is there any way to define a default page for the redirection?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jul 16th, 2004, 04:56 AM
#2
You can check if returnURL parameter exists and if it doesn't set an authentication ticket and redirect to a page of your choosing instead.
VB Code:
If Request.Params("ReturnURL") Is Nothing Then
FormsAuthentication.SetAuthCookie(strUsername, False)
Response.Redirect("Main.aspx")
Else
FormsAuthentication.RedirectFromLoginPage(strUsername, False)
End If
-
Jul 17th, 2004, 11:40 PM
#3
Originally posted by Fishcake
You can check if returnURL parameter exists and if it doesn't set an authentication ticket and redirect to a page of your choosing instead.
VB Code:
If Request.Params("ReturnURL") Is Nothing Then
FormsAuthentication.SetAuthCookie(strUsername, False)
Response.Redirect("Main.aspx")
Else
FormsAuthentication.RedirectFromLoginPage(strUsername, False)
End If
Thank you!
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|