{"id":85600,"date":"2026-07-27T18:32:57","date_gmt":"2026-07-27T10:32:57","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/85600.html"},"modified":"2026-07-27T18:32:57","modified_gmt":"2026-07-27T10:32:57","slug":"net-%e8%a7%a3%e5%86%b3-web-api-%e4%b8%ad%e7%9a%84%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%93%8d%e5%ba%94%e7%8a%b6%e6%80%81%e7%a0%81%e4%b8%ba-405%ef%bc%88%e6%96%b9%e6%b3%95%e4%b8%8d%e5%85%81%e8%ae%b8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/85600.html","title":{"rendered":".Net \u89e3\u51b3 Web API \u4e2d\u7684\u201c\u670d\u52a1\u5668\u54cd\u5e94\u72b6\u6001\u7801\u4e3a 405\uff08\u65b9\u6cd5\u4e0d\u5141\u8bb8\uff09\u201d\u9519\u8bef"},"content":{"rendered":"<p id=\"main-toc\">\u76ee\u5f55<\/p>\n<p id=\"%E6%96%B9%E6%A1%88%201%C2%A0%E4%BF%AE%E6%94%B9%20Web.Config%20%E6%96%87%E4%BB%B6-toc\" style=\"margin-left:40px\">\u65b9\u6848 1\u00a0\u4fee\u6539 Web.Config \u6587\u4ef6<\/p>\n<p id=\"%E6%96%B9%E6%A1%88%202%C2%A0%E6%81%A2%E5%A4%8D%E5%8F%82%E6%95%B0%E5%90%8D%E7%A7%B0-toc\" style=\"margin-left:40px\">\u65b9\u6848 2\u00a0\u6062\u590d\u53c2\u6570\u540d\u79f0<\/p>\n<p id=\"%E6%80%BB%E7%BB%93-toc\" style=\"margin-left:40px\">\u603b\u7ed3<\/p>\n<hr id=\"hr-toc\" \/>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"630\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727103255-6a6733d7078e8.png\" width=\"1200\" \/><\/p>\n<p><span style=\"color:#fe2c24\">\u5982\u679c\u60a8\u559c\u6b22\u6b64\u6587\u7ae0&#xff0c;\u8bf7\u6536\u85cf\u3001\u70b9\u8d5e\u3001\u8bc4\u8bba&#xff0c;\u8c22\u8c22&#xff0c;\u795d\u60a8\u5feb\u4e50\u6bcf\u4e00\u5929\u3002<\/span><\/p>\n<p>\u6211\u5728\u4e3a\u4e00\u4e2a\u65b0\u9879\u76ee\u4f7f\u7528 Web API \u65f6&#xff0c;\u7a81\u7136\u9047\u5230\u4e00\u4e2a\u9519\u8bef&#xff1a;\u201c\u670d\u52a1\u5668\u54cd\u5e94\u72b6\u6001\u7801\u4e3a 405&#xff08;\u65b9\u6cd5\u4e0d\u5141\u8bb8&#xff09;\u00a0\u201d&#xff0c;\u5f53\u65f6\u6211\u6b63\u5c1d\u8bd5\u901a\u8fc7 API \u5220\u9664\u4e00\u6761\u8bb0\u5f55\u3002\u6211\u767e\u601d\u4e0d\u5f97\u5176\u89e3&#xff0c;\u6700\u7ec8\u627e\u5230\u4e86\u89e3\u51b3\u65b9\u6848\u3002\u73b0\u5728\u6211\u5c06\u5206\u4eab\u8fd9\u4e2a\u89e3\u51b3\u65b9\u6848&#xff0c;\u5e0c\u671b\u5bf9\u60a8\u6709\u6240\u5e2e\u52a9\u3002  \u5982\u679c\u60a8\u9047\u5230\u6b64\u9519\u8bef&#xff0c;\u53ef\u4ee5\u5c1d\u8bd5\u4ee5\u4e0b\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n<h3 id=\"%E6%96%B9%E6%A1%88%201%C2%A0%E4%BF%AE%E6%94%B9%20Web.Config%20%E6%96%87%E4%BB%B6\">\u65b9\u6848 1\u00a0\u4fee\u6539 Web.Config \u6587\u4ef6<\/h3>\n<p>\u8fd9\u662f\u60a8\u5fc5\u987b\u5c1d\u8bd5\u7684\u7b2c\u4e00\u4ef6\u4e8b\u3002\u8bf7\u5728 Web.Config \u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u6807\u7b7e\u3002<\/p>\n<p>validation validateIntegratedModeConfiguration&#061; &#034;false&#034; \/&gt; \u00a0 &lt;modules runAllManagedModulesForAllRequests&#061; &#034;true&#034; &gt; \u00a0 \u00a0 \u00a0&lt;remove name&#061; &#034;WebDAVModule&#034; \/&gt; \u00a0 &lt;\/modules&gt; \u00a0<\/p>\n<p>\u5982\u679c\u4ecd\u7136\u51fa\u73b0\u9519\u8bef&#xff0c;\u8bf7\u5c1d\u8bd5\u5728 &#096;&lt;handlers&gt;&#096; \u6807\u7b7e\u4e0b\u6dfb\u52a0\u4e00\u4e2a\u6807\u7b7e&#xff0c;\u5982\u4e0b\u6240\u793a&#xff1a;  &#096;&lt;handlers&gt; \u00a0\u00a0\u00a0&lt;remove name&#061;&#034;WebDAV&#034; \/&gt; \u00a0\u00a0\u00a0&#8230;.. &lt;\/handlers&gt;&#096;  \u3002\u5982\u679c\u4ee5\u4e0a\u65b9\u6cd5\u65e0\u6548&#xff0c;\u60a8\u53ef\u4ee5\u5c1d\u8bd5\u4e0b\u4e00\u4e2a\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n<h3 id=\"%E6%96%B9%E6%A1%88%202%C2%A0%E6%81%A2%E5%A4%8D%E5%8F%82%E6%95%B0%E5%90%8D%E7%A7%B0\">\u65b9\u6848 2\u00a0\u6062\u590d\u53c2\u6570\u540d\u79f0<\/h3>\n<p> \u4f17\u6240\u5468\u77e5&#xff0c;\u6211\u4eec\u6709\u4e00\u4e2a\u540d\u4e3a &#096;WebApiConfig.cs&#096; \u7684\u6587\u4ef6&#xff0c;\u7528\u4e8e\u8bbe\u7f6e &#096;MapHttpRoute&#096; \u548c\u5176\u4ed6\u914d\u7f6e\u8fc7\u6ee4\u5668\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b&#xff0c;\u6b64\u5904\u7684\u53c2\u6570\u4e3a\u201cid\u201d&#xff0c;\u5982\u4e0b\u6240\u793a\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"171\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727103255-6a6733d7a6d63.png\" width=\"380\" \/><\/p>\n<p>config.Routes.MapHttpRoute( \u00a0 \u00a0 \u00a0name: &#034;DefaultApi&#034;, \u00a0 \u00a0 \u00a0routeTemplate: &#034;api\/{controller}\/{id}&#034;, \u00a0 \u00a0 \u00a0defaults: new { id &#061; RouteParameter.Optional } \u00a0 ); \u00a0<\/p>\n<p>\u5982\u679c\u60a8\u4ee5\u4efb\u4f55\u65b9\u5f0f\u66f4\u6539\u4e86\u51fd\u6570\u7684\u53c2\u6570&#xff0c;\u5219\u9700\u8981\u5c06\u5176\u6062\u590d\u4e3a\u201c id \u201d&#xff0c;\u6216\u8005\u9700\u8981\u5728WebApiConfig.cs\u6587\u4ef6\u4e2d\u8fdb\u884c\u66f4\u6539\u3002<\/p>\n<p>\u4f8b\u5982&#xff0c;\u4ee5\u4e0b\u662f\u6211\u7684\u5220\u9664\u51fd\u6570\u3002<\/p>\n<p>\/\/ DELETE: api\/Subscriber\/5 \u00a0 public void Delete(int subId) \u00a0 { \u00a0 \u00a0 \u00a0 tbl_Subscribers dlt &#061; myEntity.tbl_Subscribers.Find(subId); \u00a0 \u00a0 \u00a0 if (dlt !&#061; null) \u00a0 \u00a0 \u00a0 { \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 try \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 { \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 myEntity.tbl_Subscribers.Remove(dlt); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 myEntity.SaveChanges(); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 catch (Exception) \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 { \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 throw; \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0 \u00a0 \u00a0 } \u00a0 } \u00a0<\/p>\n<p>\u5982\u60a8\u6240\u89c1&#xff0c;\u6211\u5df2\u5c06\u53c2\u6570\u66f4\u6539\u4e3a\u201csubId\u201d\u3002\u56e0\u6b64&#xff0c;\u6211\u4e00\u76f4\u6536\u5230\u201c\u670d\u52a1\u5668\u54cd\u5e94\u72b6\u6001\u7801\u4e3a 405&#xff08;\u65b9\u6cd5\u4e0d\u5141\u8bb8&#xff09; \u201d\u7684\u9519\u8bef\u3002\u7136\u540e&#xff0c;\u6211\u6309\u5982\u4e0b\u65b9\u5f0f\u4fee\u6539\u4e86\u6211\u7684\u51fd\u6570\u3002<\/p>\n<p>\/\/ DELETE: api\/Subscriber\/5 \u00a0 public void Delete(int id) \u00a0 { \u00a0 \u00a0 \u00a0 tbl_Subscribers dlt &#061; myEntity.tbl_Subscribers.Find(id); \u00a0 \u00a0 \u00a0 if (dlt !&#061; null) \u00a0 \u00a0 \u00a0 { \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 try \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 { \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 myEntity.tbl_Subscribers.Remove(dlt); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 myEntity.SaveChanges(); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 catch (Exception) \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 { \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 throw; \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 } \u00a0 \u00a0 \u00a0 } \u00a0 } \u00a0<\/p>\n<p>\u66f4\u6539\u53c2\u6570\u540d\u79f0\u540e&#xff0c;\u4e00\u5207\u6b63\u5e38\u3002\u5e0c\u671b\u5bf9\u60a8\u6709\u6240\u5e2e\u52a9\u3002\u5c31\u8fd9\u4e9b\u4e86\u3002\u6211\u4eec\u5b8c\u6210\u4e86\u3002\u795d\u60a8\u7f16\u7801\u6109\u5feb\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1024\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727103255-6a6733d7bbcee.png\" width=\"1024\" \/><\/p>\n<h3 id=\"%E6%80%BB%E7%BB%93\">\u603b\u7ed3<\/h3>\n<p>\u662f\u5426\u9057\u6f0f\u4e86\u60a8\u8ba4\u4e3a\u9700\u8981\u7684\u5185\u5bb9&#xff1f;\u60a8\u5c1d\u8bd5\u8fc7 Web API \u5417&#xff1f;\u60a8\u662f\u5426\u66fe\u7ecf\u60f3\u8fc7\u5b9e\u73b0\u8fd9\u4e2a\u9700\u6c42&#xff1f;\u60a8\u89c9\u5f97\u8fd9\u7bc7\u6587\u7ae0\u6709\u7528\u5417&#xff1f;\u5e0c\u671b\u60a8\u559c\u6b22\u8fd9\u7bc7\u6587\u7ae0\u3002\u8bf7\u4e0e\u6211\u5206\u4eab\u60a8\u5b9d\u8d35\u7684\u5efa\u8bae\u548c\u53cd\u9988\u3002<\/p>\n<p><span style=\"color:#fe2c24\">\u5982\u679c\u60a8\u559c\u6b22\u6b64\u6587\u7ae0&#xff0c;\u8bf7\u6536\u85cf\u3001\u70b9\u8d5e\u3001\u8bc4\u8bba&#xff0c;\u8c22\u8c22&#xff0c;\u795d\u60a8\u5feb\u4e50\u6bcf\u4e00\u5929\u3002<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u5f55<br \/>\n\u65b9\u6848 1\u00a0\u4fee\u6539 Web.Config \u6587\u4ef6<br \/>\n\u65b9\u6848 2\u00a0\u6062\u590d\u53c2\u6570\u540d\u79f0<br \/>\n\u603b\u7ed3 \u5982\u679c\u60a8\u559c\u6b22\u6b64\u6587\u7ae0&#xff0c;\u8bf7\u6536\u85cf\u3001\u70b9\u8d5e\u3001\u8bc4\u8bba&#xff0c;\u8c22\u8c22&#xff0c;\u795d\u60a8\u5feb\u4e50\u6bcf\u4e00\u5929\u3002<br \/>\n\u6211\u5728\u4e3a\u4e00\u4e2a\u65b0\u9879\u76ee\u4f7f\u7528 Web API \u65f6&#xff0c;\u7a81\u7136\u9047\u5230\u4e00\u4e2a\u9519\u8bef&#xff1a;\u201c\u670d\u52a1\u5668\u54cd\u5e94\u72b6\u6001\u7801\u4e3a 405&#xff08;\u65b9\u6cd5\u4e0d\u5141\u8bb8&#xff09;\u00a0\u201d&#xff0c;\u5f53\u65f6\u6211\u6b63\u5c1d\u8bd5\u901a\u8fc7 API \u5220\u9664\u4e00\u6761\u8bb0\u5f55\u3002\u6211\u767e\u601d\u4e0d\u5f97\u5176\u89e3&#xff0c;\u6700\u7ec8\u627e\u5230\u4e86\u89e3\u51b3\u65b9\u6848\u3002\u73b0\u5728\u6211\u5c06\u5206\u4eab\u8fd9\u4e2a\u89e3\u51b3<\/p>\n","protected":false},"author":2,"featured_media":85597,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[895,9623,43],"topic":[],"class_list":["post-85600","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-net","tag-webapi","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>.Net \u89e3\u51b3 Web API \u4e2d\u7684\u201c\u670d\u52a1\u5668\u54cd\u5e94\u72b6\u6001\u7801\u4e3a 405\uff08\u65b9\u6cd5\u4e0d\u5141\u8bb8\uff09\u201d\u9519\u8bef - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/85600.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\".Net \u89e3\u51b3 Web API \u4e2d\u7684\u201c\u670d\u52a1\u5668\u54cd\u5e94\u72b6\u6001\u7801\u4e3a 405\uff08\u65b9\u6cd5\u4e0d\u5141\u8bb8\uff09\u201d\u9519\u8bef - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u76ee\u5f55 \u65b9\u6848 1\u00a0\u4fee\u6539 Web.Config \u6587\u4ef6 \u65b9\u6848 2\u00a0\u6062\u590d\u53c2\u6570\u540d\u79f0 \u603b\u7ed3 \u5982\u679c\u60a8\u559c\u6b22\u6b64\u6587\u7ae0&#xff0c;\u8bf7\u6536\u85cf\u3001\u70b9\u8d5e\u3001\u8bc4\u8bba&#xff0c;\u8c22\u8c22&#xff0c;\u795d\u60a8\u5feb\u4e50\u6bcf\u4e00\u5929\u3002 \u6211\u5728\u4e3a\u4e00\u4e2a\u65b0\u9879\u76ee\u4f7f\u7528 Web API \u65f6&#xff0c;\u7a81\u7136\u9047\u5230\u4e00\u4e2a\u9519\u8bef&#xff1a;\u201c\u670d\u52a1\u5668\u54cd\u5e94\u72b6\u6001\u7801\u4e3a 405&#xff08;\u65b9\u6cd5\u4e0d\u5141\u8bb8&#xff09;\u00a0\u201d&#xff0c;\u5f53\u65f6\u6211\u6b63\u5c1d\u8bd5\u901a\u8fc7 API \u5220\u9664\u4e00\u6761\u8bb0\u5f55\u3002\u6211\u767e\u601d\u4e0d\u5f97\u5176\u89e3&#xff0c;\u6700\u7ec8\u627e\u5230\u4e86\u89e3\u51b3\u65b9\u6848\u3002\u73b0\u5728\u6211\u5c06\u5206\u4eab\u8fd9\u4e2a\u89e3\u51b3\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/85600.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-27T10:32:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727103255-6a6733d7078e8.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/85600.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/85600.html\",\"name\":\".Net \u89e3\u51b3 Web API \u4e2d\u7684\u201c\u670d\u52a1\u5668\u54cd\u5e94\u72b6\u6001\u7801\u4e3a 405\uff08\u65b9\u6cd5\u4e0d\u5141\u8bb8\uff09\u201d\u9519\u8bef - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-27T10:32:57+00:00\",\"dateModified\":\"2026-07-27T10:32:57+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/85600.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/85600.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/85600.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\".Net \u89e3\u51b3 Web API \u4e2d\u7684\u201c\u670d\u52a1\u5668\u54cd\u5e94\u72b6\u6001\u7801\u4e3a 405\uff08\u65b9\u6cd5\u4e0d\u5141\u8bb8\uff09\u201d\u9519\u8bef\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":".Net \u89e3\u51b3 Web API \u4e2d\u7684\u201c\u670d\u52a1\u5668\u54cd\u5e94\u72b6\u6001\u7801\u4e3a 405\uff08\u65b9\u6cd5\u4e0d\u5141\u8bb8\uff09\u201d\u9519\u8bef - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/85600.html","og_locale":"zh_CN","og_type":"article","og_title":".Net \u89e3\u51b3 Web API \u4e2d\u7684\u201c\u670d\u52a1\u5668\u54cd\u5e94\u72b6\u6001\u7801\u4e3a 405\uff08\u65b9\u6cd5\u4e0d\u5141\u8bb8\uff09\u201d\u9519\u8bef - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u76ee\u5f55 \u65b9\u6848 1\u00a0\u4fee\u6539 Web.Config \u6587\u4ef6 \u65b9\u6848 2\u00a0\u6062\u590d\u53c2\u6570\u540d\u79f0 \u603b\u7ed3 \u5982\u679c\u60a8\u559c\u6b22\u6b64\u6587\u7ae0&#xff0c;\u8bf7\u6536\u85cf\u3001\u70b9\u8d5e\u3001\u8bc4\u8bba&#xff0c;\u8c22\u8c22&#xff0c;\u795d\u60a8\u5feb\u4e50\u6bcf\u4e00\u5929\u3002 \u6211\u5728\u4e3a\u4e00\u4e2a\u65b0\u9879\u76ee\u4f7f\u7528 Web API \u65f6&#xff0c;\u7a81\u7136\u9047\u5230\u4e00\u4e2a\u9519\u8bef&#xff1a;\u201c\u670d\u52a1\u5668\u54cd\u5e94\u72b6\u6001\u7801\u4e3a 405&#xff08;\u65b9\u6cd5\u4e0d\u5141\u8bb8&#xff09;\u00a0\u201d&#xff0c;\u5f53\u65f6\u6211\u6b63\u5c1d\u8bd5\u901a\u8fc7 API \u5220\u9664\u4e00\u6761\u8bb0\u5f55\u3002\u6211\u767e\u601d\u4e0d\u5f97\u5176\u89e3&#xff0c;\u6700\u7ec8\u627e\u5230\u4e86\u89e3\u51b3\u65b9\u6848\u3002\u73b0\u5728\u6211\u5c06\u5206\u4eab\u8fd9\u4e2a\u89e3\u51b3","og_url":"https:\/\/www.wsisp.com\/helps\/85600.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-27T10:32:57+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260727103255-6a6733d7078e8.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/85600.html","url":"https:\/\/www.wsisp.com\/helps\/85600.html","name":".Net \u89e3\u51b3 Web API \u4e2d\u7684\u201c\u670d\u52a1\u5668\u54cd\u5e94\u72b6\u6001\u7801\u4e3a 405\uff08\u65b9\u6cd5\u4e0d\u5141\u8bb8\uff09\u201d\u9519\u8bef - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-27T10:32:57+00:00","dateModified":"2026-07-27T10:32:57+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/85600.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/85600.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/85600.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":".Net \u89e3\u51b3 Web API \u4e2d\u7684\u201c\u670d\u52a1\u5668\u54cd\u5e94\u72b6\u6001\u7801\u4e3a 405\uff08\u65b9\u6cd5\u4e0d\u5141\u8bb8\uff09\u201d\u9519\u8bef"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/85600","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=85600"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/85600\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/85597"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=85600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=85600"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=85600"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=85600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}