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

Top 5 Contributors of the Month
Post New Web Links

wcf endpoints

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

Hi, I've wondered if I should change something in the endpoints while hosting my wcfs on IIS .

In my web.config I have a wcf:

<endpoint address="http://localhost:4205/ContactService.svc"
    binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IContactService"
    contract="ContactService.IContactService" name="WSHttpBinding_IContactService">
     <dns value="localhost" />

and I wondered if I should change something there.



View Complete Post

More Related Resource Links

rotating through endpoints

how can i make the user to rotate image through the endpoints of the image only if my code is: img.MouseLeftButtonDown += delegate { islbDown = true; startPosition = Mouse.GetPosition(img); img.CaptureMouse(); Point temp = new Point(ActualWidth / 2, ActualHeight / 2); centerPosition=img.TranslatePoint(temp,mycanvas); }; img.MouseMove += delegate { Point toPosition = new Point(); if (islbDown) { RotateTransform rt = (RotateTransform)img.LayoutTransform; rt.CenterX = img.ActualWidth / 2; rt.CenterY = img.ActualHeight / 2; toPosition = Mouse.GetPosition(img); Double delta = Vector.AngleBetween(startPosition - centerPosition, toPosition - centerPosition); rt.Angle += delta; img.RenderTransform = rt; } if (isrbDown) { toPosition = Mouse.GetPosition(mycanvas); Canvas.SetLeft(img, toPosition.X - startPosition.X); Canvas.SetTop(img, toPosition.Y - startPosition.Y); } }; thanks in advance!

Multiple net.tcp endpoints with different portnumbers on the same web site

I have multiple services that have to run under one website. Two of the services have a net.tcp endpoint. The addresses are formatted as follows: net.tcp://backend.ourcompany.com:9080/Product1/2010/09/Service1/Service1.svc net.tcp://backend.ourcompany.com:9081/Product1/2010/09/Service2/Service2.svc net.tcp://backend.ourcompany.com:9090/Product2/2010/09/Service2/Service2.svc Both services have their own Web.config. Currently both services have a different base address in their Web.config and a relative endpoint address. Everything worked ok with just the fist service installed, after installing the second I keep getting this error: 'This collection already contains an address with scheme net.tcp.  There can be at most one address per scheme in this collection. If your service is being hosted in IIS you can fix the problem by setting 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' to true or specifying 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'.' Since the multipleSiteBindingsEnabled is only for http (why?) I tried getting it to work with the baseAddressPrefixFilters but I don't really understand how that would help me in my case. Is it possible what I'm trying to do here? Otherwise this would be a big fail of IIS, in a self-hosted environment I'm doing the same thing for years. I now want to migrate my ex

Multiple endpoints in IIS

I am trying to setup my WCF service in IIS. I definately need to have the rest-ful service enabled using the webHttpBehavior and webHttp behavior. In addition, I want to keep the basicHttpBinding.   When I try this I get the following exception message:   A binding instance has already been associated to listen URI 'http://saslaptop/BE/Application.svc'. If two endpoints want to share the same ListenUri, they must also share the same binding object instance. The two conflicting endpoints were either specified in AddServiceEndpoint() calls, in a config file, or a combination of AddServiceEndpoint() and config.   Should this be possible?   Code Block <system.serviceModel> <behaviors> <endpointBehaviors> <behavior name="WebHttpBehavior"> <webHttp/> </behavior> </endpointBehaviors> </behaviors> <services> <service name="Application.Webservices.ApplicationService"> <endpoint behaviorConfiguration="WebHttpBehavior" binding="webHttpBinding" contract="Application.Webservices.IApplicationService"/> <endpoint binding="basicHttpBinding" contract="Application.Webservices.IApplicationService"/> </service> <service name="Application.Webservices.TypeAhead"> <endpoint behaviorConfiguration="WebHttpBehavior" bindin

Best practice for WCF service exposing multiple client-specific endpoints?


Moving forward with re-designing a web service architecture using WCF, our team has been discussing how we want to expose the endpoints. Example: I have a standard endpoint that all users could use with the proper token, but I also have some number of endpoints that will instead use certificate security. All endpoints will ultimately use the same implementation, so this is really just different ways of getting in to the system.

The certificate endpoints will have to point to a specific certificate in the store so will only work for one specific client. The thought is that our standard service could live at http://mysite.com/MyService.svc and the certificate endpoints would be something like http://mysite.com/MyService.svc/Acme. The concern here is that I'm effectively putting our client list into our WSDL, which is not desirable.

What's the best practice here? Is there a way to direct multiple clients through a single certificate endpoint and get the cert on the code side (how would we know which client we're dealing with without a sp

How to configure relative address for additional endpoints


I have 3 endpoints on my service (hosted in IIS):




service name<

Configuration for STS with multiple endpoints


Hello all

I'm trying to configure an STS to have 2 endpoints. First endpoint accepts username client credentials and the second accepts the issued token as client credentials. So my client uses username and password to get a token, and when the token is about to expire I want to renew the token

I'm able to use the first endpoint but the second fails with error: Cannot find a token authenticator for the 'System.IdentityModel.Tokens.SamlSecurityToken' token type. Tokens of that type cannot be accepted according to current security settings.

I've tried to add custom service credentials but the are never hooked up.  

Exposing service with multiple endpoints


I have a service hosted as Windows Service. Now I want to make the same service availble via basicHttpBinding, wsHttpBinding.
So, I modified the my app.config as below using Microsoft Configuration editor. The WCF Service is already running on server (as Windows Service)

Note: The code (config) inside comments (below) is actual and the code inside "<!-- Newly .." is added later using config editor.
<!-- ORIGINAL -->
<!-- END - ORIGINAL -->

1. What I need to have in "baseAddresses" section for newly added endpoints (basicHttpBinding, wsHttpBinding)
2. Is newly added configuration correct?
3. Other than adding basicHttpBinding and wsHttpBinding, is there anything else that I need to do on "server"?

<?xml version="1.0" encoding="utf-8"?>
        <!-- ORIGINAL -->
        <behavior name="FirstServiceBehavior">
          <serviceMetadata httpGetEnabled="false" />
          <serviceDebug includeExceptionDetailInFaults="true" />

Service XXX has zero application (non-infrastructure) endpoints?


I have read a lot of discussions about this type of problem in this forum already.
However, I still not be able to make it works when I try to  test the service on m localhost by typing:
http://localhost/StudentService/StudentService.svc and it throws back this error 

"Service 'Dq.Services.Student.StudentService' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element. "

On the post build event, I also copy
MyDll.dll to inetpub\wwwroot\StudentService\bin   
StudentService.svc to inetpub\wwwroot\StudentService\.
Please let me know what wrong with my codes.

App.Config file:

<?xml version="1.0" encoding="utf-8" ?>
      <service name="Dq.Services.Student.StudentService&qu

Service with both secured and unsecured endpoints?



I have a service that looks like this :

			<service behaviorConfiguration="AppClientService.CustomValidator_Behavior" name="App.ServiceImplementation.AppClientService">
    <endpoint binding="netTcpBinding" bindingConfiguration="netTcpRegular" behaviorConfiguration="AppClientService.AppClientService_Behavior" address="Regular" bindingNamespace="http://App.ServiceContracts/2007/11" contract="App.ServiceContracts.IAppClientService" />
				<endpoint binding="netTcpBinding" bindingConfiguration="netTcpUserNameMessageSecurity" address="UserName" bindingNamespace="http://App.ServiceContracts/2007/11" contract="App.ServiceContracts.IAppClientService" />
				<endpoint binding="netTcpBinding" bindingConfiguration="netTcpWindowMessageSecurity" address="Windows" bindingNamespace="http://App.ServiceContracts/2007/11" contract="App.ServiceContracts.IAppClientService" />
    <endpoint address="httpMex" binding="mexHttpBinding" contract="IMetadataExchange" />
				<endpoint address="tcpMex" binding="mexTcpBinding" contract="IMetadataExchange" />

Custom tool warning: No endpoints compatible with Silverlight 4 were found.


Warning 2 Custom tool warning: No endpoints compatible with Silverlight 4 were found. The generated client class will not be usable unless endpoint information is provided via the constructor.

I am getting following warning when I try to add reference of WCF service (dual binding) Custom tool warning: No endpoints compatible with Silverlight 4 were found. The generated client class will not be usable unless endpoint information is provided via the constructor. Does silverlight not supporting binding other than basicHttp?? if yes, what are the other option for me? Please reply

Many Thanks Deepak

Reporting Services Authorization error depending on web endpoints



I have a solution that uploads reports to a reporting server (SQL 2008 R2)

For compatibility , I have two service apps which work completely the same way, but which use different web service endpoints:

App2005 uses http://localhost:8080/reportserver/reportservice2005.asmx

App2010 uses http://localhost:8080/reportserver/reportservice2010.asmx

Both Apps work fine on a test machine.

On my developer machine (local admin) App2005 works, but App2010 does not.

Error is "The request failed with HTTP status 401: Unauthorized."

The error raises at the ListChildren method, source snippet is here:


         oRes = New ReportService2010.ReportingService2010

         oRes.Credentials = System.Net.CredentialCache.DefaultCredentials

         oRes.Url = String.Format("{0}/ReportService2010.asmx", oArgs.ReportServerUrl)


         oItems = oRes.ListChildren(oArgs.FolderSearch, False)

Any hint here ?

I upgraded from SQL Server 2008 to R2, VS2008 and VS2010 installed on WinXPSP3

Host.Description.Endpoints.Find doesn't work with localhost


endpoint = context.Host.Description.Endpoints.Find(context.incomingMessageheaders.To);

This doesn't work if the client is using LocalHost in url. In this case incomingMessageheader.To contains Localhost, where as the hosted endpoints is having

my machine name.



Discovery on IIS hosted WCF service no endpoints found untill site is visited


I have a problem which makes the whole discovery (.net 4) idea useless.
I got self-hosted wcf services with discovey working so I now at least something about it, however, when I create a website with a .svc file, configure the web.config well and host it in IIS something goes wrong.

I have my windows forms client program to test the discovery and it doesn't return any endpoints, not after iisreset, not after checking twice, tree-times with long timeouts. I have to manually "visit" my .svc file in the website by browser to kind of activate it and than my client recogizes it immediately.

Because you have to visit the service first, you already have to know what the url is and makes discovery pointless in this case (and I need it so much)

What can I do about this?

enumerate service endpoints in web.config?


Is there a way to programatically enumerate service endpoints in web.config?  I would like to do so for my FederationMetaData Generator.



Programmatically Point To Different MSMQ Endpoints


We have an application that communicates with multiple sites.

On the basis of the site ID we would like to call a different msmq endpoint to receive the message.

It looks like we will need one msmq endpoint for each site.

How can I programatically set the code to call a specific endpoint?




TDS Endpoints


Hello all,

I have a question about TDS endpoints. I wanna know if I figured it right ? And did i missed something out? SQl server for communication whit application uses TDS protocol, and when packet reaches TDS Endpoint, SQL Server Network Interface (SNI) protocol layer encapsulates the TDS packet depending on where it goes (TCP/IP,VIA, HTTP...)

Thank you for your time and cheers!

WCF WAS MSMQ: Exception Server cannot find endpoints



Originally we hosted 2 MSMQ services in a single Windows 2008 Windows Service.  The WCF services ran fine.

We want to move this to WAS.

The site is called FallbackService

The app is called FallbackService

The virtual directory is called FallbackService

The application pool is called FallbackService

net.msmq binding and protocols are enabled for site and application

MSMQ Listener Adapter Service is activated

Queues are private and transactional

Queues security access is enabled.

Queue names are  fallbackservice/fallbackservice.svc    (I have also tried by removing the leading "fallbackservice/")


    [ServiceContract(Namespace = "http://chameleon/fallback")]
    public interface IFallbackService
        [OperationContract(IsOneWay = true)]
        void SerializePageMetaData(int siteID, PageMetaData pageMetaData);

        [OperationContract(IsOneWay = true)]

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