如何自动连接到远程服务器上的特定 IIS 池?
目前三位开发人员共用一台IIS盒子进行测试。 由于第三方实用程序和其他限制,我们无法在本地运行该项目,因此远程调试是唯一的选择。 我们当前的流程是远程到网络服务器,运行iisapp.vps来获取我们各个站点的PID,然后在VS2008中运行远程调试,以连接到该pid。
我已经找到了自动连接到 w3wp 的脚本(如果它是唯一运行的脚本),但是我还没有找到一种方法能够在脚本中远程查找 w3wp PID 并使用它来附加。
Currently three developers share one IIS box for testing. Because of third party utils and other restrictions we can't run the project locally so remote debugging is the only option. Our current process is to remote to the webserver, run iisapp.vps to get the PID of our individual sites and then run remote debugging in VS2008, to connect to that pid.
I have found scripts for automatically connecting to w3wp automatically, if it's the only one running however I haven't found a way to be able to remotely find the w3wp PID in script and use that to attach.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
大多数与 IIS 一起使用的脚本都假定您在本地计算机上运行。 如果您查看脚本代码,很可能会使用 WMI 与 IIS 一起工作,并且它要做的第一件事就是连接到 WMI 提供程序,该提供程序始终需要计算机名称和 WMI 提供程序路径。 本地计算机的计算机名称通常表示为“.”。 如有需要。
例如:
如果您将 strComputer 更改为指向 IIS 服务器,您将获得查询时运行的所有 w3wp 进程的 PID。
注意:上面的代码是脚本的片段而不是完整的程序。
Most of the scripts that work with IIS assume that you are running on the local machine. If you look in the script code it's most likely using WMI to work with IIS and the first thing it has to do is connect to WMI provider which always requires a machine name and a WMI provider path. The machine name for the local machine is often represented as "." where required.
For Example:
If you change strComputer to point to the IIS server, you will get the PIDs for all of the w3wp processes running at the time of the query.
Note: the above code is a fragment of a script not a complete program.