Authentication doesn't "stick"!

Discussion in 'Site Programming, Development and Design' started by PawtucDave, Oct 30, 2011.

  1. I've copied my web site Winhost. I have not updated DNS yet because I want to be sure I'm happy here (I'm trying to get away from another hosting service) I'm still have my database on the other provider's server, and can access it with no problem.

    Since I've not changed DNS, I have to test my web using the secondary;
    http://lpiproco.w01.Winhost.com

    Everything seems to be working well, except that every few page changes I seem to lose authentication. Every page in my site has this in the Page_Load event which is occasionally true even after I've logged in;
    Code:
            If Not User.Identity.IsAuthenticated Then
                Response.Redirect("~/Forms/Authenticate/Login/Login.aspx")
            End If

    I also got the following message once during testing;
    Server Error in '/' Application.
    --------------------------------------------------------------------------------
    Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

    Thoughts?
     
    Last edited by a moderator: Oct 14, 2015
  2. Elshadriel

    Elshadriel Winhost Staff

    Last edited by a moderator: Oct 14, 2015

Share This Page