如何允许 Web 项目进行调试,而无需在项目中存储服务器配置?
我想将我的项目设置为在 IIS 中运行,因为开发服务器在投入生产时导致了误报。
然而,我不希望我那些不那么偏执的同事被迫这样做。 我可以关闭附加到 iis 时启动的开发服务器,而不强制我的同事这样做吗?
I want to set my project to be run in IIS, because the development server has caused false positives when going to production.
However, I don't want my less paranoid colleagues to be forced into this. Can I turn off the development server launching when I attach to iis, without forcing it on my colleagues?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果我理解这个问题,那么您遇到的问题是,您对 web.config 的本地更改不断被签入源代码管理...因此,如果您在 web.config 中设置用于调试的编译节点,然后将其签入,则更改将影响其他开发商吗?
这是网络应用程序中最烦人的事情之一。 我使用的技术就是打败那些将本地设置签入到 web.config 的开发人员。
不过说真的......我以前使用过的一项技术是限制源代码管理中的权限,以便只有主管理员帐户可以签入对其进行的更改。
普通开发人员无权更改源代码管理中的特定文件。
开发人员手动删除 web.config 本地副本的只读标志,以便他们可以对其环境进行任何必要的更改(连接设置、调试设置等)...但他们无法意外地将这些更改签入源控制。
如果确实需要更改 web.config 文件,那么我们必须使用主管理员帐户登录才能进行更改。
If I understand the question, you are running into the problem where your local changes to web.config keep getting checked into source control... so if you setup the compilation node for debugging in web.config then check it in, the change will affect other developers?
It is one of the more annoying things about web apps. The technique I use is to just beat the crap out of any of my developers that check in local settings to web.config.
Seriously though... one technique that I've used before is to just limit permissions in source control so that only a master admin account can check in changes to it.
Regular developers don't have rights to change that particular file in source control.
The devs manually remove the read-only flag for their local copy of web.config so they can make any necessary changes for their environments (connection stings, debug settings, etc)... but they cannot check in those changes by accident to source control.
If a change is really needed to the web.config file then we have to log in with the master admin account to make the change.
嗯,我有兴趣知道您的项目的默认服务器是什么 - 因为它肯定是这些选项之一?
反正。 对于您想要做的事情,有一个“漫长的路要走”:
您现在将调试网站工作进程。
如果您在远程计算机上运行 IIS 并且使用 VS2k8,则需要确保在远程计算机上安装了 Visual Studio 远程调试监视器 - 这些文件通常可以在 VS2k8 安装目录中找到:
(某处有一个安装程序,但我目前似乎找不到它)。
Hmm, I'd be interested to know what the default server for your project is - because surely it's one of those options?
Anyway. There's a "long way round" to what you want to do:
You'll now be debugging the website worker process.
If you are running IIS on a remote machine and you're using VS2k8, you'll need to ensure you have the Visual Studio Remote Debugging Monitor installed on the remote computer - the files can usually be found in your VS2k8 install directory:
(There's an installer around somewhere, but I can't seem to find it at the moment).