.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

WCF Service configuration in Web Farm and Load Balancing envrionment.

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

I want to configure ASP.NET Website Project using WCF Service[NetTcp] (both in c#) for web-farm (for website) and NLB Load balancing (for service). I would like to configure following options for same.

NetTcpBinding.maxConcurrentCalls, NetTcpBinding.ListenBacklog and NetTcpBinding.MaxConnections

Note: During single machine configuration when I changed value of NetTcpBinding.ListenBacklog and NetTcpBinding.MaxConnections in WCF Service project to more that 10, which is default value. I got exception. When I changed this value in Website it was working fine. Due to this I had to keep in default configuration. Not sure why this is the case. If anyone could explain this it would be helpful.

Following reference gives idea how to configure in given environment but does not tell how to go about it.

Ref: http://msdn.microsoft.com/en-us/library/ee377061%28BTS.10%29.aspx

Let me simplify a bit. Lets say I have following configuration.

  • 2 IIS servers in Web Farm.
  • 3 WCF Service Servers (NetTcp) in NLB
  • Default config. for single instance.
    • NetTcpBinding.ListenBacklog: 10
    • NetTcpBinding.MaxConnections: 10
    • NetTcpBinding.maxConcurrentCalls: 16

View Complete Post

More Related Resource Links

Load balancing using web service

Hi Friends                 Presently we are developing a windows product using dot net, combined with sas (another language). If sas not get installed in local machines then we are in need of using server machine which has sas with it, we are using socket programming to communicate with server machine, Problem is when more number of requests comes to the server for processing sas it is becoming slow, so we need  Load balancing If we go with web service which is having same domain name but different ip address mapped using Domain Name System (DNS) We will get work done faster     What i want is will this work fine, what else i have to done for achieving this, how can i test itWaitingBalaji Manoharan  

Service Configuration Editor (SvcConfigEditor) in VS 2010: An attempt was made to load a program wit


I am using Visual Studio 2010 Premium installed on Windows 2008 HPC with service pack 2. I am attempting to use the Service Configuration Editor (SvcConfigEditor.exe with File and Product version 4.0.30319.1) to create a new service configuration.

1. I opened the web.config file for the WCF service

2. I clicked the link "Create a New Service..." to bring up the "New Service Element Wizard"

3. I browsed to the WCF service \bin folder and selected the DLL. I received the error dialog box containing the message:

Could not load file or assembly 'file:///d:\...\MyService.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.

4. I made sure that the WCF service and all referenced DLLs are configured for the same Target CPU of x86.

Below is the FUSLOG viewer entry when this error occurred:


*** Assembly Binder Log Entry (5/4/2010 @ 5:54:16 PM) ***

The operation failed.
Bind result: hr = 0x8007000b. An attempt was made to load a program with an incorrect format.

Assembly manager loaded from: D:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable D:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\SvcConfigEditor.exe
--- A detailed error log follows. 

=== Pre-bind state information =

Workflow Service failing on high load

Hi, I am load testing my workflow service to ensure that it can sustain high loads for a high volume transaction application. I am using Visual Studio's Load Test to run on a simple unit test to call the workflow service. I have configured the bindings on my service as follows:  <bindings>      <netTcpBinding>        <binding portSharingEnabled="true" closeTimeout="00:10:00"                 openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"                 maxBufferPoolSize="20480000" maxBufferSize="20480000" maxConnections="10"                  maxReceivedMessageSize="20480000"  >                    <security mode="None" />        </binding>      </netTcpBinding>  &n

Best Practice for Windows Service "Settings" (Configuration) with .Net (C#) ???

Background:   I'm developing a Windows service using C# and .Net 3.5.  The behavior of the service should be controlled by some settings.  The settings will vary per host-computer but will not vary per user (which should be understandable since the settings control behavior of a service.)  A GUI panel of sorts must be provided to set-up and modify the settings that control the service behavior.Secondly, there is a "locally installed application" that has its own settings and those settings also vary per host-computer so all users of that computer would experience the same settings.  (Seemingly analogous maybe to a connection string but not a connection string.)Note that I do NOT perceive any need for Click-once support, web support, and so forth.  Translation:  I think I need the simplest darn type of settings support, the old "dinosaur" level of requirements not much more sophisticated than INI files used to be. I've researched using the "built-in" settings that make use of the Settings Visual Designer in VS 2008 and  System.Configuration.ApplicationSettingsBase.  It seems that: 1.  Application Settings cannot be changed at runtime.  MSFT documentation indicates the software must be shut down and settings must be modified by patching the XML with a text editor (notepad et al.)  The framework specifically prohibits application settings from being

AJAX call is not working on F5 load balancer web farm setup

I have the following web farm setup in production server.Browser --> HTTPS --> Load Balancer --> HTTP --> webserver nodeF5 Load balancer handles off box SSL termination. It implies that SSL resides on F5 load balancer. Problem Statement: Ajax calls do not go through unless "Access data sources across domains" option is enabled in IE security settings. I have the similar setup in staging server except F5 Load balancer. The ASP.Net application makes perfect AJAX calls on both HTTP and HTTPS.However, the staging server web farm use windows NLB and SSL resides on individual web server nodes

Could not load type 'System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtec

I have a windows service that runs on client machines and connects to a WCF service on a server.  This windows service seems to work fine on Windows XP, Vista and 7  machines, but when I try and run it on a Server 2008 R2 machine I get the following error: System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for system.serviceModel/bindings: Could not load type 'System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement' from assembly 'System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'. (C:\Program Files (x86)\MyFolder\MyApp\MyAppWinSVC.exe.Config line 4) ---> System.TypeLoadException: Could not load type 'System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement' from assembly 'System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'.    at System.ServiceModel.Configuration.HttpTransportSecurityElement.get_Properties() I have the 3.5 sp1 feature installed. The only thing I have found online that is remotely similar is this MS hotfix: http://support.microsoft.com/kb/2262911 But when I try and apply it, it says that it isn't for my computer. Does anyone have any ideas how to resolve this issue?

Load balancing and Custom Filters in WCF 4.0 Routing Services

Hi, Couild someone please guide me to various ways of achieving load balancing using Router Service. i tried seeing few Blogs and tried to understand the round robin concept and the custom filters conceptr. but i m not able to see any specific site which would guide me on various examples of custom filters .And round robin seems a bit complex. http://blogs.msdn.com/b/routingrules/archive/2010/04/14/load-balancing-at-the-routing-service.aspx The above link gave me some insight  . is there any othe way of achieving load balancing other than Round robin. I did go through the samples of Routing services in WCf training Kit Thanks

How to get all Secure Store Service (SSS) applications in the farm

Hello everyone, I am trying to use SharePoint 2010 Secure Store Service (next SSS) in my application to get credentials to external system. Is there any way to get all possible applications (IDs) from API provided. Currently I am using next code to get all applications: SecureStoreProvider provider = SecureStoreProviderFactory.Create() as SecureStoreProvider;             provider.Context = SPServiceContext.GetContext(SPServiceApplicationProxyGroup.Default, SPSiteSubscriptionIdentifier.Default);             if (provider != null)             {                 foreach (var app in provider.GetTargetApplications())                 {                     Console.WriteLine(app.Name);                 }             } However it depends on SPServiceApplicationProxyGroup.Default and SPSiteSubscriptionIdentifier.Default parameters. So in case I remove SSS from

Load Balancing/Load Sharing features in SQL Server 2005/2008

Is there any load balancing features in SQL Server? My understanding is that SQL Server Clustering is not a load balancing feature.  Other features seem to be more like load sharing features: Degrees of Parallelism Table Partitioning Resource Governor seems to be more like a resource allocation feature.          

Getting "Provider load failure" from SSRS Configuration Manager (SQL 2008 R2 Hot Fix CU3 did not fix

After upgrading our SQL 2008 cluster to R2, SSRS on one node works fine, but the second node will not allow connection via the Configuration Manager (getting "Provider load failure").  We've done re-installs, repairs and applied Hot Fix CU3, but the issue remains. NOTE: It's understood that SSRS is not a clustered resource.  We have it installed as separate instances on each of the two cluster nodes.

Unable to access Configure Service Accounts using the Farm acount

hi all, I am new to SharePoint and have started working directly on SP2010,   I installed SP 2010 using the Domain\spadmin account. I have also added mine domain account as the administrator in the central admin(farm administrator) now m trying to start the SharePoint Server Search 14 service from "services.msc" for which the log in as user is mine domain account, for which i am getting the following error: The SharePoint Server Search 14 service failed to start due to the following error: The service did not start due to a logon failure. if I check for all the services which are running in SharePoint I get that SharePoint Search service is active. also when i try to access Central Admin --> Security --> Configure Service accounts then I get the error message as access denied signin as different user.   Please help me out as i need to configure search for my application and m not having the access.   Thanks for the help Arun Kumar

Farm Configuration Question

I work for a community hospital. We are planning a Sharepoint 2007 install in our Win2003 domain. While I have recommended a medium farm configuration with a separate server for Web, application and database, we will probably, at least initially, use the small farm configuration of web/app server and database server. If later we need to expand and add servers how difficult will it be if we start with the small farm configuration? Can we just add more web/app servers or will we need to split roles so each tier is on its own server?

WCF 4 Router Service configuration issue


I've created a WCF 4 Router Service and am hosting it in IIS7. It works fine on my development machine, but when I deploy to the QA server is returns the following message:

The configuration section 'routing' cannot be read because it is missing a section declaration

The section it's complaining about is the standard WCF4 routing section:

<filters>          <filter name="MatchAllFilter1" filterType="MatchAll" /> 

Installation of Sharepoint 2007 Service pack 2 fails on Step 8 of Sharepoint Configuration Wizard


Here's the deal:-

Our test environment consists of one SQL Server 2005 machine, 1 Domain Controller and 1 Windows 2008 R2 server with Sharepoint 2007 and Project 2007 installed.

We wanted to test the installation of Sharepoint 2007 Service Pack 2 in our test environment. I followed the instructions available from Technet to install both the WSS 3.0 SP2 and MOSS 2007 SP2 http://technet.microsoft.com/en-us/library/dd637740(office.12).aspx BUT the last part of the Sharepoint Configuration Wizard failed with the following error:-


SQL Database 'ProjectServer_Published' on SQL Server instance 'SPDatabaseServiceInstance'

not found. Additional error information from SQL

Server is included below.


Cannot open database "ProjectServer_Published" requested by the login.

The login failed.

Login failed for user 'domain\FarmAdmin'.

The weird thing is my database is called 'MTL_Project_Published'

So it looks like it's looking for the old project databases.

Has anyone encountered this issue before when installing the service pack 2 of Sharepoint 2007 in their environment?


I have tried all the other solutions posted on the Internet such as running the upgrade via the command prompt, cleari

WCF Router service - How to implement Load Balance



Do you know if is possible to implement a Load Balance using this WCF Router Service ?

I know that WCF Router Service has routing and backuplist feature. 

By the way, how does WCF Routr Service deal with services that have Callback Contract ?


Luis Filipe (from Brazil: Sorry about the English!)

Is network load balancing improved for TCP remoting in .Net 2.0 ?


The MSDN TV broadcast for improvements in .Net remoting 2.0 says that the Socket Cache for TCP has been improved to allow for better load balancing.

I cant find any other information about this.

Does this mean that Network Load Balancing is now viable for .Net Remoting 2.0 using the TCP channel ? ( some previous posts say that NLB does not work ideally with older .Net remoting TCP connections )


Variable value within SQL Server table Configuration is not being updated within load of DTSX packag



I am probably missing something obvious here; -
I have created a package with a variable named; - ServerName and a value of 'KIERAN-PC'
I exported this variable as an SSIS configuration within a SQL Server table

I noticed the following record appeared within the SQL Server configuration table.


ConfigurationFilter ConfiguredValue PackagePath ConfiguredValueType
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