System.Runtime.InteropServices.COMException (0x800706BA) 解决方法

提示“操作失败:无法获取MAC地址。”错误的解决方法。

.NET 获取 MAC地址可能会遇到
   System.Runtime.InteropServices.COMException (0x800706BA)
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext()
错误,解决办法是:
在服务里,DCOM Server Process Launcher 这个服务启动就好了。

有两种方法:

1.在“控制面板” 的 “管理工具” 的“服务”中启用 DCOM Server Process Launcher。

2.在“开始/运行”中输入msconfig,打开“系统配置实用程序”对话框,再点开上面的“服务”选项卡,找到“DCOM Server Process Launcher”,在它的前面打上钩,“确定”后重启系统。

原文地址:https://www.cnblogs.com/robinli/p/3285738.html