如何解决A"请求格式是无法识别的网址..."错误在IIS中运行的Web服务? [英] How do I fix a "Request format is unrecognized for URL..." error in a web service running in IIS?
问题描述
我同时运行在IIS Web服务收到以下错误:
I am get the following error while running web service in IIS:
服务器中的/收件箱服务队错误
应用。请求格式
无法识别为URL意外
在/ GetMailsInfo'结尾。
说明:未处理的异常
的执行过程中发生
当前Web请求。请检查
堆栈跟踪有关的详细信息
该错误以及它起源于
在code。
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.
异常详细信息:
System.InvalidOperationException:
请求格式是无法识别的网址
在意外结束
'/ GetMailsInfo。
Exception Details: System.InvalidOperationException: Request format is unrecognized for URL unexpectedly ending in '/GetMailsInfo'.
源错误:
生成了未处理的异常
当前的执行过程中
Web请求。关于信息
例外的起源和地点
可以使用异常被识别
堆栈跟踪的下面。
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.
堆栈跟踪:
[出现InvalidOperationException:请求
格式是无法识别的网址
在意外结束
'/ GetMailsInfo']
System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(类型
类型,HttpContext的背景下,Htt的prequest
请求的Htt presponse响应)
490982 System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext的
背景下,动词的字符串,字符串的URL,
字符串文件路径)+104
System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext的
背景下,字符串请求类型,字符串
URL,字符串pathTranslated)+127
System.Web.HttpApplication.MapHttpHandler(HttpContext的
背景下,字符串请求类型,
VirtualPath路径,字符串
pathTranslated,布尔useAppConfig)
+175 System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+ 120 System.Web.HttpApplication.ExecuteStep(IExecutionStep
一步,布尔和放大器; completedSynchronously)
+155
[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
版本信息:微软.NET
Framework版本:2.0.50727.42;
ASP.NET版本:2.0.50727.42
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
有谁知道为什么我看到这个错误,如果有什么办法解决?
Does anyone know why I am seeing this error and if there is any way to fix it?
推荐答案
由于HTTP GET和HTTP POST是的默认情况下禁用尝试添加以下到您的配置文件:
Since HTTP GET and HTTP POST are disabled by default try adding the following to your config file:
<configuration>
<system.web>
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
</system.web>
</configuration>
这篇关于如何解决A&QUOT;请求格式是无法识别的网址...&QUOT;错误在IIS中运行的Web服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!