本文介绍了如何在Visual Studio项目中更改IIS Express站点名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个解决方案文件一个称为WWSearch,另一个称为WWSearchDev.WWSearchDev是从WWSearch复制的.两种解决方案都有ASP.net Web表单项目.

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

我在WWSearchDev中到处搜索了词"WWSearch",但它没有引用"WWSearch".但是当我运行IIS Express代码时,仍然说站点名称是WWSearch

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

问题是WWSearchDev的路径应为C:\ VSS \ WWSearchDev. *请参见屏幕截图.

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

我尝试在IIE Express应用程序配置文件中添加新站点C:\ Users \%username%\ Documents \ IISExpress \ config \ Applicationhost.config.但它仍然无法正常工作

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

请帮助..谢谢

这是IIS的applicationhost.config

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>

推荐答案

1)找到YourWebSite.sln文件

1 ) find YourWebSite.sln file

2)用记事本打开

3)在第5行或第6行中,找到您的网站名称,并将其重命名

3) in 5 or 6th line, find you website name, rename it

4)保存并退出

这篇关于如何在Visual Studio项目中更改IIS Express站点名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-09 19:32