繁体   English   中英

IIS7中的Webservice .Net 4.0发布问题

[英]Webservice .Net 4.0 publishing problems in IIS7

我无法发布我的Web服务,这应该很简单:

  1. 我在IIS中创建应用,
  2. 将其放置为4.0 Classic .Net
  3. 我从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

当我转到Web配置时,看到此错误是在说什么,我看不到任何处理程序标签!

<?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:

IIS7.5上的静态文件处理程序不提供该脚本

基本上说我应该做一个aspnet_regiis -i ,但是当我尝试

转到%windir%\\ Microsoft.NET \\ Framework \\ v4.0.30319

即使该文件夹存在, 也没有aspnet_regiis!

我只在2.0 Fwk上找到了aspnet_regiis =(

那是正常的吗?

handler标签不是答案,但是,这两个选项都驱使我寻找fwk 4缺少的aspnet_regiis。

因为没有完整安装fwk 4.0,所以没有aspnet_regiis。

我已经在服务器上安装了Framework 4 Client Profile和调试器,它们不是完整版本。 从现在开始,每当我认为已安装fwk 4时,我都会进行两次检查。

安装后,在Framework 4.0 Classic Pipeline Mode(而不是Integrated )上,它可以正常工作。

但是注意!

安装框架后,IIS会将默认管道更改为4.0 ,这意味着,如果您在2.0上正在进行网站(站点/服务),它将自动停止工作。 (发生在我身上)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM