{"id":762,"date":"2012-02-24T17:28:06","date_gmt":"2012-02-24T09:28:06","guid":{"rendered":"http:\/\/blog.pmail.idv.tw\/?p=762"},"modified":"2012-02-24T17:28:06","modified_gmt":"2012-02-24T09:28:06","slug":"%e7%b6%b2%e8%b7%af%e7%a3%81%e7%a2%9f%e6%a9%9f%e4%b8%8a%e5%9f%b7%e8%a1%8cnet%e5%9f%b7%e8%a1%8c%e6%aa%94%e6%9c%89%e6%ac%8a%e9%99%90%e4%b8%8d%e8%b6%b3","status":"publish","type":"post","link":"https:\/\/blog.pmail.idv.tw\/?p=762","title":{"rendered":"\u7db2\u8def\u78c1\u789f\u6a5f\u4e0a\u57f7\u884cNET\u57f7\u884c\u6a94\u6b0a\u9650\u4e0d\u8db3"},"content":{"rendered":"<p>\u516c\u53f8\u6709\u4e00\u500b\u7a0b\u5f0f\u662f\u7528 .net \u5beb\u7684\u7d00\u9304\u65e9\u4e0a\u4e0a\u73ed\u6642\u958b\u6a5f\u5f8c\u767b\u5165\u96fb\u8166\u7684\u6642\u9593<\/p>\n<p>\u9019\u500b\u7a0b\u5f0f\u662f\u653e\u5728 FileServer\u4e0a\u9762,USER \u767b\u5165\u5f8c\u5c31\u6703\u57f7\u884c\u7db2\u8def\u78c1\u789f\u6a5f\u7684\u57f7\u884c\u6a94<\/p>\n<p><!--more--><\/p>\n<p>\u4f46\u662f\u6709\u4e9b\u96fb\u8166\u6703\u51fa\u73fe\u932f\u8aa4\u8a0a\u606f(\u5982\u4e0b),\u4f46\u662f\u82e5\u5c07\u7a0b\u5f0f\u653e\u5728\u672c\u6a5f\u786c\u789f\u5c31\u53ef\u4ee5\u57f7\u884c<\/p>\n<p><font color=\"#9b00d3\">\u8655\u7406\u7684\u4f8b\u5916\u72c0\u6cc1: System.Security.SecurityException: \u578b\u5225 &#8216;System.DirectoryServi<br \/>ces.DirectoryServicesPermission, System.DirectoryServices, Version=2.0.0.0, Cult<br \/>ure=neutral, PublicKeyToken=b03f5f7f11d50a3a&#8217; \u7684\u4f7f\u7528\u6b0a\u9650\u8981\u6c42\u5931\u6557\u3002<br \/>&nbsp;&nbsp; \u65bc System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly a<br \/>sm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, Secur<br \/>ityAction action, Object demand, IPermission permThatFailed)<br \/>&nbsp;&nbsp; \u65bc System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object ass<br \/>emblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle<br \/> rmh, SecurityAction action, Object demand, IPermission permThatFailed)<br \/>&nbsp;&nbsp; \u65bc System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet gran<br \/>ts, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Objec<br \/>t assemblyOrString, SecurityAction action, Boolean throwException)<br \/>&nbsp;&nbsp; \u65bc System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs<br \/>, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMet<br \/>hodHandle rmh, Assembly asm, SecurityAction action)<br \/>&nbsp;&nbsp; \u65bc EmpLogin.Program.Main(String[] args)<br \/>\u5931\u6557\u7684\u52d5\u4f5c:<br \/>LinkDemand<br \/>\u7b2c\u4e00\u500b\u5931\u6557\u4f7f\u7528\u6b0a\u9650\u7684\u578b\u5225:<br \/>System.DirectoryServices.DirectoryServicesPermission<br \/>\u7b2c\u4e00\u500b\u5931\u6557\u7684\u4f7f\u7528\u6b0a\u9650:<br \/>&lt;IPermission class=&#8221;System.DirectoryServices.DirectoryServicesPermission, System<br \/>.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d<br \/>50a3a&#8221;<br \/>version=&#8221;1&#8243;<br \/>Unrestricted=&#8221;true&#8221;\/&gt;<\/font><\/p>\n<p>\u89e3\u6c7a\u65b9\u6cd5<\/p>\n<p>\u9032\u5165\u63a7\u5236\u53f0-\u7cfb\u7d71\u7ba1\u7406\u5de5\u5177&#8211;Microsoft .NET Framework 2.0 \u7d44\u614b&#8211;\u6211\u7684\u96fb\u8166<br \/>\u57f7\u884c\u968e\u6bb5\u5b89\u5168\u6027\u539f\u5247&#8211; \u96fb\u8166 &#8212; \u7a0b\u5f0f\u78bc\u7fa4\u7d44&#8211;All Code<br \/>\u5728All Code\u6309\u6ed1\u9f20\u53f3\u9375\u9078\u64c7 \u65b0\u589e-\u5efa\u7acb\u65b0\u7684\u7a0b\u5f0f\u78bc\u7fa4\u7d44-\u8f38\u5165\u540d\u7a31-<br \/>\u5728 \u9078\u64c7\u9019\u500b\u7a0b\u5f0f\u78bc\u7fa4\u7d44\u7684\u689d\u4ef6\u985e\u578b \u70ba URL,\u8f38\u5165\u9060\u7aef\u7a0b\u5f0f\u6240\u5728\u7684\u8def\u5f91(\u4f8b\u5982:file:\/\/Server01\/DotNetAP\/*)<br \/>\u7136\u5f8c\u628a\u8981\u57f7\u884c\u9060\u7aef\u7a0b\u5f0f\u7684\u8def\u5f91\u8a2d\u70ba\u5171\u7528,\u4e14\u6b0a\u9650\u8a2d\u70ba\u6700\u5927<br \/>\u9078\u64c7 \u4f7f\u7528\u73fe\u6709\u7684\u4f7f\u7528\u6b0a\u9650\u96c6\u5408 \u70ba FullTrust <\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2012\/02\/1.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"1\" border=\"0\" alt=\"1\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2012\/02\/1_thumb.jpg\" width=\"244\" height=\"184\"><\/a><\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2012\/02\/2.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"2\" border=\"0\" alt=\"2\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2012\/02\/2_thumb.jpg\" width=\"244\" height=\"184\"><\/a><\/p>\n<p><a href=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2012\/02\/3.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"3\" border=\"0\" alt=\"3\" src=\"https:\/\/blog.pmail.idv.tw\/wp-content\/uploads\/2012\/02\/3_thumb.jpg\" width=\"244\" height=\"184\"><\/a><\/p>\n<div class=\"21cd169d3c0f71e95b84db320302cb4a\" data-index=\"1\" style=\"float: right; margin:10px 0 10px 10px;\">\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-8711325745898650\"\r\n     crossorigin=\"anonymous\"><\/script>\n<\/div>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>\u516c\u53f8\u6709\u4e00\u500b\u7a0b\u5f0f\u662f\u7528 .net \u5beb\u7684\u7d00\u9304\u65e9\u4e0a\u4e0a\u73ed\u6642\u958b\u6a5f\u5f8c\u767b\u5165\u96fb\u8166\u7684\u6642\u9593 \u9019\u500b\u7a0b\u5f0f\u662f &hellip; <a href=\"https:\/\/blog.pmail.idv.tw\/?p=762\">\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":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-762","post","type-post","status-publish","format-standard","hentry","category-client"],"_links":{"self":[{"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/762","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=762"}],"version-history":[{"count":0,"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/762\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pmail.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}