开发者

Configuring WCF Service to run on IIS 6

After deploying to production env' I receive only 404 - File Not Found.

The service needs to be configured as a virtual directory ( /v1 ). It has its own Application pool.

I enabled ASP .Net 4.0 as per http://www.jamesgoodfellow.com/blog/post/IIS-60---HTTP-404---File-not-found-Internet-Information-Services.aspx

I added the wild card and removed windows integrated security as per hosting .net 4.0 REST WCF service in IIS 6

It still doesn't work...

Here's the ServiceModel part of my 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 purpose开发者_开发技巧s--" 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>

Please Help!!


Turns out that the ISAPI filter was actually blocking the service. So I removed the wildcard, added back windows integrated security - and the website now works.


Saw the same issue but for me it was because the ISAPI wildcard was using the incorrect ISAPI file.

these versions exist

64bit .net 2.0 aspnet_isapi.dll

32bit .net 2.0 aspnet_isapi.dll

64bit .net 4.0 aspnet_isapi.dll

32bit .net 4.0 aspnet_isapi.dll

32 bit .net 4.0 aspnet_isapi.dll could be applied and still allow my site to work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜