[ASP.NET]System.UnauthorizedAccessException: 拒绝访问。

当试图在ASP.NET里面使用COM对象的时候,常常出现这个异常。
可以尝试在web.config里面添加以下一行以解决这个问题
<identity impersonate="true" userName="YourAdminUsr" password="YourAdminPwd"/>
原文地址:https://www.cnblogs.com/hehe520/p/6330493.html