Membership Database

Discussion in 'General troubleshooting' started by Andy, Oct 17, 2010.

  1. I've been having the same problem. Also tried a lot of different solution but nothing really worked. I know it is something on the Winhost servers that causes the problem since when I'm developing the website on my local server I'm not getting logged out.

    I recently switched to the Sql Session State method instead of inproc but the problem still persists.

    I've checked the conditions you told us about, Ray.
    The first one is deffinitly not reached since it happens after a couple minutes already. The duration may vary which means it might be one of the other Treashold values. Problem is I don't know how to check these.

    Any idea how we could figure that out?
    Thx for your help!
     
    Last edited by a moderator: Oct 14, 2015
  2. Ray

    Ray

    Try opening a ticket to the support department and have them check the Event log. It should show if your application pool is reaching any of the thresholds I stated. Also give them detailed instructions on how to replicate the problem on their end. They can run through the test and monitor the server and let you know what is going on with your application pool.
     
  3. looks like this is a hard one ;) I haven't managed to fix it eather.

    I'll try to make an account for the support staff so they can replicate the problem since it only happens when being logged in.
     
  4. Ray

    Ray

    Do you have test account we can use to log in?
     
  5. After sending in a ticket, the admin (Mundo) told me the same as Ray did: I'm using more then 100 Mb of memory.

    I'll probably have to recheck my code and try to improve it.

    He also gave me a link to something that might be helpfull. I haven't tried it yet but here is a copy of what he said:

    Thx to everyone who helped tracking down the problem.
     
  6. It looks like the problem is still not resolved. I've tried to improve my website but I'm still being logged out while navigating through the pages.

    The strange thing is that I can go to a page and stay logged in while I get logged out when I come back to that same page later. It doesn't make any sense.

    I'm using the sql server to save my session state info along with cookies.

    If anyone got more/other ideas let me know!
     
  7. Ray

    Ray

    Do you have a link for us to look at? Give us a test account to use.
     
  8. this seems like a similar problem to one I was having and as I posted on another thread a solution might be found here:


    http://stackoverflow.com/questions/4...a-minute-or-so

    which allows sessions to survive application pool recycles and stopped my users being logged out every few minutes...

    In case the post dies the jist of it is to add specific machine keys to the web config to stop them being regenerated when the application restarts:

    <system.web>
    ...
    <machineKey
    decryption="AES"
    validation="SHA1"
    decryptionKey="..."
    validationKey="..."
    />
    where decryptionKey and validationKey are hex strings of length depending on the algorithm (with AES: 64 digits and SHA1: 128, for other algorithms check MSDN).

    These keys should be cryptographically generated, and .NET has the types to do this which can be used from PowerShell:

    $rng = New-Object "System.Security.Cryptography.RNGCryptoServiceProv ider"
    $bytes = [Array]::CreateInstance([byte], 16)
    $rng.GetBytes($bytes)
    $bytes | ForEach-Object -begin { $s = "" } -process { $s = $s + ("{0:X2}" -f $_) } -end { $s}
    For AES use the above array length, for SHA1 use a length of 64.
     
  9. Ray

    Ray

    Last edited by a moderator: Oct 14, 2015
  10. Thx for this solution! It seems to work this time by adding those machine keys!
     
  11. Ray

    Ray

    Yes, you certainly can use this site to generate your Machine Key. The default hash algorithm that IIS 7 uses for the Machine key is SHA-1. And you do not need the IIS 7 Manager to setup the machine key. You can simply access your applications web.config file and input the elements and values directly. This of course is a little more complicated if you are not used to the XML elements in the ASP.Net web.config file.
     

Share This Page