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

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

How to configure an App.config for Silverlight 4 PollingDuplexHttpBinding

Posted By:      Posted Date: October 22, 2010    Points: 0   Category :WCF

Hi experts,

I have a chat with silverlight 4 (WCF) using PollingDuplexHttpBinding.

How to add a App.config file, to not have the endpointaddress in the code ?

This is my code (client side) :


 EndpointAddress address = new EndpointAddress(;


            PollingDuplexHttpBinding binding = new PollingDuplexHttpBinding(PollingDuplexMode.MultipleMessagesPerPoll)


                MaxBufferSize = 2147483647,

                MaxReceivedMessageSize = 2147483647




            TimeSpan newInactivityTimeOut = new TimeSpan(10, 0, 0, 0);

            binding.InactivityTimeout = newInactivityTimeOut;


            binding.SendTimeout = new TimeSpan(0, 0, 0, 5);






View Complete Post

More Related Resource Links

How use WorkflowHostingEndpoint w/ existing Activity and no .xamlx + configure in web.config

The only examples I can find on hosting non-service workflows leveraging a custom WorkflowHostingEndpoint (CreationEndpoint example in Samples) still makes use of a .xamlx file and only shows configuring a host in code. I'd like to take an existing Activity, leverage something like CreationEndpoint, and configure the service exclusively in the web.config for hosting in IIS. I'd also like the service to expose a mex endpoint. Is this possible and if so can someone refer me to an example?Blades Don't Need Reloading...

How do I use PowerShell to configure Web.Config for forms-based authentication for a Claims Based we

This TechNet article does a great job describing how to Configure forms-based authentication for a claims-based Web application using PowerShell. However, it glosses over editing the web.config file by just saying "Find the <Configuration> <system.web> section and add the following entry:" Is it possible to edit the web.config file using PowerShell using the IIS PowerShell snapin or can I just edit the web.config file as a xml document? This succeeds in adding the element, but only with the name and type. It does not add the connectionStringName or the applicationName import-module webadministration Add-WebConfiguration /system.web/membership/providers "IIS:\sites\[site name]" -value @{name="FBAMembershipProvider";` type="System.Web.Security.SqlMembershipProvider, System.Web, Version=, Culture= neutral, PublicKeyToken= b03f5f7f11d50a3a";` connectionStringName="FBAconn";` applicationName="/"} Does anyone any suggestions on a direction to go to add the membership providers and role providers in the web.config using PowerShell? This is very frustrating because I can do it manually, I can do it through the UI in IIS Manager, I can do it using appcmd, but no matter what I do, I can't get it to work using PowerShell.  

How to config PollingDuplexHttpBinding in ServiceReferences.ClientConfig ?


Hi Expert,

We use polling duplex in our Silverlight app, it is easier to set the config file in WCF service side  as follows, however, how to set the config file in Silverlight client side? 



          <add name="pollingDuplexHttpBinding" type="System.ServiceModel.Configuration.PollingDuplexHttpBindingCollectionElement, System.ServiceModel.PollingDuplex, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>






Is there any approach to set this? So that there is no need for us to rebuild the project every time when deploy on different server.


BTW, one article in MSDN

Reading Web.Config to pass values to silverlight Application

In asp.net application we often use to save the connection string and some other information like user name , web service URL etc in the web.config and then in application read them and use in the application and even we can easily changes these value at later time.However, this scenario does not work out of the box from a Silverlight application, which doesn't seem to even have access to web.config.The reason is simple: a Silverlight application runs on the client side. The XAP -just like the browser- cannot access server resources such as web.config. In this post I will show you how you can read the web.config and pass to the silverlight application and then on the silverlight application how can you read the passed parameters.

How to configure ServiceKnownType in app.config

I need to be able to transfer types unknown to the application at compile-time. For this I figured I could use the dataContractSerializer tag in the app.config and add the types as known types. This works as long as the types added are subtypes of a concrete or abstract class which is not System.Object.

However, I do not want to impose this restriction, in fact I would like the service contract to simply specify that an IEnumerable<object> (or alternatively IEnumerable<MyInterface>) should be transferred and then add the concrete classes as known types in the config file.

It can be done using the ServiceKnownType attribute at compile time, but this does not seem to be available in the configuration file.

Does anyone know of a way around this.

/ Rasmus

Two roles Admin,User. How do I configure the Web config file?


After reading this helpful thread on the same subject, I still haven't quite got it.

I want these rules:

Allow Admin to everything

Deny all none authenticated users from everything

Allow User to everything exept one page 'UserAdmin.aspx'

Here is my attempt at the last item


  <location path="~/UserAdmin.aspx">
                <allow roles="Admin"/>
                <deny roles="User"/>
                <deny users="*"/>

The problem is the account with the user role is either getting all access or no access.


Clean Web.Config Files (VS 2010 and .NET 4.0 Series)

.NET 4 includes a new version of the CLR, and a new .NET 4 specific machine.config file (which is installed side-by-side with the one used by .NET 2, .NET 3 and .NET 3.5).

The new .NET 4 machine.config file now automatically registers all of the ASP.NET tag sections, handlers and modules that we've added over the years, including the functionality for:

.ASP.NET Dynamic Data
.ASP.NET Routing (which can now be used for both ASP.NET WebForms and ASP.NET MVC)
.ASP.NET Chart Control (which now ships built-into ASP.NET V4)
What this means is that when you create a new "Empty ASP.NET application" project in VS 2010, you'll find that the new default application-level web.config file is now clean and simple:

Serving Silverlight Apps from Windows Mobile

Even if mobile dev is not my every day work, thanks to the .Net Compact Framework, it's still .Net programming.

Here is the scenario:

You come back home, you have a windows mobile phone wifi capable and you want to quickly get access to your phone pictures from your home network.
You just activate the Wifi, run my app and then browse to the provided link from any computer on the network.

Building a 3-Tier App with Silverlight 3, .NET RIA Services, and Azure Table Storage

Silverlight 3, .NET RIA Services, and Windows Azure Services Platform makes a 3-tier Cloud application easier to build: Silverlight 3 as presentation tier, .NET RIA services as the business logic and data access tier, and Windows Azure Table as the data storage tier. The sample application in this article demonstrates the architecture with a simple Survey application with all these technologies working together from Windows Azure.

Silverlight Simple Animation

Silverlight has several built in techniques for animating controls. Many of these technologies are particularly useful for creating simple animations meant to decorate a web page with eye catching movement that draws the reader's attention. In this post I will skip over these decorative technologies, and instead show how to create a simple animation using a technique similar to those used in many games.

Feature available to Silverlight 4 with VS 2010.

In Part I of this article series we have seen some features available to Silverlight 4 with VS 2010. We will continue to explore more in this article.

Silverlight Slideshow Viewer for SharePoint

This series will walk through the Building Blocks that I have created to demonstrate and improve the SharePoint end user experience. I have been using many of these techniques in my developer focused demos for SharePoint 2010 (and in some cases SharePoint 2007). My plan is to use this post series to distribute my code and provide more detail on the why and the how of many of my code samples

Easier Silverlight Development against SharePoint

I have been spending quite a bit of time lately working with Silverlight 3 and SharePoint. One of the first big shifts for me is that Silverlight Development is Client development. Silverlight runs in the browser, but it runs on the client, so no SharePoint Object Model code. You have to access all of the goodness that is SharePoint through its web services.

WPF / Silverlight tutorial: Visibility property and binding

Visibility property is a very powerful and yet often overlooked property available in both WPF and Silverlight. It enables you to set Visibility of certain UIElement objects to different states like: Visible, Collapsed and Hidden (not supported by Silverlight). This tutorial shows you how to use it and how to bind to Visibility property


Getting Started With Silver light

Integrate Reporting Services with Silverlight and RIA Services

One of the most wanted future features in Silverlight is the possibility to create business reports using Reporting Services. In this article, I will show how to use the existing Reporting Services technology with Silverlight and RIA Services combination.

all basic windows controls,wpf controls,silverlight application

here you will find all the information from basic.
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