无法调试Windows服务VS2010的Win7 [英] Can't debug windows Service VS2010 Win7

查看:265
本文介绍了无法调试Windows服务VS2010的Win7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不能够从XP和VS2005迁移后的调试我的任何服务,Win7和VS2010。

I am not able to debug any of my services after migrating from XP and VS2005, to Win7 and VS2010.

我可以编译,我可以安装,我可以正确运行的服务。

I can compile, I can install, I can run the services correctly.

不过,我需要进行调试。当我尝试连接到这个过程中,我选择了正在运行的进程,因为我总是做了VS2005,我收到一个错误,告诉我​​需要管理员权限。

But, I need to debug them. And when I try to attach to the process, I select the running process as I always did on VS2005, and I receive an error telling that I need admin permission.

我已经是管理员。此外,在互联网上搜索了很多之后,我发现,运行VS2010作为管理员(通过右键点击)应该修复它,但我还是不能。

I am already an administrator. Also, after searching a lot on the internet, I found that running VS2010 as an admin (via right click) should fix it, but I still can't.

我也试过以纪念vslauncher.exe属性复选框始终运行以管理员身份。 VS2010的窗口显示在最前面,它实际上正在作为管理员,但同样,当我尝试连接到过程中,它说我需要管理员权限。

I also tried to mark the checkbox on vslauncher.exe properties to run it always as administrator. The VS2010 window shows on top that it actually is running as admin, but again, when I try to attach to the process it says that I need admin rights.

有没有人对如何进行任何想法?

Has anybody any idea about how to proceed?

推荐答案

这是一个权限问题。 Win7自带有一个新的安全体系,我不得不添加到我的个人资料(即使是管理员)此权限:

It was a permissions problem. Win7 comes with a new security system, and I had to add to my profile (even being an admin) this permission:

控制面板 - >管理工具 - >本地安全策略 - >本地策略 - >用户权利指派 - >调试程序 - >添加用户或组

Control panel -> Administrative tools -> Local Security policy -> Local Policies -> User rights Assignment -> Debug programs -> Add user or group .

在那里,我说我自己的用户。重新启动计算机(重要!!如果不重新启动,它不会工作)。

And there, I added my own user. Reboot machine(Important!! Without rebooting, it won't work).

在那之后,我能够连接过程进行调试。这是一个很长的时间来解决这个问题,我希望能帮助其他人的发现同样的问题。

After that, I was able to attach processes to debug them. It's been a really long time to solve this, I hope to help other people that find this same problem.

谢谢大家的帮助。

这篇关于无法调试Windows服务VS2010的Win7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆