File is locked after HttpPostedFile SaveAs(LocationOnServer)?

I have dealt with the same situation in the past. You need to run your application pool under a domain account. That is, the app pool under which your web application is running should be setup to run as a domain user.

That same domain user should then be given permissions to the folder you are trying to upload to. In order to assign a domain user to your application pool, select the appropriate pool from the application pools node in IIS, right click and select properties. From the properties dialog box select the identity tab and choose "Configurable" and then provide a domain account.

Then you should give permissions to the same user on your folder.

I cannot find any documentation but you might have to dispose of the HttpPostedFile object. Most of the time, if files are locked, then some object that associates with them has not been properly disposed.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions