[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2383
  • Last Modified:

WCF Service has zero application (non-infrastructure) endpoints

Hello

I am trying to set up a WCF service but I keep bumping into the same error. Struggling to find any other post relevant given the number of potential combinations of configurations.

I am using IIS 7.5, and I want to set up a wsHttpBinding with a Mtom encoding. My Web.config is as follows:

<system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="backupBinding" messageEncoding="Mtom">
          <security>
            <transport>
              <extendedProtectionPolicy policyEnforcement="Never" />
            </transport>
          </security>
        </binding>
      </wsHttpBinding>
      <mexHttpBinding>
        <binding name="backupBindingMex" />
      </mexHttpBinding>
    </bindings>
    <services>
      <service behaviorConfiguration="zbearWCFServices.backupServiceBehavior"
        name="zbearWCFServices.backup">
        <endpoint address="backup.svc" binding="wsHttpBinding" bindingConfiguration="backupBinding"
          name="backupWsEndPoint" bindingName="backupBinding" contract="zbearWCFServices.IBackup">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" name="backupMexEndPoint"
          bindingName="backupBindingMex" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://wcfs.MYWEBDOMAIN.net/" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="zbearWCFServices.backupServiceBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

Open in new window


I have a backup.svc file which contains the following:
<%@ ServiceHost Language="VB" Debug="true" Service="zbearWCFServices.Backup" CodeBehind="backup.svc.vb" %>

Open in new window

and an implementation (backup class) of the backup interface. The backup interface (IBackup) is in a file called backup.vb


Looking at other example I am not sure of what I am doing wrong. By trying the following in a browser (local machine)

http://wcfs.MYWEBDOMAIN.net/backup.svc

I get the error below (cf image).
 ErrorWould anyone have any idea of where I got it wrong?

thanks in advance for your help!
Charles

0
cm2187
Asked:
cm2187
1 Solution
 
DarrenDCommented:
Hi,

This could be something simple like case sensitivity.

In your backup.svc file you have
Service="zbearWCFServices.Backup"

In your Web.Config you have
<service behaviorConfiguration="zbearWCFServices.backupServiceBehavior" name="zbearWCFServices.backup">

Change it to
<service behaviorConfiguration="zbearWCFServices.backupServiceBehavior" name="zbearWCFServices.Backup">

Capital B....

See if this helps,

Darren

0
 
cm2187Author Commented:
OMG! I could have spent months without spotting that. Indeed it works! Thanks for your help!!!
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now