Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 2 of 2

Thread: Please make sure all servers are using Time Synchronization

  1. #1
    Rob is offline Senior Member
    Join Date
    Aug 2004
    Posts
    3,037

    Default Please make sure all servers are using Time Synchronization

    Admin Users are Unable to Log into the Site, Login Fails with no Error Message


    Symptoms


    When trying to log into the admin site, the user is continually returned to the admin login screen without any error message whatsoever. It may appear that the admin site attempts to load, and then forces the user back to the login page (this generally all occurs in less than one second). The account is not locked out after exceeding the failed login threshold, and the database is not showing bad logins for the user in the customer table.



    Potential Causes


    We have identified two scenarios that may cause this behavior to occur.



    Time Synchronization



    If the website and SQL database are installed on separate servers, the clocks MUST be reasonably synchronized and the servers must be set to the same time zone. AspDotNetStorefront uses the SQL GetDate() function to set the last activity time for admin users. If your web server is out of synch with the SQL server, there is a possibility that the last activity time will fall outside of the admin session timeout limitations, at which point the admin will be logged out immediately as the cart believes their session to be invalid.



    To verify this is the case, use the following procedure:



    Download the TimeCheck.zip file from http://www.aspdotnetstorefront.com/dlx/Timecheck.zip


    Extract the timecheck.aspx file and upload it to the root of your site.


    Attempt to log in to your admin site.


    Immediately afterwards, go to www.yoursite.com/timecheck.aspx and make note of the time returned. This is the current time on the web server.


    Connect to your SQL Database using Microsoft SQL Management Studio, Enterprise Manager, or your host’s SQL query tool.


    Open a new query and issue the following statement:


    SELECT cs.LastActivity

    FROM CustomerSession cs

    JOIN Customer c ON cs.CustomerID = c.CustomerID

    WHERE c.Email = 'Your admin user email account'



    Compare the last activity time with the time reported in step 4. These times should match almost exactly. If the difference between the two is greater than the amount specified in the Admin.SessionTimeout AppConfig parameter you are likely to experience the problem described in this article. To resolve the issue, synchronize your server clocks.


    There are a number of utilities that can be used to synch the time between servers. One of the easiest methods is to use the windows time service that is included with Windows 2000 (SP 4 or later), Windows XP, and Windows Server 2003.





    Role Management



    In previous versions of the software, attempting to enable role management on the AspDotNetStorefront site (or a parent site thereof) in IIS would cause this behavior. Ensure that role management has not been enabled by doing the following:



    Open IIS Manager


    Right click the AspDotNetStorefront website and go to Properties


    Go to the ASP.NET Tab


    Click Edit Configuration


    Go to the Authentication Tab


    Ensure the Membership Provider Class is AspNetSqlMemebershipProvider


    Ensure that Role management enabled is UNCHECKED


    Apply any changes and reset IIS
    Last edited by AspDotNetStorefront Staff - Scott; 09-28-2009 at 06:48 AM.

  2. #2
    etessau2 is offline Junior Member
    Join Date
    Mar 2009
    Posts
    8

    Thumbs up

    Thank you for this post. We were timing out after 30 seconds of inactivity! Turns out the web server was drifted 14 minutes past the SQL server.