Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change IIS Express site name in Visual studio project

Hi I have two solution file one is called WWSearch and the other WWSearchDev. WWSearchDev was copied from WWSearch. both solution has ASP.net web form project.

I searched everywhere in WWSearchDev for the word "WWSearch" and it has no reference to "WWSearch". But when I run the code IIS express still says the site name is WWSearch

The problem is the path of WWSearchDev should be C:\VSS\WWSearchDev. *see screenshot.

I tried adding a new site in IIE express application config file in C:\Users\%username%\Documents\IISExpress\config\Applicationhost.config. but It still not working

please help.. Thank you

http://i.imgur.com/9ubfxAa.png

This is the applicationhost.config for IIS

<sites>
            <site name="WebSite1" id="1" serverAutoStart="true">
                <application path="/">
                    <virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1" />
                </application>
                <bindings>
                    <binding protocol="http" bindingInformation=":8080:localhost" />
                </bindings>
            </site>
            <site name="WWSearch" id="2">
                <application path="/" applicationPool="Clr4IntegratedAppPool">
                    <virtualDirectory path="/" physicalPath="C:\VSS\WWSearch" />
                </application>
                <bindings>
                    <binding protocol="http" bindingInformation="*:49454:localhost" />
                </bindings>
            </site>
            <site name="WWSearchDev" id="3">
                <application path="/" applicationPool="Clr4IntegratedAppPool">
                    <virtualDirectory path="/" physicalPath="C:\VSS\WWSearchDev" />
                </application>
                <bindings>
                    <binding protocol="http" bindingInformation="*:52184:localhost" />
                </bindings>
            </site>         
            <siteDefaults>
                <logFile logFormat="W3C" directory="%IIS_USER_HOME%\Logs" />
                <traceFailedRequestsLogging directory="%IIS_USER_HOME%\TraceLogFiles" enabled="true" maxLogFileSizeKB="1024" />
            </siteDefaults>
            <applicationDefaults applicationPool="Clr4IntegratedAppPool" />
            <virtualDirectoryDefaults allowSubDirConfig="true" />
        </sites>
like image 415
BobNoobGuy Avatar asked Jul 30 '14 22:07

BobNoobGuy


People also ask

How do I edit IIS Express in Visual Studio?

Configure IIS express on visual studioSelect the web application project and open properties -> select the web tab -> under server's select IIS express-> Specify the project URL. Now open the project folder and . vs folder (Hidden) -> Config -> applicationhost.

Is IIS Express part of Visual Studio?

IIS Express is not included with VS 10 SP1 and will need to be installed separately. You can also manually launch IIS Express from the command line and use it with Visual Studio 2008, using the custom web server option.


2 Answers

I had the same problem for HTTPS and Visual Studio 2015.

The IIS Express configuration file :

"C:\Users{username}\Documents\IISExpress\config\applicationhost.config" didn´t have the reference for my site.

I found the reference inside the solution directory in a hide directory

"{Solution}\.vs\config\applicationhost.config"

I removed the entry for the old copy site, closed and reopen the project and everything was right.

like image 83
Raúl Martín Ramos Avatar answered Oct 13 '22 01:10

Raúl Martín Ramos


  1. Open with sublime text3
  2. Find folder .vs > config > applicationhost.config
  3. Searh old Site name & Change new name
  4. save
like image 44
Pattaraphol Studio Avatar answered Oct 12 '22 23:10

Pattaraphol Studio