Visual Studio creating IIS virtual directories when solution opened
Asked Answered
E

1

5

Visual Studio is asking to create virtual directories in IIS when I open a solution. Could this be because projects within the solution have been configured to use IIS rather than Cassini?

The dialog message is:

"The local URI ... specified for Web project ... has not been configured. In order to open this project the virtual directory needs to be configured. Would you like to create the virtual directory now?"

Eating answered 22/6, 2010 at 13:16 Comment(1)
Can you verify that on the 'Web' tab on the Project Properties Window?Bette
P
7

Yes it is. If a web project is configured to use IIS (on the Web tab in the project properties -> "Use local IIS web server"), Visual Studio requires that the path defined exists in IIS as a virtual directory and corresponds to the project's location on disk. If the path does not exist in IIS, Visual Studio will offer to create it for you.

Palladin answered 22/6, 2010 at 13:29 Comment(2)
Thanks Adrian. What are the headline benefits of doing this? It is causing me additional effort when I switch to work on code in a branch, because VS seems to care from which project each virtual directory was created, meaning I have to delete all the virtual directories in IIS each time I switch branches (of my working copy). Is this something you've experienced?Eating
@Ben: Yes, it is a pain when working on branches. After a few times though, it is relatively quick to set up as you become familiar with what needs configuring. I prefer to use IIS because it means that my web application keeps running after I stop debugging it with Visual Studio, meaning it can still be used. Also, when developing new functionality, I hit compile and then switch to a browser, without having to start the built-in web server or start debugging.Palladin

© 2022 - 2024 — McMap. All rights reserved.