This should be easy Close this connection System.Drawing.Image.FromFile(
Posted on 2006-11-06
Ok here is the code that I know is causing this issue but I need the code so I need a work around for this
System.Drawing.Image scottsimg = System.Drawing.Image.FromFile(filelocation + sFilename);
intThumbHeight = (scottsimg.Height * intThumbWidth) / scottsimg.Width;
Here is the Error
The process cannot access the file 'C:\Documents and Settings\Scott\My Documents\Visual Studio 2005\WebSites\shotdrive\img\178f8f94-8286-4f3c-bc69-c4684020fc4b\2.jpg' because it is being used by another process.
So I assume that when I open that file it is not closing a connection to it. The code that I posted is after I upload an image I need to resize it with out messing up the proportions...