1

We have RIA which checks a project version by calling MVC controller. If version when project was started and version on the server is different then user get a message to update browser in order to get the last updated version.

Javascript:

function versionControl() {
    $.ajax({
        url: "Home/VersionControl",
        success: function (result) {
            if (result != App.version) {
                Notification.Show("version-update");
            }
        }
    });
    setTimeout(versionControl, 300000);
}

Controller:

    public string VersionControl()
    {
        return ConfigurationManager.AppSettings["ScriptVersion"];
    }

Problem is if I have session 8 hours and function versionControl() is called the session will never end.

Question: How to check version without extending session time?

Anupam Jain
  • 7,851
  • 2
  • 39
  • 74
podeig
  • 2,597
  • 8
  • 36
  • 60
  • 3
    Either of these seems like what you're after http://stackoverflow.com/questions/2250940/enable-disable-session-state-per-controller-action-method http://stackoverflow.com/questions/1464203/disable-session-state-per-request-in-asp-net-mvc – Chris Chilvers Jun 03 '11 at 09:48

0 Answers0