【发布时间】:2013-01-28 17:59:32
【问题描述】:
我无法发布我的 Web 服务,应该很简单:
- 我在 IIS 中创建应用程序,
- 将其放置为 4.0 Classic .Net
- 我从VS2012中的.Net解决方案发布它右键单击并发布 在 Webservice 项目上。
文件已放置,它应在指定服务器的 URL 上的浏览器上自行显示。
但我偶然发现了以下问题:
HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by the static file handler.
所以我一直在寻找它并找到了这两个选项:
选项 1:
http://www.banmanpro.com/support2/Requested_Content_Appears_to_be_Script.asp
这个说我应该去集成,而不是经典应用程序池。但这就像我将一个问题换成另一个问题,因为现在它说:
HTTP Error 500.21 - Internal Server Error
Handler "WebServiceHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list
当我转到网络配置时,看看这个错误是什么意思,我看不到 handler tag!
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appSettings />
<connectionStrings />
<system.web>
<compilation targetFramework="4.0" />
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows" />
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm"/>
<error statusCode="404" redirect="FileNotFound.htm"/>
</customErrors>
-->
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" />
</system.web>
<system.webServer>
<directoryBrowse enabled="true" />
</system.webServer>
<!--
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.
-->
</configuration>
我应该添加一个吗?如果有,怎么做?
选项 2:
Script not served by static file handler on IIS7.5
基本上它说我应该做一个 aspnet_regiis -i,但是当我尝试时
转到 %windir%\Microsoft.NET\Framework\v4.0.30319
即使文件夹存在,没有aspnet_regiis!!
我只在 2.0 Fwk 上找到了 aspnet_regiis =(
这正常吗?
【问题讨论】:
-
这是 WCF 服务还是 ASMX 服务?
标签: web-services c#-4.0 .net-4.0 iis-7.5 asmx