.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Can I have multiple Endpoint behavior applied in a service endpoint ?

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :SharePoint



Can I apply more than one endpoint behavior to a service endpoint ?



Thanks and Regards,


View Complete Post

More Related Resource Links

Incorrect hostname in EndPoint location in WSDL for a service with multiple bindings and with multip

We have a WCF web service that is exposed through multiple bindings.  The site is  accessed through multiple IP Addresses/Hostnames (internet/intranet).  Some of the bindings use http transport while others use https transport. The web application is configured to use .NET 4.0 with multipleSiteBindingsEnabled="true" so that we shouldn't have problems with multiple ip addresses/hostnames. What we see is that when the WSDL is accessed using a http based URL (external), the hostnames in the endpoint addresses for http transport based bindings in WSDL are correct (ie, they use the hostname header from the request) while the hostnames in the endpoint addresses for https transport based bindings in the WSDL are incorrect (ie, they do not use the hostname header in the request - they seem to use the hostname from the first available binding in IIS for that scheme and end up with the local machine names/ip addresses in the URL).   We could work around by setting the external hostname/ip in the first binding in IIS for the respective scheme, but then WSDLs accessed from intranet clients would have wrong URLS now. This happens the other way around as well, ie, when the WSDL is accessed using https, the https based addresses are fine, but http addresses in the WSDL are not correct. It looks like hostname header is used only for WSDL endpoint addre

WCF routing Service and ServiceSecurityContext in endpoint behavior


I'm trying to fetch the caller information in endpoint behavior applied for a routing service. The ServiceSecurityContext appears to be null.

How to fetch principal in endpoint behavior of routing service? I was able to fetch the thread principal in serviceAuthorization behavior of the same routing service.

Integrated windows authentication was used.

The service cannot be started. This service has no endpoint defined....But it has!?!

Hi Foks,I'm following this tutorial on how to create RESTful services in WCF:http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.htmlI would like to test the created service using the WCF Default Test Client, but when I run the application (F5) the service does not start and I get this message:"The service cannot be started. This service has no endpoint defined. Please add at least one endpoint for the service in config file and try again."However I do have endpoints defined for this service..I also have two other services running in the same application, which work fine:This is the relevant portion of my app.config:<behaviors>              <serviceBehaviors>                        <behavior name="WCF_Lib_Default.Service1Behavior">                   <serviceMetadata httpGetEnabled="True"/>                   <serviceDebug includeExceptionDetailInFaults="False" />             &nbs

How to set and map a Method in the Service file with endpoint elements and binding elements

Hi all, I have created a service file like OSService.svc in that i have two methods like one is FileUpload and FileDownload for e.g :- [WebInvoke(UriTemplate = "/fileupload/{fileName}" , Method = "POST" )]         [OperationContract]         void FileUpload(string fileName, Stream fileContents); same as Filedownload also. People you may know these methods are inside the interface of service file what you are using i'e i have created a interface as IOSService.cs. So, what i need now is i want to write separate endpoint for FileUpload and Filedownload.Because i want to set separate value for receiveTimeout  and openTimeout for the Fileupload and FileDownload process in binding section in the web.config file itself. The below code was i'm using right now but still i'm not able to the set separate value of endpoint elements in the bindings. EndPoint Section:- <endpoint name = "endPoint1"  address  = "localhost:8000/OSService.svc/" bindingConfiguration = "TransactionalTCP"   binding  = "netTcpBinding"          contract = "IOSService"/> Binding Section:-  <binding name = "TransactionalTCP"  transactionFlow = "true"   /&

Calling one endpoint from another endpoint in the same service

Hi, I have a WCF service host Im hosting in IIS that defines a few services and one of those services has a number of endpoints. The endpoints that belong to the same service are there to let me specify different contracts and they all use the same binding and behaviour. For the most part it works fine until a specific situation occurs: The service gets stuck when one of the endpoints tries to make a call to another endpoint in the same service. Consider the following example: <service behaviorConfiguration="GeneralServiceBehavior" name="Base"> <endpoint address="/Addresses" binding="wsHttpBinding" bindingConfiguration="wsHttpBindingConfig" contract="CommonObjects.IAddresss" /> <endpoint address="/Attachments" binding="wsHttpBinding" bindingConfiguration="wsHttpBindingConfig" contract="CommonObjects.IAttachments" /> </service> In the example above if a call is made from IAttachments implementor back to this service to access the IAddress endpoint I get stuck in what seems to be a deadlock until I get a timeout on the calling thread and then I see the call come through to the IAddress endpoint, but at that point its already too late as the channel is closed. I have looked at the InstanceContext and ConcurrencyMode. This particular servic

WCF : How to prevent an endpoint from being published in the service WSDL?

Suppose I have a WCF service which has 2 endpoints A and B. I want to enable mex/wsdl on this service but my requirement is that B should not be published in the WSDL. So to say B is only for internal purpose and clients should never be aware of it. Is there a way (most probably somehow using IWsdlExporterExtension), to remove this endpoint B from being published in the metadata?

Can't Add Service Reference in VS 2010 to a net.tcp endpoint

I've got a service running (well, it doesn't crash), but when I try to add a Service Reference to it, I keep getting Metadata contains a reference that cannot be resolved: 'net.tcp://localhost:55555/mex'. Metadata contains a reference that cannot be resolved: 'net.tcp://localhost:55555/mex'. If the service is defined in the current solution, try building the solution and adding the service reference again. The pertinent parts of my config file are:   <netTcpBinding> <binding name="ReliableDuplexBinding" closeTimeout="00:00:10" openTimeout="00:00:10" receiveTimeout="00:00:30" sendTimeout="00:00:15" maxBufferPoolSize="1048576" maxBufferSize="262144" maxReceivedMessageSize="262144"> <readerQuotas maxDepth="33" maxStringContentLength="100000" maxArrayLength="131072" maxBytesPerRead="262144" maxNameTableCharCount="54000" /> <reliableSession inactivityTimeout="05:00:00" enabled="true" /> <security mode="None"> <transport> <extendedProtectionPolicy policyEnforcement="Never" /> </transport> </security> </binding> </netTcpBinding> <behaviors> <serviceBehaviors> <behavior nam

WCF TCP-IP End Point Error : The message could not be dispatched because the service at the endpoint

"The message could not be dispatched because the service at the endpoint address 'net.tcp://' is unavailable for the protocol of the address." This is the Exception I am getting when I am trying to access my WCF Service with 'TCP-IP' end point. My Service Web.Config file is as follows. <system.serviceModel>     <bindings>       <webHttpBinding>         <binding name="JsonWebBinding">           <security mode="TransportCredentialOnly">             <transport clientCredentialType="Windows"></transport>           </security>         </binding>       </webHttpBinding>     </bindings>     <services>       <service behaviorConfiguration="SampleBehaviour" name="SeP.Library.ServiceLibrary.TerritoryMgt">         <endpoint address="" behaviorConfiguration="jsonEndPointBehaviour" binding="webHttpBinding" bindingConfiguration="JsonWebBinding"                &nbs

RESTful WCF Service endpoint not being found by client


I created a RESTful WCF service which I plan to call from a client app (a custom toolpart in a Sharepoint web part), but while I can access everything just fine from a browser the client throws this error:

EndpointNotFoundException: There was no endpoint listening at http://mymachine:3217/Services/CtmsService.svc that could accept the
message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
---> System.Net.WebException: The remote server returned an error: (404) Not Found.

My service's contract looks like this:

public interface ICtmsService
  [WebGet(UriTemplate = "/GetAllSites")]
  Dictionary<string, int?> GetAllSites();
...and the configuration looks like this: (which is more complicated due to needing dependency injection via Spring.NET to work)


WCF service JSON endpoint with certificate



I just spend some day trying to create a WCF service that expose a JSON service authentified with a certificate. I've try some example found on the web but didn't succeed. I need to use the JSON connection with a Java client. I use WCF because in the further client they will be windows clients too.

I presume that I've made some mistakes in my configuration file. Does someone has already make this kind of endpoint to communicate with a java client with succes ? I'm pretty sure it's possible.

Thx for any pointers

2010 WCF Service App template not creating endpoint node


I have been learning WCF in .NET 3.5 and VS 2008 and Tuesday I started a new job and we are using VS 2010.  When I create a project in 2010 using the WCF Service Application template the IDE does not create a services/service/endpoint element in the app config (VS 2008 did, and then I would edit that element for the details that I wanted the endpoint to have.)

In the 2010 project I can accept all the defaults and it works fine, but I dont see how I can control/specify the details of the endpoint.  Maybe there is there guidance out there how to work with the new no-endpoint template?  Thanks

Details on what I do to get the default WCF Service Application template project working: I host it in IIS7, and call it from a Windows form (using its wsdl link to create a Service Reference in the Windows project, and then an instance of the service in the Form's code behind) and it all works fine.  The create-Service-Reference process creates a client/endpoint element that uses basicHttpBinding, and a bindings/basicHttpBinding element.


There was no endpoint listening at ... when trying to reference an WCF service?




Help pls, I’m trying to add a service reference to a WCF service hosted on a server.

This is the url I’m using to try and add the service reference

(when I type this url into internet explorer the xml comes through fine)


This is the configuration file


There was no endpoint listening at http://localhost/Service.svc that could accept the message. This


Hello Firends,

I have configured wcf service on my loal machine's IIS and it's running fine when I bowse .svc file.

But when I am running local web application after ading local wcf service's  reference to web application, it is showing following error message,even though affter adding endpoint correclty.

"There was no endpoint listening at http://localhost/Service.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details."

Can anybody please tell me, how can I solve this issue?

Thanks and regards,


xamlx workflow service initialization hosted in IIS on net.msmq endpoint


Hi everyone,

I implemented xamlx workflow service. I need to implement code that will be called before the service is invoked. I host workflow service in IIS on net.msmq endpoint. I saw that global.asax does not help me. I searched internet and found that I could use public static void AppInitialize(); method in App_Code folder class but that does not work.

Can you give me some suggestion or send code sample that can be used for initialization of application in iis that hosts xamlx workflow services on netMsmq binding?


Indigo Cowboy

An endpoint configuration section for contract 'xxx' could not be loaded because more than one end



I'm trying to test calling a webservice, I've found several free ones on http://webserviceshare.com, but none of them work for me.  Some of them give example calling code in C# which I've translated to VB.NET, they're typically just two to four lines, I don't think I've translated them incorrectly.

On that I've tried is US Zip Validator.  I added a Service Reference to http://www.webservicemart.com/uszip.asmx?WSDL, called ZipService.

I then call it like so:

            Dim myZipService As ZipService.USZipSoapClient = New ZipService.USZipSoapClient()
            Dim myCity As String = myZipService.ValidateZip("27707")

I get the following error on the first line of code:

"An endpoint configuration section for contract 'ZipService.USZipSoap' could not be loaded because more than one endpoint configuration for that contract was found. Please indicate the preferred endpoint configuration section by name."

A page with information on this web service (including C# source code) is at:


Could not find default endpoint element that references contract 'CurrencyProxy.CurrencyServiceSoap



I created 2 projects in my solution:

  1. Classic asp.net web service (asmx)
  2. Class library project which references service
  3. web site project which references class library project
  4. Windows app project which references service.

Both projects were created in 3.5 framework and in Visual Studio 2008 Beta 2.

I added web service reference to Class library project. When it asked for namespace I typed "CurrencyProxy". Projects build ok, but when I run web app, Class library throws an error: Could not find default endpoint element that references contract 'CurrencyProxy.CurrencyServiceSoap' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

I believe it has something to do with app.config in Class library project. Here is part from app.config:

<binding name="CurrencyServiceSoap" closeTimeout=

Word Automation - Multiple DCOM Errors/Behavior

Before I get started, I already know that Microsoft does not support and highly discourages server-based MS Office automation.  I've read a multitude of posts and smarmy "*wink*, here's a link" replies, so I'm looking for actual help here, not condescending reprimands.

That notwithstanding, here is my problem.  I have developed a simple method that will open a local Word document, modify some header information, and then save the document as a new file.  As expected, it works great as a console/windows app, but as soon as I went to ASP.NET, DCOM jacked my world up when accessing the app remotely from a different domain account (that has access to the ASP.NET app.  For reference, my method is shown below:


1    public static string ModifyAndSaveBuildDocument(string localFilePath, BuildDocumentType docType, string buildNumber, DateTime buildDate, string projectName)
2            {
3                try
4                {
5                    ProjectConfiguration config = (ProjectConfiguration)ConfigurationManager.GetSection("ProjectConfiguration");
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend