Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 969
  • Last Modified:

XSL & Dynamic XML problem

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
advfinance
Asked:
advfinance
1 Solution
 
slamhoundCommented:
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
 
advfinanceAuthor Commented:
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
 
Hans LangerCommented:
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
 
bryanbugCommented:
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
 
advfinanceAuthor Commented:
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now