3
我在MVC中沒有使用過httpHandlers。 但是我想在應用程序中停止會話超時。 我在這裏找到了解決方案; http://www.dotnetcurry.com/ShowArticle.aspx?ID=453如何在MVC中通過JQuery調用HttpHandler
但是我的執行力度,我得到錯誤信息
的路徑控制器「/Shared/KeepSessionAlive.ashx」未找到 ,或者不執行一個IController
所以jQuery的;
$.post("/Shared/KeepSessionAlive.ashx", null, function() {
$("#result").append("<p>Session is alive and kicking!<p/>");
});
正在尋找一個控制器。我該如何停止並執行處理程序代碼?
我試着把這個放在我的web.config中;
<httpHandlers>
<add verb="*" path="KeepSessionAlive.ashx" type="XXXXXX.Views.Shared.KeepSessionAlive"/>
</httpHandlers>