Solved

XSL & Dynamic XML problem

Posted on 2008-10-02
5
949 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
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
Several part series to implement Internet Explorer 11 Enterprise Mode
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now