.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

Problems with multiple calls from the same client

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :WCF

Hi all!

I have a service with the following binding configuration (identical on server and client), running under IIS (Win 7 x64):

 <binding name="Printec.TMS.DCS.WindowsTcpBinding" maxReceivedMessageSize="6553600" 
  maxConnections="2000" listenBacklog="2000" closeTimeout="00:10:00" 
  sendTimeout="00:10:00" receiveTimeout="00:10:00" openTimeout="00:10:00">
 <readerQuotas maxDepth="200" maxStringContentLength="6553600" maxArrayLength="6553600" />
 <reliableSession enabled="false" />
 <security mode="None" />

Here is the service behaviour:

<behavior name="ServiceBehavior">
 <dataContractSerializer maxItemsInObjectGraph="

View Complete Post

More Related Resource Links

Extreme ASP.NET: Client-Side Web Service Calls with AJAX Extensions


Microsoft AJAX Library and the ASP.NET 2.0 AJAX Extensions provide a number of compelling features ranging from client-side data binding, to DHTML animations and behaviors. Learn all about them here.

Fritz Onion

MSDN Magazine January 2007

Educational question: How server objects are accessed from multiple client threads?

I will appreciate it if someone can help me to undestand how the following scenario works:   There is remoting server that is registered as WellKnownObjectMode.Singleton. Server implementation: It instantiates a class TestServer that implements interface IFoo interface IFoo { IHelper GetHelper() }   interface IHelper { void StoreString(); }   Implementation of TestServer: internal sealed class TestServer: System.MarshalByRefObject, IFoo { private IHelper> helper = new Helper(); public IHelper GetHelper(string helper){return helper;} }   Implementation of Helper: internal sealed class Helper : System.MarshalByRefObject, IHelper { public void StoreString (string val) {}; }   Implementation of a client (simplified; shown to illustrate the question only): static class Program { public static IFoo TestService; public static IHelper Helper; public TestThreads testmultiplecalls; [STAThread] static void Main() { TestService = (IFoo)Activator.GetObject(typeof(IFoo),"ipc://Channel"); Helper = TestService.GetHelper(); testmultiplecalls.Start(); } }   internal class TestThreads { public Start() { for (int i = 0; i < 20; i++) ThreadPool.QueueUserWorkItem((new TestCall(i.ToString())).DoWork); } }     internal class TestCall { private string m_str; public TestCall (string str) {m_str = str;} public void DoWork() { Program.Helper.StoreString(m_str); } }     Que

Problems with multiple validation rules



I've added some custom validation rules programatically like this:



            BindingOperations.GetBinding(txtTitulo, TextBox.TextProperty).ValidationRules.Clear();

            BindingOperations.GetBinding(txtTitulo, TextBox.TextProperty).ValidationRules.Add(new ReglaDatoRequerido(Idioma.RecursoIdiomaLocal(this, "msjErrorDatoRequerido")));

            BindingOperations.GetBinding(txtTitulo, TextBox.TextProperty).ValidationRules.Add(new ReglaRangoDatos(Idioma.RecursoIdiomaLocal(this, "msjErrorDatoRequerido"), 1, 5, false));

these are the rules:
public abstract class ReglaValidacionBase : ValidationRule
        /// <summary>
        /// Mensaje de error.
        /// </summary>
        public string MensajeError { get; set; }

   public class ReglaDatoRequerido : ReglaValidacionBase
        public ReglaDatoRequerido(st

Problems with XmlDsigEnvelopedSignatureTransform and multiple signatures


 I'm having a lot of problems using XmlDsigEnvelopedSignatureTransform when signing an XML document multiple times. For example, I have a simple document and I add a signature to it, then, when I check the document, the signature is valid and everything is fine. But when I add a second signature to the previously signed XML then the problems begin: the second signature is valid, the first one not! This seems like if the XmlDsigEnvelopedSignatureTransform is not removing the already existing Signature nodes (as from W3C specifications) from the document before signing and when verifying, so the second signature broke the first one. This behavior is also specified in the MSDN documentation:

The XmlDsigEnvelopedSignatureTransform class removes the <Signature> element from an XML document before the digest is computed. With this transform, you can sign and verify all elements of an XML document except the XML digital signature elements. 

To confirm this, I've tested the example found in the official documentation and the results are like I imagined, the Signature element is not removed:

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

Client authentication problems, NTLM




Hope somebody can me with this. Have tried everything by now.


I have created a wcf service which I'm trying to access with my client. I get the following message:


The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'Negotiate,NTLM'. The remote server returned an error: (401) Unathorized.


I have enabled "Integrated Windows Authentication" on the Virtual Share on the IIS which is hosting my service.


Client config:


<security mode="TransportCredentialOnly">

<transport clientCredentialType="Ntlm"

WCF service with multiple client certificates




How can I specify multiple client certificates for my service? I have a service with nettcpbinding hosted in IIS, which  will be consumed by multiple clients. Each client will be having its own certificate. I want that service should have a list of certificates of clients which are allowed to call it, for others it should fail. 


Service behavior configuration only allows one client certificate value, how can I specify multiple client certificates. My present service web.config is



WSDuelHttpBinding and multiple time messing between service and client in one session


i am very new in wcf.suppose my wcf service is hosted in real ip server.Clients will request to service through internet.

client will request to service.The service will authenticate the client.After receiving the request the service will do some processing(like database update,delete,insert) and send a lot amount of data to client.client will do some database action and send an acknowledgment to service.service will keep its in database as a record.I need to do it in a session  and in a transaction.How can i do this.

i choose WSDuelHttpBinding.i read about callback operation.but according to the above scenario i also need to callback to the service again to send acknowledgment . Please help me.it's urgent .




Multiple AJAX calls in JQuery


I am trying to make 2 separate AJAX calls using buttons. What I want to happen is: when Button1 is clicked ProductsTable shows data from the webservice; when Button2 is clicked OthersTable shows its own data from the webservice. But right now, when either button is clicked, nothing shows up. I know the code works if there's only one of them and it's not wrapped around a .click function.

No error messages. ASP.NET 4.0, JQuery 1.4.4. Not using ScriptManager. Not using UpdatePanels.

Code below:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <script src="Scripts/jquery-1.4.4.js" type="text/javascript"></script>
    <script src="Scripts/jquery.tmpl.js" type="text/javascript"></script>
    <script id="ProductsTemplate" type="text/x-query-tmpl">
        <table id="ProductsTemplate">            

Multiple Client Callbacks




I am attempting to create a file sync service with a WCF Service.  The service will be hosted on my external webserver, and multiple clients will connect to it.  The service will use duplex communication, have InstanceContextMode set to single and SessionMode set to Reentrant.

When a client uploads a new file to the server via a ServiceOperation in WCF service, i need the service to use callbacks to, call methods on all other connected clients to download the file.

My Question:

How do I access the callbacks for each of the connected clients individually?  Is this possible?

Thank you very much

Jordan Haines


Software Developer and Web Designer

problems with trace.writeline not writing output messages on multiple instance/thread service



I've come across something strange and can't quite figure out what could be going wrong. I have a windows service which processes queue items in a threadpool (default 5 threads).

So, during testing, i "debug, start new instance" and spin up about 4-5 instances of the service, and on average there is about 25 threads going at same time.

My trace code:
Trace.WriteLineIf(traceOutput.TraceVerbose, string.Format("processing Item for {0}", item.id));


this seems to work for a while and writes the trace code to the output window, but after a while, the trace output just stops being output to the window.. has anyone else experienced this before or could know what might be going wrong?




To invoke multiple async WCF service calls within a WCF service


I have a scenario for WCF service A implementation where in one one WCF service interface method make multiple async calls to 4 separate WCF service interfaces to get some data (all 4 services have separate set of methods interacting to different servers over internet to get some data basis the input provided). The data thus returned to the WCF service A will be collated & maintained in cache & then will be used to make further 4 subsequent async calls to these 4 separate WCF services for different methods from WCF service A.

The wcf service A will be invoked from a portal asynchronously supplying the input parameters.

I would like to know if any one out here has ever done something like this & if yes then any challenges faced?

Or else how to achieve this kind of functionality using some other concept keeping the first level WCF service intact...



WCF Callback - multiple Client Multiple Server

Its easy fro one server with multple clients registering their callback address to single server. What i want to use multiple server to have clients callbacks address shared among all servers. because we are using load balancing server, we dont know which server will reposnse to request. Kindly tell me any solution for this

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.

Use jQuery and ASP.NET AJAX to build a client side Repeater

By sending only data to the client, you can profoundly reduce the size of what you send and see a substantial increase in performance. You also allow yourself the ability to easily add features like light-weight sorting and paging on the client. This can not only improve your users' experience, but reduce server load and bandwidth requirements.
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