Tôi có thời gian chờ phiên được đặt thành 20min nhưng khi tôi cố gắng truy cập giá trị này từ hành động, tôi nhận được 1min thay thế.Sitecore 7,5 MVC và HttpContext.Session.Timeout đặt thành 1 phút
thiết lập Web.Config là:
<sessionState mode="InProc" cookieless="false" timeout="20">
<authentication mode="None">
<forms name=".ASPXAUTH" cookieless="UseCookies" timeout="20" />
</authentication>
Trong Global.asax.cs trong session_start giá trị của thời gian chờ là 20min:
HttpContext.Current.Session.Timeout
Nhưng trong hành động trong bộ điều khiển của tôi được thiết lập để 1 phút:
System.Web.HttpContext.Current.Session.Timeout
HttpContext.Session.Timeout
Tôi đã tìm thấy rằng khi tôi loại bỏ SitecoreHttpModule
đó là loại (Sitecore.Nexus.Web.HttpModule,Sitecore.Nexus
) từ web.config thời gian chờ hoạt động tốt nhưng tôi không nghĩ rằng tôi có thể loại bỏ nó vĩnh viễn.
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<remove name="WebDAVModule"/>
<add type="Sitecore.Web.RewriteModule, Sitecore.Kernel" name="SitecoreRewriteModule"/>
<!-- !!!REMOVED MODULE!!! <add type="Sitecore.Nexus.Web.HttpModule,Sitecore.Nexus" name="SitecoreHttpModule"/> -->
<add type="Sitecore.Resources.Media.UploadWatcher, Sitecore.Kernel" name="SitecoreUploadWatcher"/>
<add type="Sitecore.IO.XslWatcher, Sitecore.Kernel" name="SitecoreXslWatcher"/>
<add type="Sitecore.IO.LayoutWatcher, Sitecore.Kernel" name="SitecoreLayoutWatcher"/>
<add type="Sitecore.Configuration.ConfigWatcher, Sitecore.Kernel" name="SitecoreConfigWatcher"/>
...
</modules>
</system.webServer>
Tôi có thể định cấu hình thời gian chờ này cho mô-đun này hay không còn cách nào khác để đặt thời gian chờ của phiên thành giá trị mong muốn?
Bạn đã bật tính năng Sitecore Analytics chưa? –
Có, Sitecore Analytics được bật. –
Tôi đã cố gắng vô hiệu hóa Analytics trong Sitecore.Analytics.config và thời gian chờ hoạt động tốt, được đặt thành 20 phút. Bất kỳ ý tưởng tại sao? –