ASP.NET操作服务System.ComponentModel.Win32Exception: 拒绝访问

引用空间

using Microsoft.Win32;

((TimeSpan)Process.GetCurrentProcess().TotalProcessorTime).TotalSeconds.ToString("N0");

 

 

如果出现“System.ComponentModel.Win32Exception: 拒绝访问”

 

1.WEBCONFIG中使用
<identity impersonate="true" userName="服务器系统用户名" password="服务器系统密码"/>
放在<system.web>标签中
2.
或者将ASP.NET设为管理员权限(IIS5及以下),或者NETWORKSERVICE(IIS6)

posted on 2012-04-24 15:29  黄兆张's Blog  阅读(7236)  评论(0编辑  收藏  举报

导航