I have an ASP.Net project created by a team member on another computer. The project references a virtual directory that exists on my computer but under a different localhost location.
Currently, the following error occurs when I try to open the project:
The local IIS URL
http://localhost/foo/default.aspxspecified for Web project foobar 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?
[Yes] [No]
So, there are two options:
- select yes: It creates the virtual directory that it thinks I need, which I don’t want to do. I already have a virtual directory somewhere else.
- select no: This isn’t an option, as the project opens, but without all the bells and whistles I know and love.
Where is the virtual directory location (in my case http://localhost/foo/default.aspx) specified within the project? Can I change this manually, say in a configuration file within the project, either before or after I open it? A configuration change seems more ideal than manually opening IIS to override a virtual directory path.
EDIT (solution): Buried in the comments below is the following answer (Thanks @Thyamine)
This can be configured in the foo.csproj file for the project.
Look for the lines:
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{F00-000-000}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<!-- ... -->
<IISUrl>http://localhost/Foo/default.aspx</IISUrl> <!-- EDIT THIS LINE -->
<!-- ... -->
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
You could allow it to create the directory, then re-map it in IIS Manager to point to the directory you would prefer it to use.
Or you could tell it not to map at all, and then manually create the virtual directory with IIS Manager to the directory you already have.