Link to home
Start Free TrialLog in
Avatar of Sheritlw
SheritlwFlag for United States of America

asked on

??? Login won't redirect on server

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

Avatar of ong-hh
ong-hh

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.
ASKER CERTIFIED SOLUTION
Avatar of Alfred A.
Alfred A.
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sheritlw

ASKER


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

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.