Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Writing XML into URL using dataset( Windows Application)

Writing XML into URL using dataset( Windows Application)

Scheduled Pinned Locked Moved C#
xmltutorialquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    K V Sekhar
    wrote on last edited by
    #1

    Hi all, How to write a xml file into Remote URL using its NetWorkCredentials(userid & password) ? Please suggest me. Thanks in advance cheers kvsekhar

    M 1 Reply Last reply
    0
    • K K V Sekhar

      Hi all, How to write a xml file into Remote URL using its NetWorkCredentials(userid & password) ? Please suggest me. Thanks in advance cheers kvsekhar

      M Offline
      M Offline
      musefan
      wrote on last edited by
      #2

      So... you want to upload a file to a server? you could create an FTP for the server

      Life goes very fast. Tomorrow, today is already yesterday.

      K 1 Reply Last reply
      0
      • M musefan

        So... you want to upload a file to a server? you could create an FTP for the server

        Life goes very fast. Tomorrow, today is already yesterday.

        K Offline
        K Offline
        K V Sekhar
        wrote on last edited by
        #3

        Thanks for your suggestion. Is it not possible using DataSet.WriteXml(url) ? because I could able to read xml file from url by following code XmlUrlResolver resolver = new XmlUrlResolver(); NetworkCredential nc = new NetworkCredential("id", "pwd"); resolver.Credentials = nc; // Get a Stream object containing the XML file. Uri myUri = new Uri("http://domain/Assessments/Expenses.xml"); Stream s = (Stream)resolver.GetEntity(myUri, null, typeof(Stream)); // Construct a reader using the Stream object. XmlTextReader xmlTextReader = new XmlTextReader(s); XmlDataDocument xdoc1 = new XmlDataDocument(); xdoc1.DataSet.ReadXml(xmlTextReader, XmlReadMode.Auto); DataSet ds = xdoc1.DataSet; How this logic will be applied for Writing XML to URL ?

        M 1 Reply Last reply
        0
        • K K V Sekhar

          Thanks for your suggestion. Is it not possible using DataSet.WriteXml(url) ? because I could able to read xml file from url by following code XmlUrlResolver resolver = new XmlUrlResolver(); NetworkCredential nc = new NetworkCredential("id", "pwd"); resolver.Credentials = nc; // Get a Stream object containing the XML file. Uri myUri = new Uri("http://domain/Assessments/Expenses.xml"); Stream s = (Stream)resolver.GetEntity(myUri, null, typeof(Stream)); // Construct a reader using the Stream object. XmlTextReader xmlTextReader = new XmlTextReader(s); XmlDataDocument xdoc1 = new XmlDataDocument(); xdoc1.DataSet.ReadXml(xmlTextReader, XmlReadMode.Auto); DataSet ds = xdoc1.DataSet; How this logic will be applied for Writing XML to URL ?

          M Offline
          M Offline
          musefan
          wrote on last edited by
          #4

          im not sure if it is possible to write to a file like you are suggesting, and if it was possible it would more than likely require permissions to be set on the server for that kind of write access.

          Life goes very fast. Tomorrow, today is already yesterday.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups