Search code examples
iis-7.5windows-server-2008

how to trace connection failure reasons from C# code?


I have two identical pieces of C# code that connects remotely to another server: one from console and the other from web application:

var mgr = ServerManager.OpenRemote(myServer) 

The console one works fine. The other however fails with the following exception:

System.UnAuthorizedAccessException with this com-message: {"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 disabled the firewall on both servers and rebooted them.

Is there a way or a tool that will help me see how each connection played out like: what logins and access that both servers sent and received?

My attempt is not trapped in the IIS logs and event viewer.

I have tried to make fiddler listens, but it also didn't find anything.


Solution

  • I would suggest that you use Process Monitor from SysInternals to watch what the web process is doing. The trick is going to be filtering the fire hose of info !! Btw, I suspect it is an Application Pool Identity or DCOM permission problem.