How can I manually override the IIS directory for an ASP.Net project opened by VS2008 but created on another computer?

I have an ASP.Net project created by a team member on another computer. The project refers to a virtual directory that exists on my computer but is in a different local location.

Currently, the following error occurs when trying to open a project:

The IIS local URL http://localhost/foo/default.aspx specified for the foobar web project is not configured. To open this project, you must configure a virtual directory. Create virtual directory now? [Well no]

So there are two options:

  • select yes: it creates a virtual directory that I think I need, which I don’t want to do. I already have a virtual directory somewhere else.
  • select no: This is not an option, as the project opens, but without all the calls and whistles that I know and love.

Where is the location of the virtual directory (in my case http://localhost/foo/default.aspx ) specified in the project? Can I change this manually, say, in the configuration file inside the project, before or after opening it? A configuration change seems more ideal than opening IIS manually to override the virtual directory path.

EDIT (solution) . Buried in the comments below is the next answer (Thanks @Thyamine)

This can be configured in the foo.csproj file for the project.

Find 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> 
+4
source share
1 answer

You can let it create a directory and then regroup it in IIS Manager to point to the directory that you prefer to use.

Or you could say that it does not appear at all, and then manually create a virtual directory with IIS Manager in an existing directory.

+2
source

Source: https://habr.com/ru/post/1341338/


All Articles