无法识别服务器硬件信息,请教:无法获取服务器硬件信息

请教各位一个问题,我的程序在本地可以正常获取服务器的硬件信息(CPU,硬盘序号等),但是,一放到服务器上,就提示如下错误信息,无论是winform还是webform均是一样的错误提示。想请问各位,如果需要程序正常运行,需要提供哪些必要的配置,如以administrator登录或者提供其他权限等设置,非常感谢^_^

Server Errorin'/'Application.--------------------------------------------------------------------------------Retrieving the COMclassfactoryforcomponent with CLSID {4590F811-1D3A-11D0-891F-00AA004B2E24} failed due to the following error: 8007007e.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack traceformore information about the error andwhereit originatedinthe code.

Exception Details: System.IO.FileNotFoundException: Retrieving the COMclassfactoryforcomponent with CLSID {4590F811-1D3A-11D0-891F-00AA004B2E24} failed due to the following error: 8007007e.

Source Error:

Line40:stringstrCpu=null;

Line41:         ManagementClass myCpu=newManagementClass("win32_Processor");

Line42:         ManagementObjectCollection myCpuConnection=myCpu.GetInstances();

Line43:foreach(ManagementObject myObjectinmyCpuConnection)

Line44:         {

Source File:d:\hz\wwwroot\yuntianair\wwwroot\GetDiskInfo.aspx.csLine:42

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值