I am trying to execute this command from a web application on sourceServer:

var mgr = ServerManager.OpenRemote(destServer)

but I receive this error:

UnAuthorized access wth a detail error: "Retrieving the COM class factory for remote component with CLSID {2B72133B-3F5B-4602-8952-803546CE3344} from machine failed due to the following error: 80070005"

I have full administrative rights on both servers.

I can issue that command from a console application no problem, but when I try it from the web application, I get the error!

I have tried enabling the remote management checkbox and started teh remote access auto connection manager and also tried updating the load user profile on the applicaiton pool from false to true.

I have searched so much to the point that all of my links are pink in color!

Any input is greatly appreciated.

有帮助吗?

解决方案

I've decided to ditch the use of ServerManager.OpenRemote() and use the DirectoryEntry way: DirectoryEntry root = new DirectoryEntry("IIS://server/W3SVC", username, password) it is much simpler and straightforward.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top