Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > XML error: Illegal characters in path

Reply
Thread Tools

XML error: Illegal characters in path

 
 
MB
Guest
Posts: n/a
 
      07-08-2003
Hi, I am using a web service to call an asp page on a remote server via
System.Net.WebClient . The asp page returns a xml stream persisted from a
recordset.

I am having problems converting the stream into a valid xmltextreader
document. I have also converted the document to the simple format without
the DTD ( just plain xml file )
and I still get the same error:

Illegal characters in path.
Exception Details: System.ArgumentException: Illegal characters in path.

I have pasted to code below:

<WebMethod(Description:="passsing ODBC sql str and DSN paramenters. Returns
datatable")> _

Public Function TestURL(ByVal strSQL As String, ByVal DSN As String) As
datatable

Dim web As New System.Net.WebClient
Dim URL As String = "http://remote_server/query_legacy.asp"
web.Headers.Add("Content-Type", "application/x-www-form-urlencoded")
Dim param1 As String = "strSQL=" & strSQL
Dim param2 As String = "DSN=" & DSN

Dim params As String = param1 & "&" & param2

Dim bytparams As Byte() = BuildPostData(params)

Dim res As Byte() = web.UploadData(URL, "POST", bytparams)

Dim ds As New DataSet

Dim str1 As String = System.Text.Encoding.ASCII.GetString(res)

==> ERROR RIGHT HERE: Dim stream_r As New StreamReader(str1)

Dim xml_r As New System.Xml.XmlTextReader(stream_r)

ds.ReadXml(xml_r)

Return ds.Tables(1)

End Function

------
Any suggestions ?

Thanks a lot in advance!
MB




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bad Request <OR> Illegal characters in path nexdeveloper ASP .Net Security 1 10-05-2007 03:27 AM
replace illegal xml characters killkolor Python 5 03-21-2007 06:23 PM
Application.ExecutablePath throws ArgumentException: Illegal characters in path.] Thomas ASP .Net 1 09-06-2006 08:49 AM
Error: Illegal characters in path Shirin ASP .Net Web Services 0 06-04-2004 02:43 AM
Solution for "illegal characters in path" error message in ASP.NET Steve Grahovac ASP .Net 1 01-02-2004 10:04 PM



Advertisments