
{"id":178,"date":"2008-05-18T21:00:00","date_gmt":"2008-05-18T21:00:00","guid":{"rendered":"http:\/\/www.sincebirth.cn\/?p=178"},"modified":"2008-05-18T21:00:00","modified_gmt":"2008-05-18T21:00:00","slug":"mono%e6%8c%87%e5%8d%97%ef%bc%9a%e7%a7%bb%e6%a4%8daspnet%e5%ba%94%e7%94%a8%ef%bc%88%e7%bb%ad%e4%ba%8c%ef%bc%89","status":"publish","type":"post","link":"https:\/\/niuduer.sincebirth.space\/?p=178","title":{"rendered":"MONO\u6307\u5357\uff1a\u79fb\u690dASP.NET\u5e94\u7528\uff08\u7eed\u4e8c\uff09"},"content":{"rendered":"<div id=\"blog_text\" class=\"cnt\">\n<p>4. \u6240\u9700\u7ec4\u4ef6<\/p>\n<p>\u628aNpgsql\u548cPostgreSQL\u63d0\u4f9b\u8005\u7ec4\u4ef6\u653e\u5728\u4f60\u7684\u5e94\u7528\u7684bin\/\u5b50\u76ee\u5f55\u4e0b\u3002<\/p>\n<p>4.1 \u914d\u7f6e\u6587\u4ef6<\/p>\n<p>4.1.1 DbProviderFactory configuration<br \/>\n&nbsp;&nbsp;  \u5f53\u6211\u4eec\u4f7f\u7528CVS\u800c\u6765\u7684Npgsql\u65f6\uff0c\u5b83\u5e76\u672a\u9ed8\u8ba4\u914d\u7f6e\u4e3a\u5728Mono\u4e2d\u7684 ADO.NET\u6a21\u5f0f\u3002\u6211\u4eec\u9700\u8981\u6dfb\u52a0\u5982\u4e0b\u6bb5\u843d<\/p>\n<p>\u5230Web.config\u6587\u4ef6\uff1a<\/p>\n<p><span style=\"color: #009900\"><span style=\"font-weight: bold; color: black\"><span style=\"color: #009900\"><span style=\"font-weight: bold; color: black\">&lt;system<\/span>.web<span style=\"font-weight: bold; color: black\">&gt;<\/span><\/span><br \/>\n<span style=\"color: #009900\"><span style=\"font-weight: bold; color: black\">&lt;compilation<span style=\"font-weight: bold; color: black\">&gt;<\/span><\/span><\/span><br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;  <span style=\"color: #009900\"><span style=\"font-weight: bold; color: black\">&lt;assemblies<span style=\"font-weight: bold; color: black\">&gt;<\/span><\/span><\/span><br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <span style=\"color: #009900\"><span style=\"font-weight: bold; color: black\">&lt;add<\/span> <span style=\"color: #000066\">assembly<\/span>=<span style=\"color: #ff0000\">&quot;Npgsql2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7&quot;<\/span><span style=\"font-weight: bold; color: black\">\/&gt;<\/span><\/span><br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #009900\"><span style=\"font-weight: bold; color: black\">&lt;\/assemblies<span style=\"font-weight: bold; color: black\">&gt;<\/span><\/span><\/span><br \/>\n&nbsp;&nbsp;  <span style=\"color: #009900\"><span style=\"font-weight: bold; color: black\">&lt;\/compilation<span style=\"font-weight: bold; color: black\">&gt;<\/span><\/span><\/span><br \/>\n<span style=\"color: #009900\"><span style=\"font-weight: bold; color: black\">&lt;\/system<\/span>.web<span style=\"font-weight: bold; color: black\">&gt;<\/span><\/span><\/span><\/span><\/p>\n<p>4.1.2 Npgsql and ~\/App_Code<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  \u901a\u8fc7\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\u6bb5\u5230\u4f60\u7684Web.config\u6587\u4ef6\uff0c\u786e\u4fddNpgsql\u5305\u542b\u5728\u7ec4\u4ef6\u96c6\u5408\u4e2d\uff0c\u6765\u8fde\u63a5\u4ece~\/App_Code\u4e2d\u7f16\u8bd1\u7684\u4ee3\u7801\u6216\u4ece\u4f60\u7684ASP.NET\u6587\u4ef6\u751f\u6210\u7684\u4ee3\u7801\u3002<\/p>\n<p><span style=\"color: #009900\"><span style=\"font-weight: bold; color: black\">&lt;system<\/span>.web<span style=\"font-weight: bold; color: black\">&gt;<\/span><\/span><br \/>\n<span style=\"color: #009900\"><span style=\"font-weight: bold; color: black\">&lt;compilation<span style=\"font-weight: bold; color: black\">&gt;<\/span><\/span><\/span><br \/>\n  <span style=\"color: #009900\"><span style=\"font-weight: bold; color: black\">&lt;assemblies<span style=\"font-weight: bold; color: black\">&gt;<\/span><\/span><\/span><br \/>\n&nbsp;&nbsp;  <span style=\"color: #009900\"><span style=\"font-weight: bold; color: black\">&lt;add<\/span> <span style=\"color: #000066\">assembly<\/span>=<span style=\"color: #ff0000\">&quot;Npgsql2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7&quot;<\/span><span style=\"font-weight: bold; color: black\">\/&gt;<\/span><\/span><br \/>\n  <span style=\"color: #009900\"><span style=\"font-weight: bold; color: black\">&lt;\/assemblies<span style=\"font-weight: bold; color: black\">&gt;<\/span><\/span><\/span><br \/>\n<span style=\"color: #009900\"><span style=\"font-weight: bold; color: black\">&lt;\/compilation<span style=\"font-weight: bold; color: black\">&gt;<\/span><\/span><\/span><br \/>\n<span style=\"color: #009900\"><span style=\"font-weight: bold; color: black\">&lt;\/system<\/span>.web<span style=\"font-weight: bold; color: black\">&gt;<\/span><\/span><\/p>\n<p>\n(\u5f85\u7eed)<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>4. \u6240\u9700\u7ec4\u4ef6 \u628aNpgsql\u548cPostgreSQL\u63d0\u4f9b\u8005\u7ec4\u4ef6\u653e\u5728\u4f60\u7684\u5e94\u7528\u7684bin\/\u5b50\u76ee\u5f55\u4e0b\u3002 4.1 \u914d\u7f6e\u6587 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-178","post","type-post","status-publish","format-standard","hentry","category-all"],"views":1165,"_links":{"self":[{"href":"https:\/\/niuduer.sincebirth.space\/index.php?rest_route=\/wp\/v2\/posts\/178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/niuduer.sincebirth.space\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/niuduer.sincebirth.space\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/niuduer.sincebirth.space\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/niuduer.sincebirth.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=178"}],"version-history":[{"count":0,"href":"https:\/\/niuduer.sincebirth.space\/index.php?rest_route=\/wp\/v2\/posts\/178\/revisions"}],"wp:attachment":[{"href":"https:\/\/niuduer.sincebirth.space\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/niuduer.sincebirth.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/niuduer.sincebirth.space\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}