473,396 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

updating XML files on the Web

Hello
I created a webSite using a free web hosting space (that supports
asp.net applications).
The website was created with asp.net project
The problem is that I cant update XML files that are placed on the web
site . why?

for example :

fileName = "www.website.com/xmlFile.xml";
try {
doc = new XmlDocument();
doc.Load( fileName );
....
doc.Save( fileName ); // throw Exception !!! why ?
}

the excption message is : "URI formats are not supported."
How can I handle this?

Dec 22 '06 #1
1 1136
Hi,

ShayHk wrote:
Hello
I created a webSite using a free web hosting space (that supports
asp.net applications).
The website was created with asp.net project
The problem is that I cant update XML files that are placed on the web
site . why?

for example :

fileName = "www.website.com/xmlFile.xml";
try {
doc = new XmlDocument();
doc.Load( fileName );
...
doc.Save( fileName ); // throw Exception !!! why ?
}

the excption message is : "URI formats are not supported."
How can I handle this?
You must save the file using the absolute path. You should be able to
get the absolute path from your provider. Alternatively, you can try
using MapPath:

fileName = "xmlFile.xml";
// "this" refers to the Page.
doc.Save( this.MapPath( fileName ) );

// if you're not in a Page, you can also use
doc.Save( HttpServerUtility.MapPath( fileName ) );

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Dec 22 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Jason | last post by:
Let's say I have an html form with 20 or 30 fields in it. The form submits the fields via POST to a php page which updates a table in a database with the $_POST vars. Which makes more sense? ...
3
by: Robin Tucker | last post by:
Hi there, I have a database on my test machine that will need to be installed on users machines. I would like to create the database with the given schema on the users machine and also with...
9
by: Ross K Thomas | last post by:
I didn't know what exactly to put for the subject of this message, but here is my problem: I have about 10 .htm files - index.htm, resume.htm, etc. In each of those files, right after <body>, but...
1
by: Srinadh | last post by:
Hi all, We have files with about 20 to 30 fields per row. We are trying to update such files with about 60 rows as contiguous data in a CLOB field. It passes through. But when we try...
2
by: Trygve Lorentzen | last post by:
Hi, I'm developing an app with automatic version checking and updating. It must also track what version is installed for each customer in our customer database. I have made a small client to...
0
by: Roshawn Dawson | last post by:
Hi, I recently place my first asp.net website on the net. All is working well. However, I see a few changes that I'd like to make and want to know what is the best strategy to use. I can...
1
by: rdemyan via AccessMonster.com | last post by:
My App has 10 or so tables that we provide that contains proprietary data. This data will need to be updated once or twice a year. I would like some comments, suggestions on my proposed strategy...
4
by: rdemyan via AccessMonster.com | last post by:
My application is calculation intensive and the servers are agonizingly slow. Administrators of my application only update the backends once a month (twice a month max). So, my launching program...
9
by: AG | last post by:
Using VS2005 Pro. I just deployed a ASP.NET 2.0 website (not web application) with the option to make it updatable. VS deployed all aspx, ascx files, but not all image or html files. It also...
16
by: Stevo | last post by:
I'm guessing this is a laughably obvious answer to many here, but it's not to me (and I don't have a server or any knowledge of PHP to be able to try it). It's not strictly a PHP question, but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.