Recently I came across a problem with the ASP.NET AJAX accordion control which caused my machine to have a System.OutOfMemoryException. This was caused by an attempt to bind a large result set returned from a WCF serviceĀ to the accordion control. The error never directly specified out of memory, but instead display the following webpage [...]
Archive for the ‘WCF’ Category
Further to my previous blog entry about the WCF 10 connection limit and its inability to implement the IDisposable interface or allow the use of the “using block” to free up the connections, I decided to write a generic base class. This base class does not close the connection automatically,nor does it dispose of the [...]
Binding the selected index of a dropdown in an AJAX accordion control
Posted: 15th February 2010 in AJAX, WCFGiven the task of populating and binding controls within an AJAX accordion control I thought things would be easy. However, binding to a selected index of a dropdown control was not as easy as I first suspected. Below is one of the accordion section included in my tab container. Accordion with dropdown <asp:Accordion ID="devicesAccordion" runat="server" [...]
///
/// Gets the towns.
///
/// The list from the cache if it exists; or from the database
public List GetTowns()
{
if (!this.cacheManager.Contains(“towns”))
{
using (var svc = new NetworkServiceClient())
{
var towns = svc.GetAllTowns();
this.cacheManager.Add(
“towns”,
towns,
CacheItemPriority.Normal,
null,
new SlidingTime(TimeSpan.FromMinutes(Constants.CacheTimeout)));
}
}
return (List)this.cacheManager.GetData(“towns”);
}
By default a WCF or ASMX service returns list as arrays. However, this can be overcome by amending the properties of the service proxy. Right click on the service reference and choose configure service reference and you should be presented with a screen similar to the one below. Choose System.Collections.Generic.List from the drop down.
Issues when trying to access a LINQ to Entity Layer from a WCF Service
Posted: 1st December 2009 in LINQ to Entity, WCFTags: Entity Framework, Exceptions, WCF
Listed below are some issues and solution you may come across when trying access a LINQ to Entity layer from a WCF Service located in a separate project. Problem: Argument Exception: “The specified named connection is either not found in the configuration, not intended to be used with the EntityClient Provider, not valid.” Solution: The [...]