Solved

XSL & Dynamic XML problem

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
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.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

896 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

12 Experts available now in Live!

Get 1:1 Help Now