Solved

XSL & Dynamic XML problem

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
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.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

749 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