KB 316775 reproes in .net 1.1 - XSLT with script has memory leak

Discussion in 'ASP .Net' started by =?Utf-8?B?Sm9obiBNb29yZQ==?=, Nov 10, 2004.

  1. I have a set of code that is called on every page load that loads an xslt
    file. The xslt file has an embedded <script> tag. Loading the page mutliple
    times causes aspnet_wp.exe to use all available memory and then reset. As
    this happens several times over the course of an 8 hour stress run, I'm
    looking for a solution.

    The xslt file has the following:
    <xsl:if test="$strPageCaller=''">
    <SCRIPT LANGUAGE="JavaScript">BPB()</SCRIPT>
    </xsl:if>
    <xsl:if test="$strPageCaller!=''">
    <SCRIPT LANGUAGE="JavaScript">if (history.length > ((bNS)?1:0))
    document.write("<A class='p1s23'
    href='Javascript:history.go({$strPageCaller});'><B>Return to
    Previous</B></A>");</SCRIPT>
    </xsl:if>

    The calling code is this:
    XmlDocument l_objXMLDoc = new XmlDocument();
    System.IO.StringWriter l_objWriter = null;
    XslTransform xslt = null;
    l_objXMLDoc.LoadXml(m_strXML);

    // Create an XPathNavigator to use for the transform.
    XPathNavigator nav = l_objXMLDoc.CreateNavigator();

    // Transform the file.
    l_objWriter = new System.IO.StringWriter();
    xslt = new XslTransform();
    xslt.Load(Server.MapPath(
    ConfigurationSettings.AppSettings["XSLT_PATH"] // get path for xslt file
    storage
    +
    "/xsltfile.xslt") // append physical filename to path
    );

    xslt.Transform(nav, l_objargList, l_objWriter, null );
    l_strOutput = l_objWriter.ToString();

    The system configuration is win2k advanced server with latest service pack
    and dot net 1.1.

    Any ideas?

    John
     
    =?Utf-8?B?Sm9obiBNb29yZQ==?=, Nov 10, 2004
    #1
    1. Advertising

  2. Hi John,

    I take it the workaround in the article wasn't any use to you.

    Make sure you report it as a 1.1 bug as well?

    Here's where: http://lab.msdn.microsoft.com/productfeedback/default.aspx


    "John Moore" <John > wrote in message
    news:...
    >I have a set of code that is called on every page load that loads an xslt
    > file. The xslt file has an embedded <script> tag. Loading the page
    > mutliple
    > times causes aspnet_wp.exe to use all available memory and then reset. As
    > this happens several times over the course of an 8 hour stress run, I'm
    > looking for a solution.
    >
    > The xslt file has the following:
    > <xsl:if test="$strPageCaller=''">
    > <SCRIPT LANGUAGE="JavaScript">BPB()</SCRIPT>
    > </xsl:if>
    > <xsl:if test="$strPageCaller!=''">
    > <SCRIPT LANGUAGE="JavaScript">if (history.length > ((bNS)?1:0))
    > document.write("<A class='p1s23'
    > href='Javascript:history.go({$strPageCaller});'><B>Return to
    > Previous</B></A>");</SCRIPT>
    > </xsl:if>
    >
    > The calling code is this:
    > XmlDocument l_objXMLDoc = new XmlDocument();
    > System.IO.StringWriter l_objWriter = null;
    > XslTransform xslt = null;
    > l_objXMLDoc.LoadXml(m_strXML);
    >
    > // Create an XPathNavigator to use for the transform.
    > XPathNavigator nav = l_objXMLDoc.CreateNavigator();
    >
    > // Transform the file.
    > l_objWriter = new System.IO.StringWriter();
    > xslt = new XslTransform();
    > xslt.Load(Server.MapPath(
    > ConfigurationSettings.AppSettings["XSLT_PATH"] // get path for xslt file
    > storage
    > +
    > "/xsltfile.xslt") // append physical filename to path
    > );
    >
    > xslt.Transform(nav, l_objargList, l_objWriter, null );
    > l_strOutput = l_objWriter.ToString();
    >
    > The system configuration is win2k advanced server with latest service pack
    > and dot net 1.1.
    >
    > Any ideas?
    >
    > John
     
    Ken Cox [Microsoft MVP], Nov 11, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U3RldmUgQmVzYWxrZQ==?=

    KB 911309: memory leak w/ application that has custom URL's

    =?Utf-8?B?U3RldmUgQmVzYWxrZQ==?=, Jun 5, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    344
    bruce barker \(sqlwork.com\)
    Jun 5, 2006
  2. Ola Natvig
    Replies:
    1
    Views:
    284
    Brian Quinlan
    Mar 8, 2005
  3. Replies:
    1
    Views:
    296
    Christian Heimes
    Apr 22, 2008
  4. batista
    Replies:
    0
    Views:
    100
    batista
    Mar 8, 2006
  5. gry

    tiny script has memory leak

    gry, May 11, 2012, in forum: Python
    Replies:
    2
    Views:
    228
    Alain Ketterlin
    May 17, 2012
Loading...

Share This Page