Hi,
I have a problem which I cannot find a solution for ... losing a complete day with it. :(
I'm creating a file and sending it by mail, so far there is no problem. But when the script is run another time or the files need to get deleted at the end I get the error that the file is in use by another process.
what am I missing? how can I close the file or process (w3wp.exe) that's using it? (written in vb.net)
scriptblabla
File.Delete(Server.MapPath(datei))
File.Delete(Server.MapPath(dateisarah))
'File.Create(Server.MapPath(datei))
'File.Create(Server.MapPath(dateisarah))
scriptblabla
File.WriteAllText(Server.MapPath(datei), dattext.ToString, Encoding.GetEncoding("Windows-1252"))
File.WriteAllText(Server.MapPath(dateisarah), dattext2, Encoding.GetEncoding("Windows-1252"))
scriptblabla
if ... then
File.Delete(Server.MapPath(datei))
...
Go to the complete details ...