2011-06-02 104 views
1

部署到生產環境後,我只收到404 - 找不到文件。將WCF服務配置爲在IIS上運行6

該服務需要配置爲虛擬目錄(/ v1)。 它有自己的應用程序池。

我啓用ASP .NET 4.0按http://www.jamesgoodfellow.com/blog/post/IIS-60---HTTP-404---File-not-found-Internet-Information-Services.aspx

我加入了外卡和刪除Windows集成安全性爲每hosting .net 4.0 REST WCF service in IIS 6

它仍然沒有工作...

這裏的ServiceModel部分我的web.config:

<system.serviceModel> 
    <extensions> 
     <behaviorExtensions> 
      <add name="restHttpBehavior" type="--hidden for security purposes--, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null"/> 
     </behaviorExtensions> 
    </extensions> 
    <services> 
     <service name="--hidden for security purposes--" behaviorConfiguration="MetadataBehavior"> 
      <host> 
       <baseAddresses> 
        <add baseAddress="http://localhost/v1/api.svc"/> 
       </baseAddresses> 
      </host> 

      <endpoint behaviorConfiguration="WebBehavior" binding="webHttpBinding" bindingConfiguration="restNoSSL" contract="--hidden for security purposes--"/> 
      <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> 
     </service> 
    </services> 
    <behaviors> 
     <endpointBehaviors> 
      <behavior name="WebBehavior"> 
       <restHttpBehavior/> 
      </behavior> 
     </endpointBehaviors> 
     <serviceBehaviors> 
      <behavior name="MetadataBehavior"> 
       <serviceMetadata httpGetEnabled="true"/> 
       <serviceDebug includeExceptionDetailInFaults="false"/> 
      </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    <bindings> 
     <webHttpBinding> 

      <binding name="restNoSSL"> 
      </binding> 
     </webHttpBinding> 
    </bindings> 
</system.serviceModel> 

請幫忙!!

回答

1

原來,ISAPI過濾器實際上阻止了該服務。所以我刪除了通配符,增加了集成安全性的窗口 - 現在網站正常運行。

1

看到相同的問題,但對我來說,這是因爲ISAPI通配符使用不正確的ISAPI文件。

這些版本存在

64位.NET 2.0 ASPNET_ISAPI.DLL

32位.NET 2.0 ASPNET_ISAPI.DLL

64位.NET 4.0 ASPNET_ISAPI.DLL

32位.NET 4.0 aspnet_isapi。 dll

32位.net 4.0 aspnet_isapi.dll可以應用,並仍然允許我的網站工作。