Ciao, quando cerco di inviare una elenco di mail tramite un ciclo ottengo questo errore
The process cannot access the file 'C:\WebApplications\attachment\prova.txt' because it is being used by another process.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.IOException: The process cannot access the file 'C:\WebApplications\RGP\attachment\prova.txt' because it is being used by another process.
Source Error:
Line 180: if (FileSize > 0)
Line 181: {
Line 182: txtUpload.PostedFile.SaveAs(Request.PhysicalApplic ationPath + "\\attachment\\" + FileName);
Line 183: }
Line 184: }
Il problema è il seguente... primo invio, tutto OK ... quando provo ad eseguire la stessa operazione (cliccando nuovamente sul pulsante di invio) ottengo l'errore sopra indicato, cosa sbaglio?
Grazie mille!

Rispondi quotando