Solved

XSL & Dynamic XML problem

Posted on 2008-10-02
5
960 Views
Last Modified: 2013-12-08
I have a piece of ASP that takes some XML generated by a DLL. The XML contains a line to apply an XSL stylesheet to render it. The code hasn't changed at all in months, and suddenly yesterday it stopped working.

IE comes up with the following error:

The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

Catastrophic failure Error processing resource 'http://server/eseries/test-conxml.asp?sid=377282'.

To add insult to injury, when I refresh, sometimes it works, sometimes it doesn't (works about 35% of the time?!!)

Yesterday I came up with a temporary fix that writes an XML file as I noticed the XML file worked when I saved it manually and viewed it, however I'm having other issues relating to writing the file to the local hard drive.

The original code is attached, and would be grateful if anyone can help with this!!!!
 

<%
	Response.Buffer = False
 
	MySID = Request.Querystring("SID")
	
	If (IsNumeric(MySID) And Len(MySID) > 0) Then
		Set ESeries = Server.CreateObject("ESeries.Consumer")
			Response.ContentType = "application/xml"
			Response.Write CStr(ESeries.GetSearchXML(CDbl("0" & MySID), "test-consumer.xsl")) & ""
 
		Set ESeries = Nothing
	End If
%>

Open in new window

0
Comment
Question by:advfinance
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 10

Expert Comment

by:slamhound
ID: 22630037
Try adding:

For x = 1 to 100000
Next

at various places to slow things down a bit. I'm wondering (because of it happening every now and then) if it's just getting ahead of itself and trying to use the XML before it's written.
0
 
LVL 5

Author Comment

by:advfinance
ID: 22633564
Hi Slamhound,

I've just tried your suggestion now, but no difference in the slightest... No better but at least not worse!!

I'm fairly convinced its client-side rather than server side as when I have the xml not referencing the stylesheet (just being playing with that too!), it displays the xml fine IE, and loading the XSL on its own loads and displays fine.

It's just really odd how it suddenly stopped working on 1st October across all my client PCs - Has their been any Windows updates I'm not aware of maybe?

Grasping at straws now, but still absolutely stumped!!
0
 
LVL 10

Expert Comment

by:Hans Langer
ID: 22641021
Maybe  it was a change on the webserver or anyone move the xsl file, try:




Response.Write CStr(ESeries.GetSearchXML(CDbl("0" & MySID), server.mappath("\xslFolder\test-consumer.xsl"))) & ""

Open in new window

0
 
LVL 1

Accepted Solution

by:
bryanbug earned 500 total points
ID: 22644934
Do you have SOPHOS anti-virus installed?  A recent similar issue began Friday for me - rendering XML in a browser, intermittent error as you describe.

Observed a pattern that it was only occurring in those desktops that had received a recent sophos update.

Sophos support has instructions on how to disable the Web Content Scanner plugin:
   http://www.sophos.com/support/knowledgebase/article/36265.html


Give that a shot to see if it's the cause.

Side-note.  I wouldn't recommend keeping this disabled as it removes some layer of protection that the plugin provides.

Hope this helps.

--bb.  
0
 
LVL 5

Author Closing Comment

by:advfinance
ID: 31502308
Thanks Bryanbug!!!! We do use Sophos actually - Just tried your suggestion, and it works perfectly now :-)    That would have been the last thing I would have even thought of
0

Featured Post

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question