// Token: 0x06000009 RID: 9 RVA: 0x0000215C File Offset: 0x0000035C public void OnStartBegin() { this.isStarted = true; Configuration.Initialize(this.eventLog, new Action(this.serviceManager.StopService)); if (!Configuration.ServiceEnabled) { AddressBookService.GeneralTracer.TraceDebug(0L, "The service is not enabled."); return; } AddressBookService.InitializePerfCounters(new AddressBookPerformanceCounters()); NspiPropMapper.Initialize(); this.RegisterServicePrincipalNames(); ADSession.DisableAdminTopologyMode(); this.serviceManager.AddHttpPort(6001.ToString()); NspiServer.Initialize(this.serviceManager, this.eventLog); RfriServer.Initialize(this.serviceManager, this.eventLog); if (Configuration.ProtocolLoggingEnabled) { if (string.IsNullOrEmpty(Configuration.LogFilePath)) { this.eventLog.LogEvent(AddressBookEventLogConstants.Tuple_BadConfigParameter, "LogFilePath", new object[] { Configuration.LogFilePath }); return; } ProtocolLog.Initialize(ExDateTime.UtcNow, Configuration.LogFilePath, TimeSpan.FromHours((double)Configuration.MaxRetentionPeriod), Configuration.MaxDirectorySize, Configuration.PerFileMaxSize, Configuration.ApplyHourPrecision); } }
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; } } } }
// Token: 0x0600000C RID: 12 RVA: 0x00002334 File Offset: 0x00000534 public void OnStopBegin() { NspiServer.ShuttingDown(); RfriServer.ShuttingDown(); }