如何以特定用户身份调试 .net 应用程序?

发布于 2024-09-10 15:48:36 字数 124 浏览 2 评论 0原文

我正在 Visual Studio 2008 中创建一个 WinForms 应用程序。

我想在调试器中运行我的应用程序,并且希望该应用程序以运行 Visual Studio 的用户以外的用户身份运行。最好的方法是什么?

I'm creating a WinForms application in Visual Studio 2008.

I want to run my application in the debugger and I want the application to run as a user other than the user running Visual Studio. What is the best way to do this?

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

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

发布评论

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

评论(1

余生再见 2024-09-17 15:48:37

如果您有权访问允许打开多个终端服务器会话的操作系统,则只需以该用户身份打开一个新的终端服务器会话即可。使用运行 Visual Studio 的管理员帐户,您应该能够在其他会话中调试该进程。

您可以向应用程序添加调用以以所需用户身份登录,但这并不理想,因为环境显然与以该用户身份运行的体验不同。

否则我认为你需要看看 VS 安装在单独的盒子上的远程调试场景。

If you have access to an OS that lets you have multiple terminal server sessions open, then simply open a new terminal server session as that user. With an administrator account running Visual Studio you should be able to debug the process in the other session.

You could add calls to your app to login as the desired user, but that isn't ideal since the environment is clearly not identical to the experience of running as that user.

Otherwise I think you need to look at remote debugging scenarios where VS is installed on a separate box.

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