gpt4 book ai didi

asp.net - 如何修复 IIS 中运行的 Web 服务中的 "Request format is unrecognized for URL..."错误?

转载 作者:行者123 更新时间:2023-12-03 07:36:41 25 4
gpt4 key购买 nike

在 IIS 中运行 Web 服务时出现以下错误:

Server Error in '/Inbox Sevice' Application. Request format is unrecognized for URL unexpectedly ending in '/GetMailsInfo'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Request format is unrecognized for URL unexpectedly ending in '/GetMailsInfo'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: Request format is unrecognized for URL unexpectedly ending in '/GetMailsInfo'.]
System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +490982 System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath) +104
System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +127
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +175 System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +120 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

有谁知道为什么我会看到此错误以及是否有任何方法可以修复它?

最佳答案

由于 HTTP GET 和 HTTP POST 是 disabled by default尝试将以下内容添加到您的配置文件中:

<configuration>
<system.web>
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
</system.web>
</configuration>

关于asp.net - 如何修复 IIS 中运行的 Web 服务中的 "Request format is unrecognized for URL..."错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/654099/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com