3

I have a WebSite (not project, WebSite) using ASP.NET Webforms, at the begining this WebSite was created using Casini (old visual studio Web Server) with "GestorAplicaciones" as virtual directory.

The start url for the application was "http://server:port/GestorAplicaciones/Default.aspx"

Now I have opened this web site on Visual Studio 2013 and running under IISExpress but I had problems with virtual directory.

My web site in applicationhost.config was:

<site name="GestorAplicaciones" id="12">
    <application path="/" applicationPool="Clr4IntegratedAppPool">
        <virtualDirectory path="/" physicalPath="C:\...\GestorAplicaciones" />
    </application>
    <bindings>
        <binding protocol="http" bindingInformation="*:10000:localhost" />
    </bindings>
</site>

Searching for information about the problem I found how to create a virtual directory in IISExpress, I have to do this:

<site name="GestorAplicaciones" id="12">
    <application path="/" applicationPool="Clr4IntegratedAppPool">
        <virtualDirectory path="/" physicalPath="C:\Temp" />
    </application>
    <application path="/GestorAplicaciones" applicationPool="Clr4IntegratedAppPool">
        <virtualDirectory path="/" physicalPath="C:\...\GestorAplicaciones" />                    
    </application>
    <bindings>
        <binding protocol="http" bindingInformation="*:10000:localhost" />
    </bindings>
</site>

This way my web site work fine with virtual directory.

However each time visual studio open the solution it change the configuration of the website in applicationhost.config, it write this again:

<site name="GestorAplicaciones" id="12">
    <application path="/" applicationPool="Clr4IntegratedAppPool">
        <virtualDirectory path="/" physicalPath="C:\...\GestorAplicaciones" />
    </application>
    <application path="/GestorAplicaciones" applicationPool="Clr4IntegratedAppPool">
        <virtualDirectory path="/" physicalPath="C:\...\GestorAplicaciones" />
    </application>
    <bindings>
        <binding protocol="http" bindingInformation="*:10000:localhost" />
    </bindings>
</site>

Then the website doesn't work and I have to change applicationhost.config each time open the solution in Visual Studio.

How to do to visual studio don't change my web site config in IIS Express??

Zhaph - Ben Duguid
  • 26,785
  • 5
  • 80
  • 117
Javier Ros
  • 3,511
  • 2
  • 21
  • 41
  • have you tried these solutions http://stackoverflow.com/questions/19457193/stop-visual-studio-2013-modifying-the-iisexpress-applicationhost-config ? – makison Nov 14 '15 at 14:28

0 Answers0