asp.net – 请求格式无法识别的URL意外结束在’/转换’发生后1-2天
发布时间:2020-05-23 07:11:52 所属栏目:asp.Net 来源:互联网
导读:我使用Microsoft.XMLHTTP调用调用webservice: var xmlhttp = new ActiveXObject(Microsoft.XMLHTTP);xmlhttp.open(POST, /xxx/Converter.asmx/Convert, false);xmlhttp.setRequestHeader(Content-Type, applicat
|
我使用Microsoft.XMLHTTP调用调用webservice: var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open("POST","/xxx/Converter.asmx/Convert",false);
xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlhttp.send("conversionFolder=" + escape(conversionFolder));
if (xmlhttp.status == 200) {
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = "false";
xmlDoc.loadXML(xmlhttp.responseText);
... more stuff ...
return str;
}
else {
alert(xmlhttp.statusCode + " - " + xmlhttp.statusText);
}
当我记得在本地web.config中添加HttpPost协议时,所有工作正常: <?xml version="1.0"?>
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<webServices>
<protocols>
<add name="HttpPost"/>
</protocols>
</webServices>
<compilation debug="false"></compilation>
</system.web>
<system.codedom>
</system.codedom>
<!--
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
<system.webServer>
</system.webServer>
</configuration>
但在一个生产服务器上运行1-2天后失败。它工作正常后asp.net过程被回收。它工作1-2天,然后它失败与这: Exception information: Exception type: InvalidOperationException Exception message: Request format is unrecognized for URL unexpectedly ending in '/Convert'. Request information: Request URL: https://xxx/xxx/converter.asmx/Convert Request path: /xxx/converter.asmx/Convert User host address: 195.50.35.4 User: extranetkbk Is authenticated: True Authentication Type: Thread account name: NT AUTHORITYNETWORK SERVICE Thread information: Thread ID: 14 Thread account name: NT AUTHORITYNETWORK SERVICE Is impersonating: False Stack trace: at System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type,HttpContext context,HttpRequest request,HttpResponse response) at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context,String verb,String url,String filePath) at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context,String requestType,String pathTranslated) at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,Boolean& completedSynchronously) 为什么在失败前等待2天?我能做些什么来防止它失败? 解决方法什么是Dot Net框架? IIS 6或7?您是否尝试添加< add name =“HttpGet”/>在协议部分。似乎有些人已经克服了这个问题的修复。 (但不是所有) link 1 link 2 还要检查您部署网站的位置。它是在您的Web服务器或虚拟文件夹的根级别。有时它可能从父级站点或machine.config文件继承一些配置值。 否则它可能与您的代码中的一些内存泄漏有关。你对加载的XML做什么。此外,我假设您正在解析有效的XML。 (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net-mvc – 如何在不给每个控制器放置注释的情况下授权
- asp.net – %#Eval(“State”)%或%#DataBinder.Eval(Con
- asp.net – Request.Browser.Platform不返回iPad,OSX或Wind
- asp.net – WebForm_DoCallback定义
- 如何从命令行自动“运行asp.net网站”?
- asp.net-web-api – Hot Towel / Durandal / Breeze.js:如
- asp.net-mvc – 将SignalR与Azure表存储一起使用 – 什么架
- ASP.NET控件来渲染
- asp.net-mvc – 如何降级Visual Studio 2012中的Entity Fra
- asp.net – 有一个ClientScriptManager.RegisterClientScri
推荐文章
站长推荐
- asp.net – Umbraco 7:无法加载类型Umbraco.Web
- asp.net-mvc – 可靠地处理ASP.NET MVC模型绑定错
- asp.net-mvc-4 – 表单身份验证:角色(MVC 4)C#
- asp.net-mvc – ASP.NET MVC – 单元测试过度杀毒
- asp.net-mvc-3 – insert命令需要插入数据绑定设
- asp.net – 我如何做一个已经内置到dll中的程序集
- asp.net-mvc-3 – 如何防止ASP.NET MVC应用程序中
- 如何在ASP.Net项目中包含jQuery?
- asp.net-mvc-3 – MVC3 – 类型double与前导零的
- asp.net-mvc – ASP.NET MVC路由 – “空白”路由
热点阅读
