"Web Exception"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wingsganesh
    New Member
    • Nov 2007
    • 16

    "Web Exception"

    hi guys,

    I need XML data in my textbox,It was correctly worked in vb.net ,But when i used This coding for Device application, "WebExcepti on" bug was araised,


    am also try path name as localhost and IP address. I have same error. This is my coding,
    [CODE=vbnet]Private Sub Form1_Load(ByVa l sender As Object, ByVal e As System.EventArg s) Handles MyBase.Load

    Dim strPath As String = "http://localhost/iw/Document/pathXml/pathXml/comp.xml"

    Dim xmlDoc As New XmlDocument

    xmlDoc.Load(str Path)

    txtName.Text = xmlDoc.InnerTex t

    End Sub [/CODE]

    This is my XML data:


    <?xml version="1.0" encoding="utf-8" ?>
    <name>Info wave </name>




    Anybody can help me............. ........
    Last edited by Shashi Sadasivan; Dec 3 '07, 05:36 AM. Reason: adding code tags
  • Shashi Sadasivan
    Recognized Expert Top Contributor
    • Aug 2007
    • 1435

    #2
    Hi,
    could you please giove more details to the webexception?

    as for what you have provided...
    it seems that the file does not enough permissions to be accessed over the web. (even though it is your local server, it goes through IIS)

    Comment

    • wingsganesh
      New Member
      • Nov 2007
      • 16

      #3
      hi siva,

      Am also use localhost, System name and IP address , but i have the same error.This code correct result in windows application. what i do..........

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        What does the WebException say? That is only the exception class, there should be a message describing what went wrong.

        If I had to guess I would say it's that XMLDocument.Loa d() doesn't support using a web address as a reference to a file?

        Comment

        Working...