"Object moved to here" error on sign in or out using membership package Options
bruceb
Posted: Thursday, February 14, 2008 12:04:55 PM
Rank: Devotee

Joined: 9/7/2007
Posts: 32
Has anyone else had this error and found a resolution?

I get this message after signing in or out from the homepage only (root page http://sitename/)

I am using directory URLs.

Refreshing the page after this error loads the page correctly.
bruceb
Posted: Thursday, February 14, 2008 1:11:12 PM
Rank: Devotee

Joined: 9/7/2007
Posts: 32
If I turn off directory URLs it works ok
drewho
Posted: Friday, March 14, 2008 1:12:17 PM
Rank: Newbie

Joined: 3/14/2008
Posts: 2
I have the same problem.....only happens if i log in from the default.aspx, logging in from any other page it works fine.
daniel_l
Posted: Friday, March 14, 2008 1:32:59 PM
Rank: Aficionado

Joined: 6/25/2007
Posts: 146
Location: Malmo, Sweden
I had the same problem, along with several other strange bugs, using the login control.

I ended up modifying the login control. To address the issue mentioned here i changed so that the response is redirected at the end of the login button click event.

Like this:
Code:

string baseURL = getBaseURL() + "?ua=login";
Response.Redirect(baseURL, true);



and adding this function:

Code:

private static string getBaseURL()

{
            string Port = library.RequestServerVariables("SERVER_PORT");
            if (Port == null || Port == "80" || Port == "443")
                Port = "";
            else
                Port = ":" + Port;
            string Protocol = library.RequestServerVariables("SERVER_PORT_SECURE");
            if (Protocol == null || Protocol == "0")
                Protocol = "http://";
            else
                Protocol = "https://";

            // *** Figure out the base Url which points at the application's root
            return Protocol + library.RequestServerVariables("SERVER_NAME") + Port;
        }


I have a feeling there should be a better way to get the "baseURL" through the umbraco api but none of the ways I tested worked well enough.

The other changes I made includes fixing the problem with the cookie expiration that always kept the user logged in for 365 days and some other problems.

I also made some major changes to the Sign Up control, the version from codeplex was hardly functional at all, the validation and other stuff being broken. I also made a way to override the default Name property of a user on sign up, as I want to be able to separate first, middle and last names.

If there is interest in these modifications I could of course post the binaries and the code somewhere... No promise however when, as my schedule is tight...

Is it me or umbraco? Umbraco Certified Professional Level 2.
daniel_l
Posted: Friday, March 14, 2008 2:01:52 PM
Rank: Aficionado

Joined: 6/25/2007
Posts: 146
Location: Malmo, Sweden
One clarification; the "au=login" in my example should not be necessary, it was something that I needed for my specific solution. It is the baseURL stuff that fixes the above mentioned problem. And I have a feeling there should be a better and more simle way of solving this but at least the above code solves it for now.

Is it me or umbraco? Umbraco Certified Professional Level 2.
jHodgkinson
Posted: Friday, March 14, 2008 2:03:30 PM
Rank: Fanatic

Joined: 3/15/2007
Posts: 378
Location: Cary, NC USA
I've always used the RawUrl method, ie:

Response.Redirect(Request.RawUrl, true);
daniel_l
Posted: Friday, March 14, 2008 2:08:52 PM
Rank: Aficionado

Joined: 6/25/2007
Posts: 146
Location: Malmo, Sweden
John Hodgkinson wrote:

I've always used the RawUrl method, ie:

Response.Redirect(Request.RawUrl, true);



I tried that one, but for some reason it didn't work. Cannot remember why, but there was some issue with it in this scenario. I think I'll have to go back and test it again.

Is it me or umbraco? Umbraco Certified Professional Level 2.
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.