Archive for the ‘WCF’ Category

AJAX Accordion OutOfMemoryException

Posted: 29th March 2010 in AJAX, JQuery, WCF

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 [...]

WCF Client Generic Base Class

Posted: 26th February 2010 in WCF

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 [...]

Given 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" [...]

WCF 10 connection limitation

Posted: 15th February 2010 in AJAX, WCF

///
/// 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”);
}

Returning Generic List from a WCF service

Posted: 13th January 2010 in WCF

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.

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 [...]