{"id":1237,"date":"2010-08-10T11:19:00","date_gmt":"2010-08-10T03:19:00","guid":{"rendered":""},"modified":"2013-11-25T20:42:06","modified_gmt":"2013-11-25T12:42:06","slug":"%e5%85%b3%e4%ba%8e%e5%9c%a8ashx%e9%a1%b5%e9%9d%a2%e4%b8%ad%e4%bd%bf%e7%94%a8session%e7%9a%84%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/kyle.ai\/blog\/1237.html","title":{"rendered":"\u5173\u4e8e\u5728ashx\u9875\u9762\u4e2d\u4f7f\u7528Session\u7684\u95ee\u9898"},"content":{"rendered":"<p>\u5173\u4e8e\u5728ashx\u9875\u9762\u4e2d\u4f7f\u7528Session\u7684\u95ee\u9898<\/p>\n<div>\n<p>\u8981\u60f3\u5728\u8fd9\u4e2aashx\u9875\u9762\u4e2d\u4f7f\u7528Session\u7684\u8bdd\uff0c\u8fd8\u5fc5\u987b\u7ee7\u627fSystem.Web.SessionState.IRequiresSessionState\u63a5\u53e3\u3002<br \/>\nusing System.Web.SessionState;<\/p>\n<p>public class registerHander : IHttpHandler, IRequiresSessionState \/\/\u540e\u9762\u52a0\u4e2aIRequiresSessionState<\/p>\n<p>\u7ee7\u627f\u4e86\u90a3\u4e2a\u63a5\u53e3\u4e4b\u540e\u53ef\u4ee5\u4f7f\u7528\u5176\u4ed6\u9875\u9762\u751f\u6210\u7684Session\u4e86\uff0c\u53ef\u662f\u5728\u8be5\u9875\u9762\u4e2d\u751f\u6210\u7684Session\u5728\u5176\u4ed6\u9875\u9762\u5374\u65e0\u6cd5\u4f7f\u7528\u3002<\/p>\n<p>\u7ee7\u7eed\u627e\u8d44\u6599\uff0c\u53d1\u73b0\u9700\u8981\u5c06IsReusable\u65b9\u6cd5\u7684\u8fd4\u56de\u503c\u8fd4\u56de\u4e3atrue\u624d\u53ef\u4ee5\u3002<\/p>\n<p>public\u00a0\u00a0 bool IsReusable<br \/>\n{<br \/>\nget<br \/>\n{<br \/>\nreturn true;<br \/>\n}<br \/>\n}<\/p>\n<p>\u901a\u8fc7\u4ee5\u4e0a\u51e0\u6b65\uff0c\u95ee\u9898\u89e3\u51b3\u3002<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u5173\u4e8e\u5728ashx\u9875\u9762\u4e2d\u4f7f\u7528Session\u7684\u95ee\u9898 \u8981\u60f3\u5728\u8fd9\u4e2aashx\u9875\u9762\u4e2d\u4f7f\u7528Session\u7684\u8bdd\uff0c\u8fd8\u5fc5\u987b\u7ee7\u627fSys [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1237","post","type-post","status-publish","format-standard","hentry","category-code_related"],"_links":{"self":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/1237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/comments?post=1237"}],"version-history":[{"count":1,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/1237\/revisions"}],"predecessor-version":[{"id":5228,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/1237\/revisions\/5228"}],"wp:attachment":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/media?parent=1237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/categories?post=1237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/tags?post=1237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}