A
Adam
Hi,
I have a web project produced in asp.net, vb.net and it uses a SQL
Server 2000 database. I am trying to load an xml document from data
passed in from the database in the form of a database. Below is the
code I am using and it is followed by the error message I am
receiving. if I comment out the XML document, a simular error message
is fired for the LoadXSL document call. Does anyone have any
suggestions? Thanks.
Try
Dim myCustomer As Customer = New Customer
Dim myAuditData As DataSet
myAuditData = myCustomer.GetCustomerAuditInfo
Dim tr As TableRow = New TableRow
Dim td As TableCell = New TableCell
Dim xml As XmlDocument = New XmlDocument
Dim xsl As New XslTransform
Dim io As System.IO.StringWriter = New
System.IO.StringWriter
Dim resolve As New XmlUrlResolver
xml.Load(myAuditData.GetXml)
xsl.Load(Server.MapPath("Audit.xslt"), resolve)
xsl.Transform(xml, Nothing, io, Nothing)
td.Text = io.ToString
tr.Cells.Add(td)
tblAudit.Rows.Add(tr)
Catch ex As Exception
lblStatus.Text = ex.ToString
End Try
ERROR MESSAGE PRODUCED:
System.ArgumentException: The path contains illegal characters. at
System.IO.Path.nGetFullPathHelper(String path, Char[]
invalidPathChars, Char[] whitespaceChars, Char directorySeparator,
Char altDirectorySeparator, Char volumeSeparator, Boolean fullCheck,
String& newPath) at System.IO.Path.GetFullPathInternal(String path) at
System.IO.Path.GetFullPath(String path) at
System.Xml.XmlResolver.ResolveUri(Uri baseUri, String relativeUri) at
System.Xml.XmlTextReader..ctor(String url, XmlNameTable nt) at
System.Xml.XmlDocument.Load(String filename) at
MyStore.ViewAuditTrail.Page_Load(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\MyStore\ViewAuditTrail.aspx.vb:line 56
If anyone has any suggestions it would be greatly appreciated!
I have a web project produced in asp.net, vb.net and it uses a SQL
Server 2000 database. I am trying to load an xml document from data
passed in from the database in the form of a database. Below is the
code I am using and it is followed by the error message I am
receiving. if I comment out the XML document, a simular error message
is fired for the LoadXSL document call. Does anyone have any
suggestions? Thanks.
Try
Dim myCustomer As Customer = New Customer
Dim myAuditData As DataSet
myAuditData = myCustomer.GetCustomerAuditInfo
Dim tr As TableRow = New TableRow
Dim td As TableCell = New TableCell
Dim xml As XmlDocument = New XmlDocument
Dim xsl As New XslTransform
Dim io As System.IO.StringWriter = New
System.IO.StringWriter
Dim resolve As New XmlUrlResolver
xml.Load(myAuditData.GetXml)
xsl.Load(Server.MapPath("Audit.xslt"), resolve)
xsl.Transform(xml, Nothing, io, Nothing)
td.Text = io.ToString
tr.Cells.Add(td)
tblAudit.Rows.Add(tr)
Catch ex As Exception
lblStatus.Text = ex.ToString
End Try
ERROR MESSAGE PRODUCED:
System.ArgumentException: The path contains illegal characters. at
System.IO.Path.nGetFullPathHelper(String path, Char[]
invalidPathChars, Char[] whitespaceChars, Char directorySeparator,
Char altDirectorySeparator, Char volumeSeparator, Boolean fullCheck,
String& newPath) at System.IO.Path.GetFullPathInternal(String path) at
System.IO.Path.GetFullPath(String path) at
System.Xml.XmlResolver.ResolveUri(Uri baseUri, String relativeUri) at
System.Xml.XmlTextReader..ctor(String url, XmlNameTable nt) at
System.Xml.XmlDocument.Load(String filename) at
MyStore.ViewAuditTrail.Page_Load(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\MyStore\ViewAuditTrail.aspx.vb:line 56
If anyone has any suggestions it would be greatly appreciated!