浏览asmx - 请求格式无法识别 [英] Browsing asmx - Request format is unrecognized

查看:212
本文介绍了浏览asmx - 请求格式无法识别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All,

这似乎是一个非常微不足道的问题。当我从IIS服务器机器浏览一些asmx时,我看到这个错误 -


'/ bootstrap'应用程序中的服务器错误。



请求格式无法识别。

描述:在执行当前Web请求期间发生了未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。

异常详细信息: System.Web.HttpException:请求格式无法识别。

源错误:





生成了未处理的异常在执行当前Web请求期间。可以使用下面的异常堆栈跟踪来识别有关异常的起源和位置的信息。

堆栈跟踪:





Hello All,

This seems to be a pretty trivial question. When i browse some asmx's from the IIS Server machine, i see this error - 

 

Server Error in '/bootstrap' Application.

Request format is unrecognized.

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.Web.HttpException: Request format is unrecognized.

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:

[HttpException (0x80004005): Request format is unrecognized.] System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +491104 System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath) +104 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 


如果我从远程机器浏览相同的asmx,我会看到错误 -


'/ bootstrap'应用程序中的服务器错误。



运行时错误

描述:服务器上发生了应用程序错误。此应用程序的当前自定义错误设置可防止远程查看应用程序错误的详细信息(出于安全原因)。但是,它可以由运行在本地服务器计算机上的浏览器查看。

详细信息:要在远程计算机上查看此特定错误消息的详细信息,请创建< customErrors>标记在"web.config"中配置文件位于当前Web应用程序的根目录中。这个< customErrors>然后,标签应该具有其"模式"。属性设置为"关闭"。






if i browse the same asmx from a remote machine i will see the error - 

 

Server Error in '/bootstrap' Application.

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="Off"/> </system.web> </configuration>


注意: 您看到的当前错误页面可以通过修改"defaultRedirect"替换为自定义错误页面。应用程序的属性< customErrors>配置标记指向自定义错误页面URL。






Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web> </configuration>



但是如果使用ASMX从一个aspx应用程序,它显然工作正常。

另外,如果我从asmx根文件夹中删除web.config文件,则错误消失,我可以看到webmethods。

问题 - 我想有一些配置需要在web.config文件中完成,这样我就可以从IE浏览asmx了。这个配置设置是什么?

提前谢谢。

拯救世界,一次一个案例



but if use the ASMX from an aspx application, it apparently works fine.

Also, if i delete the web.config file from the asmx root folder, the error goes away and i can see the webmethods.

QUESTION - I suppose there is some configuration that needs to done in the web.config file so that i can browse the asmx from IE. What is this configuration setting?

Thank you in advance.

Saving the world, one case at a time

推荐答案

你能不能只是在web.config文件中发布内容?
Can u just post the contents in your web.config file?


这篇关于浏览asmx - 请求格式无法识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆