internal static void Start() { ServerFqdnCache.InitializeCache(); if (RfriServer.instance == null) { bool flag = false; try { RfriServer.instance = (RfriServer)RpcServerBase.RegisterAutoListenInterfaceSupportingAnonymous(typeof(RfriServer), RpcServerBase.DefaultMaxRpcCalls, "Microsoft Exchange RFR Interface", true); flag = true; } catch (RpcException ex) { RfriServer.ReferralTracer.TraceError <string>(0L, "Error registering the RFR RPC interface: {0}", ex.Message); RfriServer.eventLog.LogEvent(AddressBookEventLogConstants.Tuple_RpcRegisterInterfaceFailure, string.Empty, new object[] { "RFR", ServiceHelper.FormatWin32ErrorString(ex.ErrorCode) }); } finally { if (!flag) { RfriServer.rfriAsyncDispatch = null; RfriServer.Stop(); RfriServer.instance = null; } } } }
internal static void Start() { if (NspiServer.instance == null) { bool flag = false; try { NspiServer.instance = (NspiServer)RpcServerBase.RegisterAutoListenInterfaceSupportingAnonymous(typeof(NspiServer), RpcServerBase.DefaultMaxRpcCalls, "Microsoft Exchange NSPI Interface", false); NspiServer.instance.StartRundownQueue(); flag = true; } catch (RpcException ex) { NspiServer.NspiTracer.TraceError <string>(0L, "Error registering the NSPI RPC interface: {0}", ex.Message); NspiServer.eventLog.LogEvent(AddressBookEventLogConstants.Tuple_RpcRegisterInterfaceFailure, string.Empty, new object[] { "NSPI", ServiceHelper.FormatWin32ErrorString(ex.ErrorCode) }); } finally { if (!flag) { NspiServer.nspiAsyncDispatch = null; NspiServer.Stop(); NspiServer.instance = null; } } } }