大家看看我这个问题咋解决啊..这个问题解决不了我的程序没法子进行下去啦

Angela_129 2014-05-10 09:21:33
大家看看VS2010 的这个问题大家遇到过没有..该怎么办呢?真是很紧急啊..修复了VS2010也不好使..把它卸载了再装也不好使...正在制作毕业设计了...真是很着急啊...求帮助~
截图是这样的:
问题是这样的:未处理 System.Security.SecurityException
HResult=-2146233078
Message=不允许所请求的注册表访问权。
Source=mscorlib
StackTrace:
在 System.ThrowHelper.ThrowSecurityException(ExceptionResource resource)
在 Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
在 Microsoft.Win32.RegistryKey.OpenSubKey(String name)
在 System.Windows.Forms.LinkUtilities.GetIELinkBehavior()
在 System.Windows.Forms.LinkUtilities.EnsureLinkFonts(Font baseFont, LinkBehavior link, Font& linkFont, Font& hoverLinkFont)
在 System.Windows.Forms.LinkLabel.OnPaint(PaintEventArgs e)
在 System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
在 System.Windows.Forms.Control.WmPaint(Message& m)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.Label.WndProc(Message& m)
在 System.Windows.Forms.LinkLabel.WndProc(Message& msg)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.Run(Form mainForm)
在 frmEmpInfo.Program.Main() 位置 D:\毕业啦\graduation\frmEmpInfo\frmEmpInfo\Program.cs:行号 18
在 System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
在 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading.ThreadHelper.ThreadStart()
InnerException:
...全文
155 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
Angela_129 2014-05-12
  • 打赏
  • 举报
回复
最终的解决办法是重装系统了...
zhlym 2014-05-10
  • 打赏
  • 举报
回复
windows7或以上系统吧? 是注册表访问? 那对权限很要求严格的,换XP的话就省事些了
Angela_129 2014-05-10
  • 打赏
  • 举报
回复
引用 4 楼 sp1234 的回复:
再说白一点,就是你的vs启动时是用户身份,而不是管理员身份。
我已经用管理员身份做了好几天程序了..今儿遇到了我做的东西无法写入数据库了..我加了一个异常..提示还是这个错误...所以来求救了...
  • 打赏
  • 举报
回复
再说白一点,就是你的vs启动时是用户身份,而不是管理员身份。
  • 打赏
  • 举报
回复
不是告诉你“以管理员权限运行程序”嘛。现在互联网这么发达,你应该会自己搜索。
Angela_129 2014-05-10
  • 打赏
  • 举报
回复
引用 1 楼 caozhy 的回复:
以管理员权限运行程序。 你的程序尽量不要访问注册表的公共位置,比如LocalMachine。
那您说我重装系统能否解决这个问题呢?
threenewbee 2014-05-10
  • 打赏
  • 举报
回复
以管理员权限运行程序。 你的程序尽量不要访问注册表的公共位置,比如LocalMachine。

110,536

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧