C#C
C#13mo ago
YShakhshir

WCF Hosting to IIS

Hello guys,

I am trying to host a WCF service to IIS and it never works for me 😦
Can you please help !

<?xml version="1.0"?>
<configuration>

  <appSettings>
    <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.6.2" />
    <httpRuntime targetFramework="4.6.2"/>
  </system.web>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
        <service name ="WcfService1.Service1">
            <endpoint address="Service" binding="basicHttpsBinding" contract="WcfService1.IService1" />
            <host>
                <baseAddresses>
                    <add baseAddress="https://localhost:8080"/>
                </baseAddresses>
            </host>
        </service>
    </services>
    <protocolMapping>
        <add binding="basicHttpsBinding" scheme="https" />
    </protocolMapping>    
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
    <directoryBrowse enabled="true"/>
  </system.webServer>
</configuration>



After publishing to IIS , and navigate to the page in the IIS "Content View" and click the "Browse" , I get nothing!
image.png
image.png
image.png
Was this page helpful?