Urgent - Data at the root level is invalid. Line 1, position 1

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • paulnamroud
    New Member
    • Sep 2006
    • 15

    Urgent - Data at the root level is invalid. Line 1, position 1

    Hi all,

    I wrote a stored procedure with ms sql 2005 which returns a string parameter. This parameter contains differents xml elements and it's well formated.

    First, its works fine when i call my stored procedure with asp 3.0. I can display all the contents of this xml parameter with xsl.

    But, when it comes to call this stored procedure with ASP.Net 2.0, it doesn't work. It returns the following error message:
    "Data at the root level is invalid. Line 1, position 1"

    Can anyone help me ?
    Thank you
    Paul
  • jkmyoung
    Recognized Expert Top Contributor
    • Mar 2006
    • 2057

    #2
    Ensure that your xml has no extra space, spaces, tabs or newlines at the beginning of your file. It could also be encoding.

    Comment

    Working...