This project has moved. For the latest updates, please go here.

User gets logged out unexpectedly from admin at Hostexcellence

Jun 9, 2011 at 3:57 PM

I have a graffiti site running on domain.com at hostexcellence and another on sub.domain.com.

The sites themselves run fine. The problem is that when I log in in the admin, after a few minutes I suddenly get logged out. If I log in in 2 different browsers, the logout happens in both browsers at exactly the same time.

This happens in both sites.

Their customer support said I should add the following to the web.config. I did, but it doesn't seem to have helped:

<system.web>

        <sessionState mode="StateServer"
            stateConnectionString="tcpip=127.0.0.1:42424"
            cookieless="false"
            timeout="20"/>

 

I have a third graffiti site running on a different account at the same provider, and that one does not have this problem. The only difference is, that it does not have another graffiti site running on a subdomain.

Any suggestions?

Coordinator
Jun 13, 2011 at 1:32 AM

That is really odd. I'm not sure why anything like that would happen, because a subdomain should be treated just like a site on a completely separate domain. I have my company site on my root domain and have several client "test" sites running on subdomains and I don't think I've ever seen this issue. My guess is that the issue lies somewhere in the hosting company's settings, but I wouldn't know where to start to look, since I'm not really an IIS admin.

Coordinator
Jun 13, 2011 at 2:48 PM

You can remove that Session state configuration as Graffiti doesn't use it.

If you ever have problems staying authenticated in asp.net, first thing to do is to set a Machine Key - http://msdn.microsoft.com/en-us/library/ms998288.aspx#paght000007_machinekeyexplained .  Roughly speaking this defines the keys used to encrypt & decrypt authentication cookies.  Depending on your hosting environment, the default keys may get randomly regenerated so setting explicit keys in web.config resolves the issue.

Jul 19, 2011 at 6:01 PM

Now I have the same problem with another customer, also at HostExcellence. His site has been running fine for the past year. Now suddenly he keeps getting logged out constantly.

I will try the machine key thing.

Jul 20, 2011 at 2:29 PM

Seems that that did the trick. Thanks afscrome.