How to write the XML file on the network

Dim objODA As New localhost2.WebServiceMethods

Dim ds As New DataSet

ds = objODA.GenerationOfRecords()

Dim filename As String = "\\chasocopweb\ESOWebServices\WSGenerationOfRecords.xml"

' Create the FileStream to write with.

Dim myFileStream As New System.IO.FileStream(filename, System.IO.FileMode.Create)

' Write to the file with the WriteXml method.


UltraWebGrid1.DataSource = ds


With the help of the above code I am trying to write the XML file on the network I am getting error.
How to resolve this?


9/16/2005 6:39:33 PM 7181 articles. 0 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 5

I'd believe you'd need to use streams related to networking in that case e.g NetworkStream and related classes (instead of FileStream)

Teemu Keiski
Finland, EU
9/17/2005 6:54:12 AM

Could you please post some sample

9/19/2005 1:38:39 PM

Forget my previous reply...

make sure the user you run ASP.NET under, has proper permissions to access the network share in question.

By default ASP.NET runs under ASPNET user (Win2000/XP)/ Network service(Win2003). If you have enabled impersonation but haven't set the identity in web.config then it goes by IIS's identity (IUSR_MACHINENAME usually or something else set in IIS), otherwise with the account you have specified in web.config (<identity> element).


Teemu Keiski
Finland, EU
9/23/2005 5:08:33 PM

Similar Artilces:

Problems writing to an XML file
I'm brand new to using XML (in fact this is my first project), so bear with me, I may need a little hand-holding. I'm trying to create a page which simply adds data to an existing xml file. Ultimately it will add the data from a form, but to keep things simple, I've been simply using pre-defined values. Originally I was able to get the script to write the xml exactly as I needed, however it would simply overwrite the existing file every time it was accessed. This is unacceptable, as it will be used to add data to one file, sort of like a mini database. So after much pain and gnashi...

XML Transform to 1 XML file to another XML File
Hello All  I am a novice programmer. I want to transform 1 xml file to another xml file. I am looking for a example code where user will select source xml file and create another xml file in different file with different fields with some default validation of parsing date and default values.  Can anyone help me or let me know any available source code in C#/ASP.Net?  Ms Disha I am assuming you know xslt, if not, you would have to go look at that.  But if you do, then this document will help you out

How to write a xml file to another computer using path like this \\Server5\XML\XMLTest.xml?
Hi Guys,How can I write a xml file that read from a dataset to another computer in our network?something like this path "\\Server5\XML\XMLTest.xml"I am using below code to write xml file.----------------------------------------            // create a file name to write to.            string filename = "\\Server5\XML\XMLTest.xml";            // create the FileStream to write with.        &nb...

XML datasource from external website XML file
Hi all i need to extract some data into a page on my website, but the xml file is on different web server, not in our bunch, but out in the it possible to use this file as a datsource directly, or is there some security issue, and i have to grab it and use it locally...??? the file has been put somewhere it can be accessed with a web browseras this file changes on a daily basis, i would also like to automate the daily retrieval, i'm assuming this is something not too simple either. as you would need a service or something to fire up at a specific time each day?! any he...

write xml file using xml control
Hi Guys, Environment: 2.0   I am trying to create a xml file using xml control at rumtime. I have a asp:xml control with DocumentSource property set to xml file myFile.xml. myFile.xml: <myRoot>          <EMPLOYEE>               <FNAME></FNAME>               <LNAME></LNAME>         &nbs...

Writing an XML file to the network
I am trying to write an XML file to a network location using the XMLWriter.  But I get a bad username/password error. The aspnet_wp account does have write permissions on the folder. What should I try?   Do you have <identity impersonate="false"/> in Web.config?Andrey Dudarev...для нас невозможного мало... Can you output the content to the browser window? Try this link:'t forget to click "Mark as Answer" on the post(s) that helped you.This credits that member, earns you a point and ...

Microsoft Chart control for .NET Framework about state management and serialization problem, it works OK with one XML file but fails with another XML file
I use Microsoft Chart control for .NET Framework , you can see details at The Chart1 is load data from a xml and save to ViewStateData, so even if after I click Reload button, the chart1 still display OK! I'm very strange that the chart1 works well after click Reload button if it's loaded from Chart1.Serializer.Load(HttpContext.Current.Server.MapPath("~/Template/1.xml"));but chart1 don't display fter click Reload button if it's loaded from Chart1.Serializer.Loa...

XMl to XML
Hello,   I retrieved an XML from the dataset which retrieves data from the table in the database. I need to present the data  in a different structure. Is XSLT the way or are there any other options. please let me know. Thanks!! Yes XSLT is a good choice to convert xml file to other forms. You can take a look at XSLT Tutorial.Sincerely,Young Fang...

After download a xml file, why my xml file has been changed?
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click        Dim fileName As String = Server.MapPath("~/Products.xml")        Response.Clear()         Response.ContentType = "text/xml"        Response.AddHeader("Content-Disposition", "attachment; filename=" & fileName)                Response.WriteFile(fileName)  ...

Splitting XML file to different XML files
hi,I have xml file that represent a table , one of the element(column) of the xml represent category..I want to split the xml file to different xml files base on the categories (each xml file will represent different category).The question is , if it posible to split the original xml using one xslt file, or i must create different xslt file for each category?thanks in advance one xslt for each output.You can also do this with XmlDocument and save it to two seaprate paths.HTHRegards,Rob...

How can i add a xml file to an other xml file?
such as i have a xml file : <item1> <item2> <item3>aaa</item3> <item4>bbb</item4> </item2> <item1> an other one is: <item2> <item3>ccc</item3> <item4>ddd</item4> <item2> i wanted is: <item1> <item2> <item3>aaa</item3> <item4>bbb</item4> </item2> <item2> <item3>ccc</item3> <item4>ddd</item4> <item2> <item1> thanks. You ca...

Load XMl file and read xml file
How do I load and read nodes from the xml file in c#.??? ThankYou Sample code: Yang.NET Developer Here is how you read xml file and loop and display nodesXmlDocument xDoc = new XmlDocument();xDoc.Load(xmlPath); foreach(XmlNode node in xDoc.SelectNodes("//nodeName you want to display")){Response.Write("name: " + node.Attributes["name"].InnerText + " value: " + node.Attributes["value"].InnerText);}...

Create an XML file from another XML file
I am using VS 2005 with C#.  I would like to create/generate an xml file from another XML with a differnt structure.  Basically, I want to create the actual xml file for my users whenever they raise my web service method. This is the actual structure of my xml i would like to create the following <Education>  <mydata>    <year>1988 - 1995</year>    <reward>High School Diploma</reward>    <school>Miami Secondary</school>  </mydata>  ...</Education> The original ...

XML in, XML out
Hi All (and a happy holiday to those that will get a break), I am trying to read in an XML file of addresses. I need to remove all the address data from the file where code =~ /^000/ (there are none in the example data below). I need to reproduce that data 'as is', so I need to honour the tag structure, although the order of the tags doesn't need to be honoured. I have been trying to use XML::Simple and I had a go with XML::Smart but I haven't been able to get the results I want. My best effort is below (with XML::Simple). There are a couple of differences ...

Web resources about - How to write the XML file on the network -

Network Computing
Through a For IT, By IT editorial filter, Network Computing connects the dots between architectural approach and how technology impacts the business, ...

Talk:PlayStation Network outage - Wikipedia, the free encyclopedia
This article is within the scope of WikiProject Video games , a collaborative effort to improve the coverage of video games on Wikipedia. If ...

The Evolution of LiveRail & Audience Network
The Evolution of LiveRail & Audience Network

Hoda Kotb’s Book Party Brings Networks Together
So, it appears network heavyweights will come together if promoting a book is involved. Earlier this week we reported everyone from ABC News ...

New technique can help us understand signaling direction of brain networks
... brain regions. When different regions exhibit simultaneous activity, we generally conclude that they are functionally connected in a network. ...

NirSoft’s WifiHistoryView reveals your laptop’s network history
NirSoft has unveiled WifiHistoryView , a free tool for Windows Vista and later which displays the history of your computer’s wireless network ...

IDG Contributor Network: All hail mindless surveys. Or why you should be dubious about PR pitches
First a bit of perspective. Being a PR person is hard. Your clients expect you to be able to deliver them articles in every single broadsheet ...

Former Cisco Execs' Startup Avi Networks Aims To Disrupt App-Delivery Market ...
Former Cisco Execs' Startup Avi Networks Aims To Disrupt App-Delivery Market ... CRN Touting itself as the "next generation" Application Delivery ...

Donald Trump Compared To George Wallace During ID Network’s ‘Hate In America’ Q&A – TCA
It took very little time for Investigation Discovery network’s Q&A on its ongoing Hate in America franchise to turn into a What’s Up With Donald ...

Netflix Adds 130 Nations to Network While CEO Speaks at CES
Netflix's total nation count is currently at 190. Arabic, Korean, and Chinese language support has been added to the 17 languages previously ...

Resources last updated: 1/9/2016 4:19:54 PM