Unanswered XslCompiledTransform.Transform fails

  • Thursday, November 15, 2012 8:08 AM
     
     

    Hi to all,

    I'm on my page_load event in my website and I try to do a xslt/xml trasform with something like this:

    using (StringWriterWithEncoding stringWriter = new StringWriterWithEncoding(System.Text.Encoding.UTF8))
    {
      xslt.Transform(xmlDocResponse.CreateNavigator(), null, stringWriter);
      xslt = null;

      _ret = stringWriter.ToString();

      _ret = System.Net.WebUtility.HtmlDecode(_ret);
    }

    where all code is in try...catch.

    All work fine until yesterday but today I have this problem: on xslt.Transform line the process stops and exits with a "connection error etc.." video message and it "jump" out not catching any error.

    What's the problem? and (more important) why it cannot be catched ?

    In my local all is well but on the server it fails (Win Server 2008 R2 Std with FWK 4.0)

    Tnx 1000

All Replies

  • Thursday, November 15, 2012 3:16 PM
     
     

    Any idea?

    Please, I don't know where look for

  • Thursday, November 15, 2012 5:14 PM
     
     

    Is "connection error etc.." the exact error message you get?

    Does the stylesheet code try to load other documents using the "document" function, i.e. does it do something like

      document("file.xml")

    or

      document("http://example.com/file.xml")

    that would explain a connection error?


    MVP Data Platform Development My blog

  • Friday, November 16, 2012 7:49 AM
     
     

    Hi, thank for reply!

    Yes, the error is:

    • with Firefox: Connection failed - Firefox can not establish a connection with the server etc...
    • with IE: Internet Explorer can not display the webpage etc...

    No, I don't use any document() function in my xslt.

    I'm sure the error's up on 'xslt.Transform' line because my log writes just before it.

  • Friday, November 16, 2012 9:50 AM
     
     

    So the browser gives you the error message that it can't connect to the server. Obviously that way it is hard to tell what goes wrong on the server. I can only suggest to use http://msdn.microsoft.com/en-us/library/w2faa92k%28v=vs.110%29.aspx on how to debug an ASP.NET application, so that you get a clearer view on what goes wrong.

    Also as your local code (development machine?) works while the server fails and this week was patch day, did the server receive some updates the local machine did not get or the other way round?


    MVP Data Platform Development My blog