Hi,
I'm trying to upload the ASPNETDB.MDF file to a hosting server via FTP, and everytime when it was uploaded half way(40% or 50%)
I would get an error message saying:
"550 ASPNETDB.MDF: The process cannot access the file because it is being used by another process"
and then the upload failed.
I'm using SQL Express. Does anybody know what's the cause?
Thanks a lot
It is because there are some users who are accessing the database through your web application. When the database is in process you cannot replace it. If you want to upload you need to make sure that no one is accessing your application. ASP.NET provides an easy way to disconnect all the clients to your web application with app_offline.htm file
Just create a simple html file with name app_offline. First upload this file to the web root of your application. Once this file was placed into the root directory, all clients will be disconnected and you can make some quick changes like replacing files etc, and after you finish replacing the files, delete the app_offline.htm file from the root.
You can also display a friend message in the app_offline like "Site under maintenance"
app_offline.htm file:
<html>
<body>
Site under maintenance!
</body>
</html>
Thanks
No comments:
Post a Comment