asp.net - 在 ASP.NET/IIS7 中本地模拟域

标签 asp.net iis

我想通过说 simdomain.com 来模拟我的 ASP.NET 应用程序。

我怎样才能轻松做到这一点?

理想情况下,我想要某种过滤器,以便将对某些域的请求路由到本地主机,并且应该很容易打开和关闭它。

最佳答案

编辑hosts file .

  1. 运行 notepad c:\windows\system32\drivers\etc\hosts
  2. 添加以下行:

    127.0.0.1 simdomain.com

  3. 打开 IIS 管理并添加一个“simdomain.com”网站。所以它知道域。

关于asp.net - 在 ASP.NET/IIS7 中本地模拟域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/720688/

相关文章:

iis - 如何在 IIS 7 中使用 appcmd 更改 allowDefinition 部分属性?

.net - Azure 网站上 "Always On"设置的含义

javascript - 如何让IIS for asp.net网站的javascript文件更新立即生效?

php - 通过 PHP 挂起生成 Crystal Report

javascript - RequiredField 验证器未触发

asp.net - 模型和 View 模型有什么区别?

asp.net - 如何使用 VSTS 发布管理部署到 Azure 资源组

c# - 选择没有特定类的 jQuery First Child

asp.net - 使用没有 API key 的谷歌地图?

sharepoint - 仅供内部访问的 IIS 网站的备用主机名