Steffen
Steffen

Reputation: 13938

Avoid application reset when deleting a folder

I'm having a bit of trouble with an ASP.Net MVC project.

The users can upload images, which are stored with an ID in the database, and the files are then stored in /Files/Images/ID/

Upon deleting the images again, I delete the folder /Files/Images/ID (that's the ID folder being deleted)

However when deleting a folder under the project, the application immediately resets, thereby losing all session and throwing all my users off.

Is there any way to mark a path so ASP.Net doesn't reset upon changes being made to the path ?

Upvotes: 1

Views: 61

Answers (1)

John Saunders
John Saunders

Reputation: 161783

It's very simple. Your ASP.NET application should not be performing file write or modify operations within the paths of your ASP.NET application. Use a different path for where you store the uploads.

Upvotes: 1

Related Questions