ASMX服务工程开发服务器上,在部署到IIS 7.5返回404 [英] ASMX service works on development server, returns 404 when deployed to IIS 7.5

查看:1934
本文介绍了ASMX服务工程开发服务器上,在部署到IIS 7.5返回404的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在ASP.NET 4.0中的Web应用程序。我已经添加ASMX服务,主要作为自动完成扩展的查找值的来源。

I have a web application in ASP.NET 4.0. I've added an asmx service, primarily as a source for the autocomplete extender's lookup values.

在我的机器上调试本地,一切工作正常。然而,当我部署Web应用程序到IIS 7.5,我尝试将数据发送到该服务时获得一个HTTP 404响应。

When I debug on my machine locally, everything works fine. However, when I deploy the web application to IIS 7.5, I get a HTTP 404 response when trying to send data to the service.

我能够浏览到服务定义,看到可用的操作。引人关注的是,然而,当我使用测试页面中使用POST来测试服务,我收到一个HTTP 404一次。

I am able to browse to the service definition, see the available operations. Tellingly, however, when I use the test pages to test the service using POST, I receive an HTTP 404 again.

我不知道是怎么回事。我做了我的web应用程序中创建的ASMX文件,并将其部署在我的工作,不然生产应用程序的虚拟目录。

I'm not sure what is going on. I did create the asmx file within my web application and it is deployed in the virtual directory of my otherwise working production application.

是否与.asmx文件的一个问题被部署在相同的虚拟目录,也许?

Is there an issue with the .asmx file being deployed in the same virtual directory, perhaps?

推荐答案

我刚刚遇到了同样的错误,绊倒此SO项之后:

I've just encountered the same error, after stumbling over this SO entry:

<一个href=\"http://stackoverflow.com/questions/2498723/handlers-returns-404-error-on-iis7-5-integrated-pipeline\">Handlers返回404错误在IIS7.5集成管道以及

<一个href=\"http://stackoverflow.com/questions/5438693/asmx-operation-404s-but-asmx-service-description-doesnt-url-routing-issue/6891483#6891483\">ASMX操作404,但ASMX服务描述不,URL路由问题?

和尝试添加了.asmx处理程序到web.configs web服务器部分的解决方案,一切都很好:

and tried the solution of adding the asmx handler to the web.configs webServer section all was well:



  <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules runAllManagedModulesForAllRequests="true"/>
    <handlers>
      <add verb="*" path="*.asmx" name="asmx" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </handlers>
  </system.webServer>


这篇关于ASMX服务工程开发服务器上,在部署到IIS 7.5返回404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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