Accessing and reading/writing files on a web server
I am looking to read/write files on my website from c# and im wondering how i would go about doing this.
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Gomathi PalaniswamyRank #714 · 3.3K reputationPosted Nov 11, 2010, 6:55 PM EST
Use Httpwebrequest and WebResponse to get page content like,
HttpWebRequest requst = (HttpWebRequest)WebRequest.Create(URL);
WebResponse response = requst.GetResponse();
Use Stream reader and writer to read and write the file..