asp.netwcfiis-6wcf-4

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

Please Help!!


Solution

  • 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.