I have a web project in my solution file that is "unavailable" when I open the solution. When I right-click on the web project and reload the project, I get the following error:
The Web Application Project mycompany.myapp.mywebproject is configured to use IIS. The Web Server 'http://localhost/MyWebApp could not be found.
When this happens the easiest solution is to make the virtual directory manually.
First of all, you need to make sure you have the right version of ASP.Net installed and that you have installed the IIS extensions.
To do this, go to the relevant .net version's folder in c:\(windows)\microsoft.net\(dotnetver)\ (substituting the bracketed folders for the right folders on your PC) and run this command
Next once that's run and finished, sometimes running
from the command line helps, sometimes you don't need to.
Next, go to your IIS Manager and find you localhost website and choose add a folder. Browse to the folder in your project that contains the actual ASP.Net project and add that.
Finally, right click on the folder you added and you should have an option that says 'convert to application' or 'create virtual directory' or something similar.
!!Make sure the Virtual directory has the name 'MyWebApp'!!
Reload your solution and it should work.
Please be wary; this isn't a programming question (and shouldn't really be posted here) but I've posted this guidance as it's a common problem, but the advice I've posted is generic; the commands I've listed are correct but the steps you need to do in IIS may vary, it depends on your version and your account privileges.