在命名了一些混淆之后,我的团队决定为项目中的所有现有代码文件重新命名一些项目和名称空间。(在2012中)
我们改变了:
在所有这些之后,IIS8.0Express仍然坚持使用旧的项目名称作为站点名称(同时进行本地调试)。我怎么才能解决这个问题?
编辑:真正的问题是: IIS 8.0是如何确定站点名称的
以下是网站.csproj文件中的一个片段
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>52143</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:53177/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>网站名...and nothing。
发布于 2012-09-10 23:39:23
这个问题根本不在项目中。
在applicationhost.config文件(iis.net链接)中,通常在
(user-dir)\My Documents\IISExpress\config\applicationhost.config
有一个网站的设置。只需更改站点的name属性即可。
<site name="MvcApplication1" id="3">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="(whateverpath)\My Documents\Visual Studio 2012\Projects\MvcApplication1\MvcApplication1" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:57733:localhost" />
</bindings>
</site>发布于 2012-09-10 22:02:44
您还必须在csproj文件和sln文件中找到并更改这些名称(这些文件基本上是带有文件扩展名的xml文件,VS使用)。
首先,也是最重要的,备份你所有的东西,以防万一。接下来,在csproj/sln文件中搜索旧名称(希望它们没有被称为"if")。更改名称,然后尝试启动。
我不知道有什么工具或自动化的方法可以做到这一点,但正如上面所述,我已经成功地手工完成了这一工作。
发布于 2012-09-10 22:04:48
您重新配置了IIS Express吗?在项目propertis上的web选项卡上,单击“”
https://stackoverflow.com/questions/12359995
复制相似问题