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

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

Multiple endpoints in IIS

Posted By:      Posted Date: September 18, 2010    Points: 0   Category :WCF
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

View Complete Post

More Related Resource Links

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

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

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" />

Multiple database support with Entity Framework

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

Binding the multiple drop down boxes in GridView using JQuery in ASP.NET

Here is the code for binding the multiple drop down boxes in GridView using JQuery in ASP.NET

Upload Multiple File using JQuery in asp.net

In this article I have explained how to upload multiple files using file upload control. I have used jQuery plugin for uploading multiple files.

I have also explained how to check for file type, file maximum size limit using jQuery & also using server side validation code.

Adding Multiple Columns and Rows in GridView without using a Database

This article describes on how to add multiple columns and rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in each TextBoxes on Button Click and retain the GridView data on post back.

GridView Multiple Filter AJAX Control

This AJAX control enables the user to filter data within any column inside a GridView. The user can add multiple filters and can delete existing ones too.

Multiple Column Dropdownlist for the ASP.NET DataGrid

Based on my previous control "Multiple Column DropDownList for ASP.NET", I received many emails asking for the same control to be used in the DataGrid for web applications. Here we go.. This control can be used as the regular MS DropDownList in the DataGrid and also as a regular dropdownlist. It has all the properties, like DataTextField, DataValueField, DataSource, SelectedIndex etc. The download file contains the samples both in VB.NET and C#. In this sample, I have used the Northwind database of SQL Server.

ASP.NET Multiple Selection DropDownList with AJAX HoverMenuExtender

Recently, I was looking for a multiple selection dropdownlist control for my new project. After spending some time researching for it, I decided to put together all my finding in one web user control. This web user control consists of an ASP.NET AJAX HoverMenuExtender, JavaScript, StyleSheet and CheckBoxListExCtrl . The final product will work with or without a MasterPage and you can drag and drop more than one instances of the control on to the page.

jquery autocomplete multiple values


i got some samples and i did autocomplete using jquery , its working well for single input values

but i need to pass multiples values after one by one in the textbox. Is it possible to pass multiple

values in the textbox for autocomplete in jquery in asp.net?


Gmail style multiple Sign-in type combo...is it possible in asp.net?


I am developing a multi-company application and want my users to give the functionality like the following to switch companies.


Is this possible? then how?

Please help


Multiple Instances of User Control


I have a user control that I place on a page severl times.  When I make a selection on a ddl in one one control the SelectedIndexChanged event fires for all the control on the page for that ddl.  So I get duplication of an insert that I do.  Is there a way to make sure these events are isolated so this doesn't happen.


>>>How to update multiple rows of gidview by one click



I want to add multiple rows of a gridview if the data for multiple fields are same.

Idea for this is that a user may search a record with some parameter e.g. Sector, plot.

For example 15 records being displayed in gridview.

There should be checkbox before every row and if user wants to update Plot and Flat No that is same for 10 rows out of 15 so he will check the rows and update.

For this a dialog box should appear asking for the parameter i.e. Plot and Flat or something else next time may be it will be City or country. Moreover, there is already an Edit button to update records, when user click it another page open for the record to be updated and whatever he wants to update, it updates.

Hope everone understand the scenario.

I don't want to disturb the already provided Edit functionality and want to provide same record to be updated.

Any idea in this regard would be appreciated.

Multiple membership providers



In my web.config I have:

        <add name="ADProvider1"
        <add name="ADProvider2"

If I just have ADProvider1 it works, when I add ADProvider2, even though for testing I only use ADProvider1 I get an error: "Unable to establish secure connection with the server"

Am I adding the second provider to the membership section incorrectly?



Error: Encountered multiple versions of the same assembly with GUID...try pre-importing...TlbImp


Hi!  Can someone tell me how I can troubleshoot the following error: "Encountered multiple versions of the same assembly with GUID...try pre-importing one of these assemblies".

The website developed in VS 2010 (.Net 3.5). This error is only received on my workstation.  Another person developing the site does not experience this issue at all.  Also, not sure if this matters, but on my workstation the 'Assembly Information...' dialog contains no values even though the 'AssemblyInfo.vb' file does specify values for the title, desc, etc.  The GUID being referenced in the error is the main project of the three projects within the solution.

I tried looking through the GAC, but do not see any references to the projects or DLLs in the VS solution and am not sure what else/where to look.

If I delete the copy of the solution on my local machine and pull down a copy from source control (AnkhSVN) the solution will build with no error.  Once I make any changes, such as adding a new aspx file, then the error is received.

I can provide any additional information needed.

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