New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Item is null or not an object error Thrown When Using LoD with WCF service


When the RadComboBox is using WCF service to load items on demand the following error could occur - Microsoft JScript runtime error: 'Items' is null or not an object. This issue is reproduced only when the following set of condition are valid: the Project/WebSite is using .NET framework 4.0, the browser is Internet Explorer, the RadCompression module is enabled and the service method does not return results. This is a problem with the .NET framework itself which we have already logged in MS Connect and its status could be tracked here: WCF Compression Issue


A solution to this problem would be to either remove the RadCompression module or to exclude the requests to the WCF service handler from the scope of the RadCompression module. In order to implement the second solution the following lines of code should be added to the web config file:

    <sectionGroup name="telerik.web.ui">
      <section name="radCompression" type="Telerik.Web.UI.RadCompressionConfigurationSection, Telerik.Web.UI, PublicKeyToken=121fae78165ba3d4" allowDefinition="MachineToApplication" requirePermission="false"/>
        <add handlerPath="Service.svc" matchExact="false"/>

The handlerPath is relative to the root of the application and if the service is placed inside a specific folder, it should be also included in the path. The matchExact attribute determines whether the rule will be forced for the specified path only or globally for the entire web site/web application project

See Also

In this article