This is the code, that once worked, but since I changed my computer it doesn't anymore.
FileStream RMSWriter = null;
XmlSerializer mySerializer = new XmlSerializer(typeof(RMSSettings));
RMSWriter = new FileStream(Constants.Application_Path + Constants.RMS_threshold_file, FileMode.Create,FileAccess.ReadWrite,FileShare.ReadWrite);
catch (Exception ex)
Th error that it gives, is that it doesn't find the file specified, although the path is correct and is absolute.
I tried using a StreamWriter created with File.CreateText, also tried creating the filestream with File.Create, but in both cases I have the error that the file is in use by another process. This error I get also when I don't specify the FileAccess and FileSharing parameters.
Any idea why it doesn't work anymore? I have .Net Framework 2.0 installed and also the compact framework 2.0 and 1.0 SP3 Developer.
Also the error is reproductible on other development computers.
I have full rights on the folder where I want to save the file, and also in security policies for the framework I had all code for the users, and all permisions set to the code coming from local machine.