WCF REST XML service hosted on IIS 7.5 .NET 4.0 under both: http and https bindings stopped to work after installation of Visual Studio 2013 RRS feed

  • Question

  • User597476499 posted

    Developed using .NET Framework 4.0 WCF REST XML service and hosted on IIS 7.5 worked okay with both bindings: http, https. After installation of Visual Studio 2013 from here:

    http://www.microsoft.com/visualstudio/eng/downloads service became to work only with http binding, when open service in browser using https the message is:

    The resource cannot be found.

    Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

    The message in Event Viewer is:

    WebHost failed to process a request.
     Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/39086322
     Exception: System.Web.HttpException (0x80004005): There was no channel actively listening at 'https://{host name}/Services/Service.svc'. This is often caused by an incorrect address URI. Ensure that the address to which the message is sent matches an address on which a service is listening. ---> System.ServiceModel.EndpointNotFoundException: There was no channel actively listening at 'https://{host name}/Services/Service.svc'. This is often caused by an incorrect address URI. Ensure that the address to which the message is sent matches an address on which a service is listening.
       at System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result)
       at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest()
       at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()
       at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)
     Process Name: w3wp
     Process ID: 3568

    If to add to webHttpBinding configuration (in web.config) line: <security mode="Transport" />, then service starts to work with https and stops to work with http protocol (with the same errors in browser and Event Viewer).

    Any ideas how to make this work like it was when only .NET Framework 4.0 and Visual Studio 2010 were installed?

    The same error appears after installation of Visual Studio 2012 or Team Foundation Server 2012 with Update 3.

    Tuesday, October 29, 2013 1:22 PM

All replies

  • User260886948 posted


    So it seems that your service can work at .Net Framework 4.0. but not work at .Net Framework 4.5.

    If so, Could you post your question on netfx45compat at Microsoft dot com to discuss? The microsoft experts will help you to find the cause.

    Also it will be better for you to post your configure file here.

    Best Regards,
    Amy Peng

    Wednesday, October 30, 2013 10:36 PM
  • User597476499 posted

    Hi Amy,

    Can you write url where to post question with info about service and configuration?

    Friday, November 1, 2013 2:21 AM
  • User597476499 posted

    Installation order:

    1) Windows 7;

    2) IIS (ASP.NET);

    3) Visual Studio 2010 with .NET framework 4.0.

    Service implementation:


    namespace Wcf
        public interface IService1
            [WebInvoke(Method = "GET", UriTemplate = "/GetData/{value}", RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Xml)]
            string GetData(string value);

            [WebInvoke(Method = "POST", UriTemplate = "/GetDataUsingDataContract", RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Xml)]
            CompositeType GetDataUsingDataContract(CompositeType composite);

        public class CompositeType
            bool boolValue = true;
            string stringValue = "Hello ";

            public bool BoolValue
                get { return boolValue; }
                set { boolValue = value; }

            public string StringValue
                get { return stringValue; }
                set { stringValue = value; }


    namespace Wcf
        public class Service1 : IService1
            public string GetData(string value)
                return string.Format("You entered: {0}", value);

            public CompositeType GetDataUsingDataContract(CompositeType composite)
                if (composite == null)
                    throw new ArgumentNullException("composite");
                if (composite.BoolValue)
                    composite.StringValue += "Suffix";
                return composite;


    <%@ ServiceHost Language="C#" Debug="true" Service="Wcf.Service1"


    <?xml version="1.0"?>

            <compilation debug="true" targetFramework="4.0" />

                    <standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="false"></standardEndpoint>

                    <binding name="WebHttpBinding_BindingConfig" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
                             transferMode="Streamed" >
                        <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
                                      maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
                        <!--<security mode="Transport"></security>-->

                    <behavior name="webHttpBehavior">
                        <webHttp helpEnabled="true" />

                    <behavior name="CommonServiceBehavior">
                        <serviceMetadata httpGetEnabled="true" />
                        <serviceDebug includeExceptionDetailInFaults="false"/>

                <service name="Wcf.Service1" behaviorConfiguration="CommonServiceBehavior">
                    <endpoint address="" behaviorConfiguration="webHttpBehavior"
                             binding="webHttpBinding" bindingConfiguration="WebHttpBinding_BindingConfig"
                             contract="Wcf.IService1" />

            <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="false" />

            <modules runAllManagedModulesForAllRequests="true"/>


    host (C:\Windows\System32\drivers\etc):    wcf

    IIS bindings configuration:

    %systemroot%\system32\inetsrv\appcmd set site /site.name:WCF /bindings.[protocol='http',bindingInformation='*:80:'].bindingInformation:*:80:wcf

    %systemroot%\system32\inetsrv\appcmd set site /site.name:WCF /bindings.[protocol='https',bindingInformation='*:443:'].bindingInformation:*:443:wcf

    This works okay with .NET framework 4.0, but after installation of .NET framework 4.5 error appears as was described in the first post.

    The service works only via http protocol, if to uncomment <security mode="Transport"></security> in the web.config, then service will only work via https.

    If only .NET framework 4.0 installed both protocols are okay.

    Friday, November 1, 2013 12:29 PM