|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
the process cannot access the file because it is being used by another processHi All,
I have a popup for image upload with a upload button,save button and one close button I am uploading images with a file control after browsing when I click on upload button it upload the file to some folder /xyz/temp/ folder with name 101.jpg now i close the popup. now when i again open and try to upload (upload the file to same folder /xyz/temp/ folder with name 101.jpg) it gives me exception on this line inputFile.SaveAs(MapPath(/tmp+"//"+fileName)); saying "the process cannot access the file (101.jpg)because it is being used by another process" this exception is thrown. now if i restart the asp.net worker process this exception doesnt comes that mean the file is cached in memory by the asp.net worker process. Thanks in advance bala This error means that you have some code somewhere that's not closing the
file. -Brock DevelopMentor http://staff.develop.com/ballen Show quoteHide quote > Hi All, > > I have a popup for image upload with a upload button,save button and > one > close button > I am uploading images with a file control after browsing when I click > on > upload button it > upload the file to some folder /xyz/temp/ folder with name 101.jpg > now i close the popup. > now when i again open and try to upload (upload the file to same > folder > /xyz/temp/ folder with name 101.jpg) > it gives me exception on this line > inputFile.SaveAs(MapPath(/tmp+"//"+fileName)); > saying > "the process cannot access the file (101.jpg)because it is being used > by > another process" > this exception is thrown. > now if i restart the asp.net worker process this exception doesnt > comes > that mean the file is cached in memory by the asp.net worker process. > Thanks in advance > bala this is one of the reason but I had varified that no file is left open! its
something else that I am not able to find out. Show quoteHide quote "Brock Allen" <ballen@NOSPAMdevelop.com> wrote in message news:396696632484631226014304@msnews.microsoft.com... > This error means that you have some code somewhere that's not closing the > file. > > -Brock > DevelopMentor > http://staff.develop.com/ballen > > > > > Hi All, > > > > I have a popup for image upload with a upload button,save button and > > one > > close button > > I am uploading images with a file control after browsing when I click > > on > > upload button it > > upload the file to some folder /xyz/temp/ folder with name 101.jpg > > now i close the popup. > > now when i again open and try to upload (upload the file to same > > folder > > /xyz/temp/ folder with name 101.jpg) > > it gives me exception on this line > > inputFile.SaveAs(MapPath(/tmp+"//"+fileName)); > > saying > > "the process cannot access the file (101.jpg)because it is being used > > by > > another process" > > this exception is thrown. > > now if i restart the asp.net worker process this exception doesnt > > comes > > that mean the file is cached in memory by the asp.net worker process. > > Thanks in advance > > bala > > >
Get Value of a control from my Own Control
) expected erro when trying to create a popup Problem programmatically creating tabstrip webcontrol asp:button Text= Disable ButtonColumn button control through code dynamic control event not firing Binding to listbox / using data access object Looking for sorted list webcontrol Viewstate ASP makes me angry as a clown ;) |
|||||||||||||||||||||||