与团队一起使用 IIS Express - 不使用 localhost 时

发布于 2024-12-16 19:38:50 字数 616 浏览 3 评论 0原文

我认为我们一定错过了一个技巧,因为我们发现与团队一起使用 IIS Express 非常痛苦。

问题是 IIS Express 的 applicationhost.config 本地存储在每个人的 MyDocuments 文件夹中,因此与 Visual Studio 解决方案分开,而不是在源代码管理中。

因此,当我们进行更改时,每个人都必须手动更新其计算机上的 applicationhost.config。

Visual Studio 对 applicationhost.config 文件执行的更新失败,因为我们没有使用 localhost,我们有主机条目来为我们的环境提供不同的名称。

尚未配置为 Web 项目指定的本地 IIS URL。

创建虚拟目录您必须指定“localhost”作为服务器名称

有更好的方法吗?

I assume we must be missing a trick as we are finding using IIS Express with teams quite painful.

The issue is IIS Express' applicationhost.config is stored locally in each persons MyDocuments folder, and thus separate to the Visual Studio solution and not in source control.

So when we make a change everyone has to manually update applicationhost.config on their machine.

THe update visual studio does to the applicationhost.config file fails, because we are not using localhost, we have host entries to give our environments different names.

The local IIS URL specifed for web project has not been configured.

Creation of the virtual directory You must specify "localhost" for the server name

Is there a better way?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

清泪尽 2024-12-23 19:38:50

请参阅此处

VISUAL STUDIO 2015 更新:正如评论中向我指出的那样
作者:Søren Nielsen,在 Visual Studio 2015 中 IIS Express 配置
文件已移动。它们现在每个项目都是独立的,并存储在
/{项目文件夹}/.vs/config/applicationhost.config。这是多少
在我看来,更好的是,不要忘记将 .vs/ 添加到您的
.gitignore/.hgignore 文件!

否则没有更好的方法。对于远程访问,您可以在开发计算机上使用 IIS,而不是 IIS Express...

Refer to Here

UPDATE FOR VISUAL STUDIO 2015: As was pointed out to me in a comment
by Søren Nielsen, in Visual Studio 2015 the IIS Express configuration
files have moved. They are now separate per project, and stored in
/{project folder}/.vs/config/applicationhost.config. Which is much
better, in my opinion, just don't forget to add .vs/ to your
.gitignore/.hgignore files!

Other wise NO there is no better way. Instead of IIS Express, for remote access you can use IIS on your development machine...

祁梦 2024-12-23 19:38:50

这似乎没什么大不了的:当您加载配置为使用 IIS Express 运行的项目时,VS 会检查您的 applicationhost.config 中是否有该条目。如果它没有找到它,它只会提示您问题并询问您是否希望它为您创建它。只需单击“是”即可添加条目。

至少,我们就是这样处理的。无论如何,问题只是第一次,所有其他设置都存储在项目中的 web.config 中,该配置是版本化的,所以一切都应该很顺利。

It doesn't seem a big deal: when you load a project configured to run with IIS express, VS checks your applicationhost.config for that entry. If it doesn't find it, it just prompts you with the problem and asks you if you want it to create it for you. Just click "yes" and the entry is added.

At least, that's how we deal with that here. The problem is just the first time anyway, all other settings are stored in web.config in the project, which is versioned, so everything should be smooth.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文