WCF.svc Available over HTTP, but accessing WSDL causes "Connection was Reset"

I have a WCF service hosted on IIS6 on a Win2003 Service Pack 2 (SP2) machine. The WCF service is properly hosted and visible over HTTP, giving the usual "To test this service, you will need to create a client and use it to invoke the service." However, accessing the .svc link? WSDL forces the connection to be reset.

The server itself returns 200 in logs for a WSDL request, an example of which is shown here, the first call receives a reset connection, the second a successful call to the .svc file.

2010-04-09 11:00:21 W3SVC6 MACHINENAME 10.79.42.115 GET /IntegrationService.svc wsdl 80 - 10.75.33.71 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+.NET+CLR+2.0.50727;+.NET+CLR+1.1.4322;+.NET+CLR+1.0.3705;+InfoPath.1;+.NET+CLR+3.0.04506.30;+MS-RTC+LM+8;+.NET+CLR+3.0.4506.2152;+.NET+CLR+3.5.30729;) - - devsitename.mydevdomain.com 200 0 0 0 696 3827
2010-04-09 11:04:10 W3SVC6 MACHINENAME 10.79.42.115 GET /IntegrationService.svc - 80 - 10.75.33.71 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-GB;+rv:1.9.1.9)+Gecko/20100315+Firefox/3.5.9+(.NET+CLR+3.5.30729) - - devsitename.mydevdomain.com 200 0 0 3144 457 265

      

My Web.Config looks like this:

<system.serviceModel>
    <serviceHostingEnvironment >
        <baseAddressPrefixFilters>
            <add prefix="http://devsitename.mydevdomain.com" />
        </baseAddressPrefixFilters>
    </serviceHostingEnvironment>
    <behaviors>
        <serviceBehaviors>
            <behavior name="My.Service.IntegrationServiceBehavior">
                <serviceMetadata httpGetEnabled="true" />
                <serviceDebug includeExceptionDetailInFaults="false" />
            </behavior>
        </serviceBehaviors>
    </behaviors>
    <services>
        <service behaviorConfiguration="My.Service.IntegrationServiceBehavior" name="My.Service.IntegrationService">
            <endpoint address="" binding="wsHttpBinding" contract="My.Service.Interfaces.IIntegrationService"  bindingConfiguration="NoSecurityConfig" />
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        </service>
    </services>
    <bindings>
        <wsHttpBinding>
            <binding name="NoSecurityConfig">
                <security mode="None" />
            </binding>                      
        </wsHttpBinding>
    </bindings>
</system.serviceModel>

      

I am very much puzzled by this. It works fine via local dev server in VS2008, but doesn't work after deployment. For more information, the target computer does not have a firewall (it is on the internal network) and the logs show the site thinks it is ok with 200 OK responses. I also tried updating the endpoint with the full url of my service, but it still doesn't matter.

I looked at some of the other options - creating a separate WSDL manually and exposing it through the metadata properties (really, I don't want to do this due to maintenance issues).

If anyone can suggest any thoughts on this or any other workaround, we'd be very grateful.

EDIT - Resolution: Thank you for your help. Through a combination of tracing and communication between the two parties, it was discovered that a logging application was installed on the development server, which interferes with the response and forcibly closes the stream after it was initially received on the server. It happened as client Reset tot client, and 200 for server. Gain steam for your contributions and beating with a rubber hose for the developer who secretly installed the recorder

+2


source to share


3 answers


Have you enabled tracing for the web service? This gives detailed logs of what WCF is doing under the hood.

Try to enable tracing for your service as described in this article



Once you have created the trace file, you can view it using SvcTraceViewer.exe (usually located under something like C: \ Program Files \ Microsoft SDK \ Windows \ v6.0A \ bin).

+2


source


I agree - I am also stumped. As far as I can tell, your WCF config looks simple.

Things to Try:



  • can you use WCF Test Client to access your service using address /IntegrationService.svc

    ?

  • Can I use a test client to access your service using an address /IntegrationService.svc/mex

    ?

  • does the WSDL access work if you remove the section <serviceHostingEnvironment>

    from your config?

+1


source


Can you try installing Fiddler and see the HTTP traffic? Perhaps this will clear up the problem.

Also check the event log on the deployed server to see if it has any errors while trying to access the WSDL.

+1


source







All Articles