Try this way
In order to deploy the release on the development or production server, please follow the following steps.
- Install Web Deployment MSI.
- Right Click on the your project under the solution explorer and add the web deployment project( Here I am not using convert to web application or publishing)
- Then compile the files. This will create a folder in your project directory which will contain the required files to be deploy on the server.
- Take the back up of your virtual directory and remove the virtual directory as well as files from inetpub.
- Goto Inet mgr , type inetmgr in run hit enter.
- Under the default website, create a virtual directory, keep the deployed files in the inetpub and browser the files.
- Allow appropriate access such as read, run script and browse. That's all
Flag it as your answer if you have find it useful else let me know ...