我无法发布我的 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
当我转到网络配置时,看看这个错误是什么意思,我看不到处理程序标签!
<?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:
基本上它说我应该做一个aspnet_regiis -i,但是当我尝试
去%windir%\Microsoft.NET\Framework\v4.0.30319
即使文件夹存在,也没有aspnet_regiis!!
我只在 2.0 Fwk 上找到了aspnet_regiis =(
这正常吗?