Hi, I'm currently using two cacadingdropdown extenders which retrieves data from webmethods (no webservices) embedded in aspx page. One is the parent of the other. And now each time I refresh the memory increases 800-1000K at the time. But the strange thing is that if i remove the parent child relationship (no extender has parentcontrolid defined) the memory leaks do not accur.
Am I doings something wrong, is something missing in webconfig?
12<!--34-->5<configuration>6<appSettings/>7<connectionStrings>8<add name="UtstyrConnectionString" connectionString="Data Source=WIN2003STDBASE;Initial Catalog=Utstyr;Integrated Security=True" providerName="System.Data.SqlClient"/>9</connectionStrings>10<system.web>11<pages enableEventValidation="false"></pages>1213<compilation debug="true">14<assemblies>15<add assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>16<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation>1718<authentication mode="Windows"/>19 <identity impersonate="true"/>20 <authorization>21 <allow users="*"/>22 </authorization>23<httpHandlers>24<remove verb="*" path="*.asmx"/>25<add verb="*" path="*.asmx" validate="false" type="Microsoft.Web.Script.Services.ScriptHandlerFactory, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>26<add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/>27</httpHandlers>28<httpModules>29<add name="WebResourceCompression" type="Microsoft.Web.Handlers.WebResourceCompressionModule, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>30<add name="ScriptModule" type="Microsoft.Web.UI.ScriptModule, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>31</httpModules>32</system.web>33</configuration>
Cheers GauteO
PS both my dropdownboxes and cacadingdropdownextenders are in an updatepanel
Here is a simple sample of what I mean. If anybody could run this to determine if it is a internal problem.
1<%@. Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>2<%@. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc2" %>3<%@. Register Assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"4 Namespace="Microsoft.Web.UI" TagPrefix="asp" %>5<script runat="server">6 [System.Web.Services.WebMethod]7 [Microsoft.Web.Script.Services.ScriptMethod()]8 public static AjaxControlToolkit.CascadingDropDownNameValue[] Get(string knownCategoryValues, string category)9 {10 int count = 5;11 AjaxControlToolkit.CascadingDropDownNameValue[] cddnv = new AjaxControlToolkit.CascadingDropDownNameValue[count];12 for (int i = 0; i < count; i++)13 cddnv[i] = new AjaxControlToolkit.CascadingDropDownNameValue("Gaute" + i, i.ToString());14 return cddnv;15 }16 </script>17<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">18<html xmlns="http://www.w3.org/1999/xhtml" >19<head runat="server">20 <title>Untitled Page</title>21</head>22<body>23 <form id="form1" runat="server">24 <div>25 <asp:ScriptManager ID="ScriptManager1" runat="server">26 </asp:ScriptManager>27 <asp:DropDownList ID="DropDownList1" runat="server">28 </asp:DropDownList>29 <asp:DropDownList ID="DropDownList2" runat="server">30 </asp:DropDownList>31 <cc2:CascadingDropDown ID="CascadingDropDown1" runat="server" Category="Valg" LoadingText="Laster" PromptText="Velg" ServiceMethod="Get" TargetControlID="DropDownList1">32 </cc2:CascadingDropDown>33 <cc2:CascadingDropDown ID="CascadingDropDown2" runat="server" Category="Velger" LoadingText="Laster" PromptText="Velg" ServiceMethod="Get" TargetControlID="DropDownList2" ParentControlID="DropDownList1">34 </cc2:CascadingDropDown>35 </div>36 </form>37</body>38</html>
This code gives me a memory leak of 700-1000k each time the page posts back. And if I remove the ParentControlId from CacadingDropDown2 (line 33) the memomry leaks stops. Testet the samplewebsite in ajaxtoolkit (cacadingdropdown) and that didn't have the memoryleaks. I have tried to elumate(copy) the procedure in the site, but cant stop the leaks.
GauteO
*bump*
also tried with RC1 release, same problem..
What Browser are you testing with? Or is this problem occuring in all browsers?
The reason I ask, is that I found that several issues with the CascadingDropDowns disappeared when I moved to IE 7.0. For example, with IE 6.x I have found that having two different sets of CascadingDropDowns on the same page will break the functionality of the SelectedValue tags... Only the first set of CascadingDropDowns will get the correct initial value...
Currently I have only testet with ie6, I shall test on other browser when I get to work again (as I'm currently home). I usally test in opera, firefox, ie6 and ie7+(vista browser). But I am really cursious if anybody else get this memory leak when one of the cascadingdropdown extenderes has an parentcontrolid assign to it, and stops when none have an parentcontrolid. They provide/retrieves the same information in both instances, only diffrence that the cacadingdropdown with parentcontrolid has the "knownvalues" of its parent (and 700-1000k is pretty much for 5 values beeing sent, as in the sample in the second post). Maybe I must embed the information in XML (as they do in the sample site ajaxcontrolkit)?
Hmm, I have testet the scenario on opera and ie7+ and the memory leaks do not accur. I also testet the sitehttp://ajax.asp.net/ajaxtoolkit/CascadingDropDown/CascadingDropDown.aspx again, with ie6, and the memory leak problem accurs there too (was sure that I tested this before and didn't have the problem, it was beta2 not rc1 which I testet now). It seems that ie6 is the problem, I am running 2003 server on a virtual pc(vmware), but it does not have the latest updates (trying to install them, but windows update just stops). Maybe this problem only accurs on old versions of ie6 (IE that follows a clean install of 2003 server), if anybody could confirm this it would be of great help (use the cacadingdropdown example on the ajaxcontrolkit website). My current version of ie6 is:
GauteO
That this doesn't happen in other browsers (including IE7) suggests to me that it's probably not something the Toolkit is doing wrong. Please let us know what happens with an updated IE6.
No comments:
Post a Comment