{"id":1613,"date":"2015-09-22T23:04:44","date_gmt":"2015-09-22T15:04:44","guid":{"rendered":"http:\/\/lordong.net\/wp\/?p=1613"},"modified":"2015-09-22T23:04:44","modified_gmt":"2015-09-22T15:04:44","slug":"windows-7%e4%b8%8b%e9%83%a8%e7%bd%b2iis%e8%bf%90%e8%a1%8casp-net","status":"publish","type":"post","link":"https:\/\/lordong.xyz\/wp\/post\/1613.html","title":{"rendered":"Windows 7\u4e0b\u90e8\u7f72IIS\u8fd0\u884casp.net"},"content":{"rendered":"<p>\u6700\u8fd1\u5728\u7814\u7a76asp.net\uff0c\u4e3a\u4e86\u6d4b\u8bd5\u5c31\u60f3\u5728Windows 7\u4e0b\u90e8\u7f72IIS\u6765\u6d4b\u8bd5\u548c\u8fd0\u884casp.net\uff0c\u5f00\u5c40\u4e0d\u5229\uff0c\u641e\u51fa\u4e00\u5927\u5806\u9519\u8bef\uff0c\u7ecf\u591a\u65b9\u67e5\u9519\uff0c\u73b0\u5728\u603b\u7b97\u53ef\u4ee5\u8fd0\u884c\u4e86\u3002<\/p>\n<p>\u9996\u5148\u662f\u5b89\u88c5IIS\u652f\u6301asp.net\uff0c\u5148\u662f\u4ece\u7f51\u4e0a\u627e\u5230\u5b89\u88c5\u9009\u9879\uff0c\u5b89\u88c5\u6210\u529f\u540e\u6211\u81ea\u5df1\u4e5f\u622a\u4e2a\u5b8c\u6574\u7684\u9009\u9879\u56fe\u4e0a\u6765\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" title=\"IIS install options\" src=\"\/media\/2015\/09\/iis-config.png\" alt=\"\" width=\"422\" height=\"846\" \/><\/p>\n<p><!--more-->\u7136\u540e\u662f\u901a\u8fc7\u63a7\u5236\u9762\u677f-&gt;\u7ba1\u7406\u5de5\u5177-&gt;Internet\u4fe1\u606f\u670d\u52a1(IIS)\u7ba1\u7406\u5668\u6765\u914d\u7f6e\uff0c\u5148\u662f\u6dfb\u52a0\u81ea\u5df1\u7684\u7f51\u7ad9\uff0c\u6307\u5b9a\u81ea\u5b9a\u4e49\u76ee\u5f55\uff0c\u4e0d\u60f3\u4f7f\u7528\u9ed8\u8ba4\u7684\u201cDefault Web Site\u201d\uff0c\u56e0\u4e3a\u914d\u7f6e\u4e0d\u7075\u6d3b\u3002\u7531\u4e8e\u6211\u628a80\u7aef\u53e3\u5206\u914d\u7ed9\u4e86php\uff0c\u6240\u4ee5\u6dfb\u52a0\u7f51\u7ad9\u65f6\u6211\u628a\u7aef\u53e3\u7ed1\u5b9a\u62108080\u3002<\/p>\n<p>\u91cd\u542fIIS\u670d\u52a1\u5e76\u542f\u52a8\u81ea\u5df2\u7f51\u7ad9\u7684\u670d\u52a1\u540e\u5728\u81ea\u5b9a\u4e49\u76ee\u5f55\u4e0b\u6dfb\u52a0\u4e2atest.htm\u6587\u4ef6\uff0c\u5c31\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95eehttp:\/\/localhost:8080\/test.htm\u4e86\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\u5728VS2010\u91cc\u65b0\u5efa\u4e00\u4e2aWeb Site\u5de5\u7a0b\uff08\u9700\u8981\u9884\u5148\u5b89\u88c5Web\u7ec4\u4ef6\uff09\uff0c\u9009\u62e9C#\u6a21\u677f\u7684ASP.NET Web Site\u7c7b\u578b\uff0c\u4fdd\u5b58\u76ee\u5f55\u6307\u5b9a\u5230\u81ea\u5df1\u7f51\u7ad9\u7684\u81ea\u5b9a\u4e49\u76ee\u5f55\u4e2d\uff0c\u66ff\u6362Web.config\u7136\u7f16\u8bd1\u8fd0\u884c\uff0c\u6b63\u5e38\uff0c\u4e0d\u8fc7IDE\u662f\u4f7f\u7528ASP.NET Development Tool\u6765\u8fd0\u884c\u7684\uff0c\u6d4f\u89c8\u5668\u5730\u5740\u662fhttp:\/\/localhost:7196\/asp.net\/\u3002<\/p>\n<p>\u60f3\u8131\u79bbIDE\u6d4b\u8bd5\u73af\u5883\u76f4\u63a5\u8fd0\u884c\uff0c\u6d4f\u89c8\u5668\u5730\u5740\u6362\u6210http:\/\/localhost:8080\/\u8bbf\u95ee\uff0c\u62a5\u9519\uff1a<\/p>\n<h2>[Server Error in '\/' Application.<\/h2>\n<hr size=\"1\" width=\"100%\" \/>\n<h2><i>Configuration Error<\/i><\/h2>\n<p><span style=\"font-family: Arial, Helvetica, Geneva, SunSans-Regular, sans-serif;\"><b>Description: <\/b>An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.<\/span><br \/>\n<b>Parser Error Message: <\/b>Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.<br \/>\n<b>Source Error:<\/b><\/p>\n<table width=\"100%\" bgcolor=\"#ffffcc\">\n<tbody>\n<tr>\n<td>\n<pre>Line 14: \r\nLine 15:   &lt;system.web&gt;\r\n<span style=\"color: red;\">Line 16:     &lt;compilation debug=\"false\" targetFramework=\"4.0\" \/&gt;\r\n<\/span>Line 17: \r\nLine 18:     &lt;authentication mode=\"Forms\"&gt;<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-family: Arial, Helvetica, Geneva, SunSans-Regular, sans-serif;\"><br \/>\n<b>Source File: <\/b>E:\\asp.net\\web.config<b> \u00a0\u00a0 Line: <\/b>16]<\/span><\/p>\n<p>\u5728<a href=\"http:\/\/stackoverflow.com\/questions\/7530725\/unrecognized-attribute-targetframework-note-that-attribute-names-are-case-sen\" target=\"_blank\">\u8fd9\u91cc<\/a>\u627e\u5230\u9519\u8bef\u7684\u89e3\u51b3\u529e\u6cd5\uff0c\u5c31\u662f\u8981\u624b\u52a8\u6ce8\u518casp.net 4.0 \u7684.net framework\uff1a<br \/>\nC:\\WINDOWS\\Microsoft.NET\\Framework\\v4.0.30319&gt;aspnet_regiis -i<br \/>\n\uff08\u8bd5\u8fc7\u6ce8\u518cFramework64\u91cc\u7684\u540c\u540d\u6587\u4ef6\u6548\u679c\u4e5f\u4e00\u6837\uff09<\/p>\n<p>\u518d\u5237\u65b0\u9875\u9762\uff0c\u4e0a\u9762\u7684\u9519\u8bef\u89e3\u51b3\u6389\u4e86\uff0c\u4e0d\u8fc7\u53c8\u51fa\u65b0\u7684\u9519\u8bef\uff1a<br \/>\n<span style=\"color: #ff0000;\">\u7531\u4e8e Web \u670d\u52a1\u5668\u4e0a\u7684\u201cISAPI \u548c CGI \u9650\u5236\u201d\u5217\u8868\u8bbe\u7f6e\uff0c\u65e0\u6cd5\u63d0\u4f9b\u60a8\u8bf7\u6c42\u7684\u9875\u9762<\/span><\/p>\n<p>\u5728<a href=\"http:\/\/www.paipat.com\/?post=11\" target=\"_blank\">\u8fd9\u91cc<\/a>\u627e\u5230\u9519\u8bef\u7684\u89e3\u51b3\u529e\u6cd5\uff0c\u5c31\u662f\u56de\u5230Internet\u4fe1\u606f\u670d\u52a1(IIS)\u7ba1\u7406\u5668\uff0c\u9009\u4e2d\u6700\u9876\u4e0a\u7684\u8ba1\u7b97\u673a\u540d\uff0c\u53cc\u51fb\u53f3\u8fb9IIS\u4e0b\u7684\u201cISAPI \u548c CGI \u9650\u5236\u201d\u56fe\u6807\uff0c\u628a\u521a\u6ce8\u518c\u7684ASP.NET 4.0\u8bbe\u6210\u5141\u8bb8\uff0c\u9ed8\u8ba4\u662f\u4e0d\u5141\u8bb8\uff0c\u987a\u4fbf\u628aFramework64\u76ee\u5f55\u4e0b\u7684\u63cf\u8ff0\u6539\u621064bit\u4ee5\u533a\u5206\u4e0e32bit\u3002<\/p>\n<p>\u91cd\u65b0\u5237\u65b0\u9875\u9762\uff0c\u4e0e\u901a\u8fc7ASP.NET Development Tool\u6d4b\u8bd5\u4e00\u6837\u6548\u679c\u7684\u9875\u9762\u51fa\u73b0\u4e86\uff0cOK\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u5728\u7814\u7a76asp.net\uff0c\u4e3a\u4e86\u6d4b\u8bd5\u5c31\u60f3\u5728Windows 7\u4e0b\u90e8\u7f72IIS\u6765\u6d4b\u8bd5\u548c\u8fd0\u884casp.net\uff0c\u5f00\u5c40\u4e0d\u5229\uff0c\u641e [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[21],"class_list":["post-1613","post","type-post","status-publish","format-standard","hentry","category-6","tag-c-net"],"_links":{"self":[{"href":"https:\/\/lordong.xyz\/wp\/wp-json\/wp\/v2\/posts\/1613","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lordong.xyz\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lordong.xyz\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lordong.xyz\/wp\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/lordong.xyz\/wp\/wp-json\/wp\/v2\/comments?post=1613"}],"version-history":[{"count":0,"href":"https:\/\/lordong.xyz\/wp\/wp-json\/wp\/v2\/posts\/1613\/revisions"}],"wp:attachment":[{"href":"https:\/\/lordong.xyz\/wp\/wp-json\/wp\/v2\/media?parent=1613"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lordong.xyz\/wp\/wp-json\/wp\/v2\/categories?post=1613"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lordong.xyz\/wp\/wp-json\/wp\/v2\/tags?post=1613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}