Issue with response/session state using load balance RRS feed

  • Question

  • User1122266241 posted

    Hi ,

    I was developing a web application using ASP.NET MVC 4.0, everything working fine in local code. But when we deployed application to windows server 2012(IIS 8.5) we are facing a very strange issue.

    In my application i am displaying current looged in user name using below code.

    <span>Welcome, "@User.Identity.Name.ToUpper()".</span>

    Its working fine , but the issue is suppose two users running the application in their machine at same time then both the users getting same Name displayed(users getting other user's name) and its randomly happening. In entire application i have not used session related code also have not used any cookies or caching anywhere. sometimes user getting "Proxy Error 502.0...etc"

    Using windows authentication, and web.config is below,

    <authentication mode="Windows"></authentication>
       <allow users="*"></allow>
       <deny users="?"></deny>
    <customErrors mode="Off"></customErrors>
    <sessionState mode="InProc" />

    In servers also i made the change for Authentication, Windows auth is enabled and anonymous is disabled.

    We are using two servers with load balancing, so for testing purpose i stopped one server but still issue is reproducible.

    Please help me on this strange issue, since last week am facing this issue.

    Thanks and Regards,


    Tuesday, August 23, 2016 8:32 PM

All replies

  • User753101303 posted


    Then it seems the only place where you could still have some caching going on would the proxy server. Can you try without this proxy server? Could it be configured to force caching?

    For example I would add the current date/time as well to see how fresh it is and to try to confirm if it appears to be a caching issue.

    Try perhaps https://technet.microsoft.com/en-us/library/bb794799.aspx for the http 502 error (but for this one it seems it might be better to check rather a network admin group. Also I would likely try to fix that first as it seems to mean something is really wrong with the proxy).

    Edit2: use also maybe F12 to inspect the http requests using browser developer tools and to make 100% sure about which caching options are used at least for the http level. You are 100% sure you are not using caching anywhere yourself on the server side?

    Tuesday, August 23, 2016 9:41 PM