{"id":311,"date":"2012-06-19T19:52:45","date_gmt":"2012-06-19T11:52:45","guid":{"rendered":"http:\/\/blog.nami.idv.tw\/?p=311"},"modified":"2012-06-19T19:52:45","modified_gmt":"2012-06-19T11:52:45","slug":"%e5%9c%a8-iis-%e4%b8%ad%ef%bc%8c%e5%a6%82%e4%bd%95%e8%a8%ad%e5%ae%9a%e4%b8%8d%e5%90%8c-session-id","status":"publish","type":"post","link":"https:\/\/blog.nami.idv.tw\/?p=311","title":{"rendered":"\u5728 IIS \u4e2d\uff0c\u5982\u4f55\u8a2d\u5b9a\u4e0d\u540c Session ID ?"},"content":{"rendered":"<p>\u672c\u7bc7\u8981\u8a18\u9304\u5982\u4f55\u5728 IIS Web Server \u4e2d\uff0c\u76f8\u540c domain \u4e0b\u4e0d\u540c\u76ee\u9304\u7684\u61c9\u7528\u7a0b\u5f0f\u80fd\u7522\u751f\u4e0d\u540c Session ID\uff0c\u9019\u500b topic \u662f\u6e90\u81ea\u65bc\u67d0\u4e9b\u72c0\u6cc1\uff0c\u9700\u8981\u5728\u540c\u4e00\u500b domain \u4e0b run \u4e00\u500b\u7cfb\u7d71(\u7a0b\u5f0f)\u7684\u591a\u500b instances \u6642\uff0c\u89e3\u6c7a\u76f8\u540c\u7684 session variable name \u9020\u6210\u6df7\u6dc6\u7684 issue\u3002<\/p>\n<h3>Classic ASP \u7684\u89e3\u6cd5\uff1a<\/h3>\n<p><em>\"\u4e0d\u540c instances \u8a2d\u5b9a\u6210\u4e0d\u540c\u865b\u64ec\u76ee\u9304\"<\/em><\/p>\n<p>\u5728\u5be6\u9ad4\u76ee\u9304\u4e2d\uff0c\u5373\u4fbf\u6709\u8457\u76f8\u540c\u7684\u76ee\u9304\u547d\u7a31\u6642\uff08\u4f8b\u5982\uff1a\/public_html\/app1\uff09\uff0c\u53ea\u8981\u5c07\u865b\u64ec\u76ee\u9304\u5225\u540d\u8a2d\u5b9a\u6210 app1\uff0c\u8def\u5f91\u6307\u5411 \/public_html\/app1\uff0c\u5728\u5b58\u53d6\u6642\u5c31\u6703\u4ee5\u53e6\u4e00\u500b\u61c9\u7528\u7a0b\u5f0f\u53bb\u57f7\u884c\u5167\u5bb9\uff0c\u5982\u679c\u5728\/public_html\/ \u4e0b\u9762\u6709 app1, app2, app3, ... \u90fd\u8a2d\u5b9a\u6210\u5404\u5225\u7684\u865b\u64ec\u76ee\u9304\uff0c\u7576\u5b58\u53d6\u6642\u5c31\u6703\u6709\u5404\u81ea\u7684 ASPSESSIONID\uff0c\u4e0d\u6703\u56e0\u70ba\u90fd\u5728\/public_html\/ \u4e0b\u9762\u9020\u6210 session variable \u6df7\u5728\u4e00\u8d77\u3002<\/p>\n<h3>PHP \u7684\u89e3\u6cd5\uff1a<\/h3>\n<p><em>\"\u4e0d\u540c instances \u8a2d\u5b9a\u4e0d\u540c\u7684<\/em> <a class=\"link\" href=\"http:\/\/www.php.net\/manual\/en\/session.configuration.php#ini.session.cookie-path\">session.cookie_path<\/a><em>\"<\/em><\/p>\n<p>\u53ea\u8981\u5728\u5404\u5225\u7684 instances \u4e2d\uff0c\u900f\u904e <span class=\"simpara\"> <span class=\"function\"><a class=\"function\" href=\"http:\/\/www.php.net\/manual\/en\/function.session-set-cookie-params.php\">session_set_cookie_params()<\/a> \u8a2d\u5b9a\u5404\u5225\u7684 path (\u5c0d\u61c9\u5230 app \u7684\u76ee\u9304\uff0c\u4f8b\u5982 \/app1, \/app2, \/app3\uff0c\u8981\u6ce8\u610f\u9019\u662f\u53c3\u7167 URI \u4e0d\u662f\u5be6\u9ad4\u8def\u5f91)\uff0c\u5c31\u6703\u7522\u751f\u4e0d\u540c\u7684 PHPSESSID\u3002<\/span><\/span><\/p>\n<h3>\u7e3d\u7d50\uff1a<\/h3>\n<p><span class=\"simpara\"><span class=\"function\">Classic ASP \u7684\u90e8\u5206\u7531\u65bc ASPSESSIONID \u7684\u8a2d\u5b9a\u7121\u6cd5\u5f9e\u7a0b\u5f0f\u9762\u53bb\u6539\uff0c\u53ea\u597d\u5f9e IIS \u8457\u624b\uff0c\u56e0\u6b64\u9700\u8981\u6b0a\u9650\u6bd4\u8f03\u9ad8\uff0c\u6240\u4ee5\u883b\u9ebb\u7169\u7684\u3002<\/span><\/span><\/p>\n<p><span class=\"simpara\"><span class=\"function\">\u81f3\u65bc ASP.Net \u662f\u5426\u6709\u76f8\u540c\u7684 issue \u5c31\u4e0d\u77e5\u9053\u4e86\uff0c\u9084\u6c92\u7814\u7a76\u904e\uff0c\u4ee5\u5f8c\u6709\u9592\u7684\u6642\u5019\u518d\u7814\u7a76\u770b\u770b\u3002<br \/>\n<\/span><\/span><\/p>\n<p>public_html<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u7bc7\u8981\u8a18\u9304\u5982\u4f55\u5728 IIS Web Server \u4e2d\uff0c\u76f8\u540c domain \u4e0b\u4e0d\u540c\u76ee &hellip; <a href=\"https:\/\/blog.nami.idv.tw\/?p=311\">\u95b1\u8b80\u5168\u6587 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5,33],"tags":[34,7,8],"class_list":["post-311","post","type-post","status-publish","format-standard","hentry","category-web-technology","category-develop","tag-asp","tag-iis","tag-php"],"_links":{"self":[{"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=311"}],"version-history":[{"count":2,"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/311\/revisions"}],"predecessor-version":[{"id":313,"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/311\/revisions\/313"}],"wp:attachment":[{"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nami.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}