Пример #1
0
        /// <summary>
        /// Stops tags webservice
        /// </summary>
        public void Stop()
        {
            try
            {
                if (isStarted)
                {
                    log.Info("Stoping WebService...");

                    if (prcWebServer != null)
                    {
                        prcWebServer.Kill();
                    }

                    if (webAppServer != null)
                    {
                        webAppServer.Stop();
                        webAppServer.UnloadAll();
                    }

                    log.Info("WebService stopped.");
                }
            }
            catch (Exception e)
            {
                log.Error("It was not possible to stop the WebService from: " + this.ServerAddress + ":" + this.ServerPort);
                log.Error(e.Message);
                throw new Exception("Could not stop webservice: " + e.Message);
            }
        }