Print Page | Close Window

Creating Bindings Dynamically

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1691
Printed Date: 26-Apr-2025 at 5:12am


Topic: Creating Bindings Dynamically
Posted By: rasmus
Subject: Creating Bindings Dynamically
Date Posted: 17-Mar-2010 at 2:33pm
Hi
 
When calling a WCF service I am able to dynamically create a binding and attach the binding to the WCF proxy, like this:
 
 

CustomBinding binding = new CustomBinding()

//set binding properties

binding.xxx = xxx
....
 
 
ServiceClient proxy = new ServiceClient(binding, endPoint);
 
 
Can you tell me how to attach a dynamically created binding when querying the Devforce server from the silverlight app?
 
I know it is possible to set this from the ServiceReferences.ClientConfig file, but I need to do this from code.
 
Thank you for your help
 
Best Regards,
 
Rasmus



Replies:
Posted By: rasmus
Date Posted: 22-Mar-2010 at 3:16pm
Hi
 
I have som additional info to this post. When the call to the EntityServer is performed, the result (if the query is big enough) is this:
 
 
The binding on the server for the EntityService is configured like this:
<binding name="customBinaryBinding" receiveTimeout="00:10:00" sendTimeout="00:10:00" closeTimeout="00:10:00" openTimeout="00:10:00">

<binaryMessageEncoding>

<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" />

</binaryMessageEncoding>

<httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />

</binding>

 
The way I see it, what I need is to configure the client to accept 10 minute queries as well. Can anyone help me on this?
 
Best Regards,
 
Rasmus


Posted By: ting
Date Posted: 25-Mar-2010 at 3:01pm
Hi Rasmus,
 
In DevForce 2010, we will have an extensibility point that will allow you to customize the WCF endpoint, but unfortunately this is not available in DevForce 2009.  We will have a Release Candidate of DevForce 2010 (which supports .NET 4 & Silverlight 4) available shortly after April 13th.
 



Print Page | Close Window