473,796 Members | 2,916 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error loading a stylesheet with foreign chars via the MSXML2.ServerXM LHTTP object

3 New Member
Hi everybody,

I have an ASP page that uses the MSXML2.ServerXM LHTTP object to read a stylesheet from IIS as follows:
Expand|Select|Wrap|Line Numbers
  1.          strXSLPath = "http://localhost/ej/ejdetail.xsl.asp"
  2.  
  3.          Dim oXMLHttpStyle
  4.          Set oXMLHttpStyle = Server.CreateObject("MSXML2.ServerXMLHTTP")
  5.          oXMLHttpStyle.open "GET", strXSLPath, False
  6.          oXMLHttpStyle.setRequestHeader "Content-Type", "text/xml" 
  7.          oXMLHttpStyle.setRequestHeader "encoding", "UTF-16" 
  8.          oXMLHttpStyle.send()
  9.  
I then load this stylesheet into a DOM which fails (I have checked the return flag from the loadxml call). I have found that the problem relates to foreign characters (like è) in my CustomGlobal.as a file (it holds custom descriptors for different language customers) because i can remove these foreign characters and get the transform to work no problem. The .asa file must get parsed when the stylesheet is returned.

So my question is how do I get the stylesheet to load correctly? I need to support the foreign chars but am unsure about how to load up the stylesheet with them in.

Any help will be greatly appreciated.
Thanks,
Nick.
Aug 15 '07 #1
1 2877
prussell
1 New Member
Hi everybody,

I have an ASP page that uses the MSXML2.ServerXM LHTTP object to read a stylesheet from IIS as follows:
Expand|Select|Wrap|Line Numbers
  1.          strXSLPath = "http://localhost/ej/ejdetail.xsl.asp"
  2.  
  3.          Dim oXMLHttpStyle
  4.          Set oXMLHttpStyle = Server.CreateObject("MSXML2.ServerXMLHTTP")
  5.          oXMLHttpStyle.open "GET", strXSLPath, False
  6.          oXMLHttpStyle.setRequestHeader "Content-Type", "text/xml" 
  7.          oXMLHttpStyle.setRequestHeader "encoding", "UTF-16" 
  8.          oXMLHttpStyle.send()
  9.  
I then load this stylesheet into a DOM which fails (I have checked the return flag from the loadxml call). I have found that the problem relates to foreign characters (like è) in my CustomGlobal.as a file (it holds custom descriptors for different language customers) because i can remove these foreign characters and get the transform to work no problem. The .asa file must get parsed when the stylesheet is returned.

So my question is how do I get the stylesheet to load correctly? I need to support the foreign chars but am unsure about how to load up the stylesheet with them in.

Any help will be greatly appreciated.
Thanks,
Nick.
Today I ran across this post looking to resolve this same issue. I am using Classic ASP and the MSXML2.XMLHTTP object from javascript to repopulate a selectbox. The app requires the use of foreign characters. Whenever the xml payload was returned with a foreign character, it would not load into the DOM.Document. It took me 8 hours of racking my brain untill I added the standalone='yes ' attribute to the xml tag and voila! it worked.

Expand|Select|Wrap|Line Numbers
  1. <xml version='1.0' encoding='utf-8' standalone='yes'>
Hope this helps.
Patrick
Aug 23 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
12462
by: Dan Sikorsky | last post by:
Uploading from browser to server using Msxml2.XMLHTTP takes a long time about 15 minutes for a 1.5MB file at 37.2Kbps, although it does get there. Is there anyway to speed things up? here's the code ... var sFilename = (document.form1.myFileName.value); // create ADO-stream Object var ado_stream = new ActiveXObject("ADODB.Stream"); // create XML document with default header and primary node
0
1600
by: P1ayboy | last post by:
Trying to use Dim objXmlHttp = Server.HttpWebRequest("Msxml2.ServerXMLHTTP.4.0") in a vb.net web application on server 2003, but receive the following error. "System.Web.HttpException: Could not create an object of type 'Msxml2.ServerXMLHTTP.4.0'." Its driving me nuts and need to solve it by Monday.
2
2313
by: Bernhard Sturm | last post by:
Hi Group I have a peculiar problem using the method Server.CreateObject("MSXML2.ServerXMLHTTP") in order to get a connection from one server to another. On my personal host (IIS) the above method works perfect, and I can 'include' an HTTP stream from a remote URL into my own page. However, the method doesn't work on another webserver (IIS, too) although the MSXML2.ServerXMLHTPP method is installed (I checked it). The error message I get...
1
14698
by: ehilario | last post by:
Hello everyone, I am trying to access a webservice to post some values via MSXML2.ServerXMLHttp The OS used is win2003 on both machines. When I access the local machine (A) which has the same service the call works great. When I access the other machine (B) that is on the same subnet, I get a Status of 500.
2
21818
by: Michael Christensen | last post by:
Hi How do I send an input-param to my web service with MSXML2.ServerXMLHTTP? Can this be done without the soap-toolkit? Can't find anything about it - looking forward getting some help :-) ------------- Function GetLatest() Dim url, xmlhttp, XMLDOM, XMLNode
1
6592
by: Raúl Martín | last post by:
I´ve a function in asp that run correctly but If I tried to change it forasp.net in asp: xmlHTTP = CreateObject("Microsoft.XMLHTTP") And I thought to use this sentence for asp.net but the server don´t response right. xmlHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
2
8760
by: Maris Janis Vasilevskis | last post by:
Hi, Is it possible to force HttpWebRequest to do exactly (not approximately) the same as MSXML2.ServerXMLHTTP does? More details. I port JScript to JScript.NET I have a server (ASP invoking binary code; code not accessible). I send XML requests to it. If my request is accepted, ServerXMLHTTP returns XML with accept details. If my request is rejected, ServerXMLHTTP returns XML with reject details.
4
18016
by: Arnaud | last post by:
Hi, I'm trying to translate an asp application, i have some difficulties with a particular line : --- Set myxml = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0") --- Classical ajax exemples rather use :
4
6918
by: mirandacascade | last post by:
O/S : Win2K vsn of Python: 2.4 Hoping to find information that provide information about error messages being encountered. Pythonwin session: Traceback (most recent call last): File "<interactive input>", line 1, in ?
0
10245
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10205
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10021
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7559
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6802
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5458
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4131
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.