Dmy*_*tro 77 visual-studio iis-express
我无法解决这个问题

我建议我必须更改c:\Windows\System32\drivers\etc\hosts文件并添加
# localhost name resolution is handled within DNS itself.
Run Code Online (Sandbox Code Playgroud)
下一行:
127.0.0.1 mysite.dev
Run Code Online (Sandbox Code Playgroud)
但它没有帮助.有什么建议?
当我尝试在Microsoft Visual Studio 2012中打开网站项目时出现错误.
rob*_*pim 141
通常情况下,至少在我的情况下,这种情况发生在*.csproj.user文件位于项目目录中并且<UseIISExpress>true</UseIISExpress>在其中.
或者,如Zachary Cutler所述,您还可以简单地:关闭Visual Studio,删除
*.csproj.user文件并重新打开Visual Studio.这将强制VS重建文件.
Dmy*_*tro 32
我已经找到了解决方案.我只需要编辑C:\Users\Administrator\Documents\IISExpress\config\applicationhost.config文件,将我的网站添加到<sites>节点.
wil*_*Mon 19
您可以选择在本地安装IIS并在.csproj文件上编辑几个标签.打开你的csproj文件然后转到section <VisualStudio>然后找到<UseIIS>True</UseIIS>
它必须设置为true的标签,然后转到tag: <IISUrl>并设置托管应用程序进行测试的URL地址:
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>False</AutoAssignPort>
<DevelopmentServerPort></DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
**<IISUrl>http://localhost/myWebSiteAppSample</IISUrl>**
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
Run Code Online (Sandbox Code Playgroud)
那就是.现在您可以正常加载项目.
小智 15
问题是您的项目设置将在本地IIS中执行,并且指定的URL不存在.
您可以使用选项来解决问题.
选项1 :(使用IIS Express)
1.)打开web项目.csproj文件作为XAML或在记事本中.
2.)找到这些属性并根据您的喜好进行设置.
UseIIS = false
UseIISExpress = true
就是这样.
选项2 :(使用本地IIS)
按照选项1步骤操作,但更改以下属性.
UseIIS = true
IISUrl = https:// localhost
UseIISExpress = false
小智 7
可以通过删除项目目录中名为.vs的文件夹来解决此问题。
这解决了问题,因为在删除.vs文件后打开项目时,它将创建具有子文件夹config的相同文件夹以及具有项目名称的文件夹。
config文件夹applicationhost包含成功运行项目所需的必要设置。
| 归档时间: |
|
| 查看次数: |
56656 次 |
| 最近记录: |