Author: Visual Web Developer | Posted on: 8/15/2009 4:04:33 PM | Views : 280

 I have a problem when Reading and Writing to a file on the hostingserver. I get an errorpage when this code runs in the Page_Load event and the Error starts when it comes to this line. I a little problem to understand why that is happening.
System.IO.FileStream sd2 = new System.IO.FileStream(Path, System.IO.FileMode.Open, System.IO.FileAccess.Write, System.IO.FileShare.ReadWrite);
 
The complete code is like below where I first Read a string from a file and then want to overwrite that string:
Go to the complete details ...