{"id":2649,"date":"2024-04-30T08:52:58","date_gmt":"2024-04-30T00:52:58","guid":{"rendered":"http:\/\/www.plm.cn\/?p=2649"},"modified":"2024-04-30T08:52:58","modified_gmt":"2024-04-30T00:52:58","slug":"%e6%80%8e%e6%a0%b7%e5%b0%86asp-net-core-web-api-%e9%83%a8%e7%bd%b2%e5%88%b0iis","status":"publish","type":"post","link":"http:\/\/www.plm.cn\/2649\/","title":{"rendered":"\u600e\u6837\u5c06ASP.NET Core Web API \u90e8\u7f72\u5230IIS"},"content":{"rendered":"
\u5f00\u53d1\u4eba\u5458\u53ef\u4ee5\u4f7f\u7528\u5404\u79cd\u5c5e\u6027\u548c\u8fc7\u6ee4\u5668\u6765\u5904\u7406\u8bf7\u6c42\u3001\u63a7\u5236\u8bbf\u95ee\u6743\u9650\u3001\u9a8c\u8bc1\u6570\u636e\u7b49\u3002WebAPI \u662f\u4e00\u79cd\u4f20\u7edf\u7684\u65b9\u5f0f\uff0c\u7528\u4e8e\u6784\u5efa\u548c\u66b4\u9732 RESTUI\u98ce\u683c\u7684Web\u670d\u52a1\u3002\u5b83\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\u548c\u7075\u6d3b\u6027\uff0c\u53ef\u4ee5\u5904\u7406\u5404\u79cdHTTP\u8bf7\u6c42\uff0c\u5e76\u652f\u6301\u5404\u79cd\u6570\u636e\u683c\u5f0f\uff0c\u5982JSON\u3001XML\u7b49\u3002WebAPI\u4f7f\u7528\u63a7\u5236\u5668(Controllers)\u548c\u52a8\u4f5c\u65b9\u6cd5(ActionMethods)\u7684\u6982\u5ff5\u3001\u901a\u8fc7\u8def\u7531\u914d\u7f6e\u5c06\u8bf7\u6c42\u6620\u5c04\u5230\u76f8\u5e94\u7684\u65b9\u6cd5\u4e0a\u3002<\/p>\n
ASP.NET Core Web API \u662f\u6784\u5efa RESTful \u5e94\u7528\u7a0b\u5e8f\u7684\u7406\u60f3\u5e73\u53f0\u3002 \u53ef\u4ee5\u628aWebApi\u770b\u6210Asp.Net\u9879\u76ee\u7c7b\u578b\u4e2d\u7684\u4e00\u79cd\uff0c\u5176\u4ed6\u9879\u76ee\u7c7b\u578b\u8bf8\u5982\u6211\u4eec\u719f\u77e5\u7684WebForm\u9879\u76ee\uff0cWindows\u7a97\u4f53\u9879\u76ee\uff0c\u63a7\u5236\u53f0\u5e94\u7528\u7a0b\u5e8f\u7b49\u3002Gungho\u5c0f\u7a0b\u5e8f\u90e8\u7f72\u7684\u65f6\u5019\u5c31\u7528\u5230\u4e86\u57fa\u4e8eASP.NET Core Web API \u5f00\u53d1\u7684GunghoAPI\u670d\u52a1<\/p>\n
<\/p>\n
\u9664\u4e86 IIS\u670d\u52a1\u4ee5\u5916\uff0c\u4e0a\u8ff0\u8fd9\u4e9b\u9009\u9879\u9700\u8981\u8bbe\u7f6e<\/p>\n
<\/p>\n
\u8fd9\u4e2a\u90e8\u5206\u662f\u5f00\u53d1\u9700\u8981\u6309\u8981\u6c42\u53d1\u5e03\u9879\u76ee<\/p>\n
Hosting Bundel \u4e0b\u8f7d\uff08\u8fd9\u91cc\u7528\u7684\u662f .net 8.0\uff09<\/p>\n
<\/p>\n
<\/p>\n
\u4e0b\u8f7d\u540e\uff0c\u5728\u670d\u52a1\u7aef\u5b89\u88c5<\/p>\n
<\/p>\n
\u5b89\u88c5\u540e\uff0c\u5230IIS\u7ba1\u7406\u5668\u67e5\u770b<\/p>\n
<\/p>\n
<\/p>\n
\u8bf4\u660e \u90e8\u7f72\u6210\u529f<\/p>\n
<\/p>\n
\u8f93\u5165\u5e94\u7528\u7a0b\u5e8f\u6c60\u540d\u79f0\uff0c\u9009\u62e9\u201c.NET CLR \u7248\u672c\u201d\u4e3a\u201c\u65e0\u6258\u7ba1\u4ee3\u7801\u201d\u3002<\/p>\n
\u6253\u5f00\u4f60\u521a\u521a\u521b\u5efa\u7684\u5e94\u7528\u7a0b\u5e8f\u6c60\u7684\u5c5e\u6027->\u5207\u6362\u5230\u201c\u9ad8\u7ea7\u8bbe\u7f6e\u201d->\u5728\u201c\u542f\u752832\u4f4d\u5e94\u7528\u7a0b\u5e8f\u201d\u4e2d\u9009\u62e9\u201cFalse\u201d<\/p>\n
<\/p>\n
\u786e\u4fdd\u5e94\u7528\u7a0b\u5e8f\u5177\u6709\u9002\u5f53\u7684\u6743\u9650\uff0c\u901a\u5e38\u662f\u5e94\u7528\u7a0b\u5e8f\u6c60\u7684\u8eab\u4efd<\/p>\n
\u786e\u4fdd\u4f60\u7684\u670d\u52a1\u5668\u9632\u706b\u5899\u8bbe\u7f6e\u5141\u8bb8\u901a\u8fc7\u4f60\u9009\u62e9\u7684\u7aef\u53e3\uff08\u4f8b\u5982\uff1a80 \u6216 443\uff09\u7684\u6d41\u91cf<\/p>\n
<\/p>\n","protected":false},"excerpt":{"rendered":"
WebAPI\u6982\u8ff0 \u5f00\u53d1\u4eba\u5458\u53ef\u4ee5\u4f7f\u7528\u5404\u79cd\u5c5e\u6027\u548c\u8fc7\u6ee4\u5668\u6765\u5904\u7406\u8bf7\u6c42\u3001\u63a7\u5236\u8bbf\u95ee\u6743\u9650\u3001\u9a8c\u8bc1\u6570\u636e\u7b49\u3002WebAPI \u662f\u4e00\u79cd\u4f20 […]<\/p>\n","protected":false},"author":1,"featured_media":2659,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,9],"tags":[13,32],"class_list":["post-2649","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-plmcenter","category-pcdoc","tag-shouche","tag-wenti"],"_links":{"self":[{"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/posts\/2649","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/comments?post=2649"}],"version-history":[{"count":1,"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/posts\/2649\/revisions"}],"predecessor-version":[{"id":2660,"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/posts\/2649\/revisions\/2660"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/media\/2659"}],"wp:attachment":[{"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/media?parent=2649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/categories?post=2649"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/tags?post=2649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}