Solved

WCF Service has zero application (non-infrastructure) endpoints

Posted on 2010-09-19
2
2,255 Views
Last Modified: 2012-05-10
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
Comment
Question by:cm2187
2 Comments
 
LVL 18

Accepted Solution

by:
DarrenD earned 500 total points
Comment Utility
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
 

Author Closing Comment

by:cm2187
Comment Utility
OMG! I could have spent months without spotting that. Indeed it works! Thanks for your help!!!
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This tutorial will show you how to add an attribute to an XML (http://en.wikipedia.org/wiki/XML) stream returned from a Windows Communication Foundation (http://en.wikipedia.org/wiki/Windows_Communication_Foundation) (WCF) Web Service.  Some knowled…
While working on Silverlight and WCF application, I faced one issue where fault exception occurred at WCF operation contract is not getting propagated to Silverlight client. So after searching net I came to know that it was behavior by default for s…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now