Solved

??? Login won't redirect on server

Posted on 2011-02-24
4
357 Views
Last Modified: 2012-05-11
Hi EE,

This is so weird to me but, when I'm testing my web on my local machine my redirect works, when hosted on server, it doesn't redirect.
I tried several ways to redirect but none of them work.
What could be causing this?
The site is service2020.com.
Test user = testing, password = testing1

Thanks
Private Sub Login1_LoggedIn(ByVal sender As Object, ByVal e As System.EventArgs) Handles Login1.LoggedIn
      Dim r As String = String.Empty
      If String.IsNullOrEmpty(Request.QueryString("ReturnUrl")) Then
         ' please don't use User.IsInRole here , because it will not be populated yet at this stage.  
         If Roles.IsUserInRole(Login1.UserName, "admin") Then
            ' r = "Service2020/Stylist/Client_Services.aspx"

            Response.Redirect("Stylist/Client_Services.aspx")
         ElseIf Roles.IsUserInRole(Login1.UserName, "Client") Then
            Response.Redirect("Clients/Default.aspx")
         ElseIf Roles.IsUserInRole(Login1.UserName, "Stylist") Then
            Response.Redirect("Stylist/Client_Services.aspx")
         ElseIf Roles.IsUserInRole(Login1.UserName, "Other") Then
            Response.Redirect("Stylist/Client_Services.aspx")
         End If
         If Session("UserID") = Nothing Then
            Dim s As String = Nothing
            Dim u As New SalonUtilities
            s = u.CheckSessionAndReturnUser
         End If
      Else
         r = "string empty"
      End If
   End Sub

Open in new window

0
Comment
Question by:Sheritlw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 4

Expert Comment

by:ong-hh
ID: 34976107
Are you testing on the server using IE?
If Yes, please check the security tab in internet options.
By default the security are set to high, set to medium/medium low.
0
 
LVL 21

Accepted Solution

by:
Alfred1 earned 500 total points
ID: 34976143
Try redirecting by setting the endResponse parameter to true.

Response.Redirect("Stylist/Client_Services.aspx", true)

http://msdn.microsoft.com/en-us/library/a8wa7sdt%28v=VS.100%29.aspx


0
 

Author Comment

by:Sheritlw
ID: 34976223

Putting the true in the response worked, somewhat.

Another weird thing... It redirected to the correct page, but only the menu (from master page) shows and not the context page.
I have to re-load in order to show the whole page????

What's going on?

Thanks
0
 

Author Comment

by:Sheritlw
ID: 34976622

Not sure what is going on with the blank page, but I imagine it has something to do with the page and not with the redirect.

Thank you for your help.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question