用户帐户不匹配时如何远程调试?

发布于 2024-10-13 05:59:06 字数 386 浏览 7 评论 0原文

在以下情况下如何配置 Visual Studio 远程调试:

  1. 我的开发人员计算机是 AD 域的成员,并且我的用户名是“DevelopersName”。
  2. “远程”计算机位于同一以太网段上,但不属于域。
  3. “远程”计算机必须在“RemoteUserName”下运行软件。

我能找到的大多数文档都表明您需要将两台计算机置于同一域中并具有相同的用户名。这在这里是不可能的。

我可以将我的用户名添加到“远程”,但该软件仍然需要在“RemoteUserName”下运行。

如果有帮助,我可以将第二块网卡添加到我的开发人员机器上并直接连接“远程”机器。

使用VS2008,但会很快就会转向 VS2010,

谢谢。

How can I configure Visual Studio remote debugging when:

  1. My developer machine is a member of an AD domain, and my username is "DevelopersName".
  2. The "remote" machine is on the same Ethernet segment, but is not part of the domain.
  3. The "remote" machine must run software under "RemoteUserName".

Most documentation I can find suggests that you need have both machines in the same domain and with identical usernames. That's not possible here.

I could possibly add my username to "remote", but the software still needs to run under "RemoteUserName.

If it helps, I could add 2nd network card to my developer machine and directly connect the "remote" machine.

Using VS2008, but will be moving soon to VS2010.

Thank you.

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

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

发布评论

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

评论(3

究竟谁懂我的在乎 2024-10-20 05:59:06

抱歉,我刚刚花了 10 个小时尝试调试您的确切问题。我的发现并不好。

您需要同步您的帐户,特别是当您使用远程应用程序连接到 SOA 环境中的其他系统时,即:Sharepoint、AD。

如果您在本地计算机上创建一个与远程计算机同名的帐户(让我们这样做,而不是使用域帐户),那么您可以在某种程度上进行远程调试。

然后,您需要确保远程服务正在该帐户下运行,并且它是管理员组的成员。我的意思是按住控制键,然后右键单击运行方式 - 使用远程调试器,然后选择用户(如果远程服务器以所需用户身份登录则不需要)。

运行向导它将打开所需的端口,使用身份验证,因为非身份验证不会调试托管代码。永远不会遇到断点,对此您无能为力。

在本地开发计算机上,注销您的域帐户,然后登录到与运行远程服务的服务器上的帐户名称相匹配的本地帐户。

现在你可以接受远程调试的改变了。如果您无法执行上述任何操作,抱歉没有解决方法,它完全取决于用户帐户并拥有正确的权限。

Sorry, but I've just spent the last 10 hours trying to debug your exact problem. My findings are not good.

You need to get your accounts synced, especially if you are using your remote app to connect to other systems in your SOA environment, ie: Sharepoint, AD.

You can to some extent get remote debugging to work, if you create an account on your local machine with the same name as that of your remote machine (lets do it like this rather rather than working with the domain account).

You then need to make sure the remote service is running under this account, and its a member of the administrators group. And by this I mean hold down control, and right click run as - with the remote debugger, and select the user (not required if remote server is logged in as the required user).

Run the wizard it will open the required ports, use Authentication, because non authentication won't debug managed code. Breakpoints are never met, and there is nothing you can do about this.

On your local dev machine, log off your domain account, and log onto the local account with matching name as the account on server thats running the remote service.

Now you stand a change of remote debugging. If you can't do any of the above, sorry there is no workaround, its entirely dependent on the user account and having the right permissions.

晨曦÷微暖 2024-10-20 05:59:06

如果您不想创建本地帐户,请尝试使用以下命令通过命令提示符启动我们的调试器:

runas /user:[user@machinename] /netonly [debugger.exe]

例如:

 runas /user:john@mypc123 /netonly devenv.exe

If you don't want to create a local account, try starting our debugger via command prompt using the following command:

runas /user:[user@machinename] /netonly [debugger.exe]

E.g.:

 runas /user:john@mypc123 /netonly devenv.exe
痴情 2024-10-20 05:59:06

我假设它是您正在谈论的托管调试(对于本机调试,有一个无需身份验证的远程调试解决方案)。在这种情况下,我建议您使用本地用户在您的计算机上启动调试器。如果此本地用户的名称和密码与“RemoteUserName”的名称和密码匹配,则它应该可以工作。

(请注意,这并不妨碍您使用 AD 帐户登录工作站,您只需设置另一个帐户并使用 runas 启动 Visual Studio。)

I assume it's managed debugging you're talking about (for native debugging there's a remote debugging solution with no authentication). In this case, I would suggest that you use a local user to launch the debugger on your machine. If this local user's name and password match "RemoteUserName"'s name and password, it should work.

(Note that this does not preclude you from using the AD account to log in to your workstation, you just need to set up another account and use runas to launch Visual Studio.)

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