Exemplo n.º 1
0
        /// <summary>
        /// Initialise the service to listen for reports.
        /// </summary>
        public WebHandler()
        {
            try
            {
                FileReceiptPath = Properties.Settings.Default.CrashReportRepository + "-Temp";

                LandingZone = new LandingZoneMonitor(
                    Properties.Settings.Default.CrashReportRepository,
                    CrashReporterReceiverServicer.Log
                    );

                Directory.CreateDirectory(FileReceiptPath);

                // Fire up a listener.
                ServiceHttpListener = new HttpListener();
                ServiceHttpListener.Prefixes.Add("http://*:57005/CrashReporter/");
                ServiceHttpListener.Start();
                ServiceHttpListener.BeginGetContext(AsyncHandleHttpRequest, null);

                bStartedSuccessfully = true;
            }
            catch (Exception Ex)
            {
                CrashReporterReceiverServicer.WriteEvent("Initialisation error: " + Ex.ToString());
            }
        }
Exemplo n.º 2
0
		/// <summary>
		/// Initialise the service to listen for reports.
		/// </summary>
		public WebHandler()
		{
			try
			{
				FileReceiptPath = Properties.Settings.Default.CrashReportRepository + "-Temp";

				LandingZone = new LandingZoneMonitor(
					Properties.Settings.Default.CrashReportRepository,
					CrashReporterReceiverServicer.Log
				);

				Directory.CreateDirectory( FileReceiptPath );			

				// Fire up a listener.
				ServiceHttpListener = new HttpListener();
				ServiceHttpListener.Prefixes.Add( "http://*:57005/CrashReporter/" );
				ServiceHttpListener.Start();
				ServiceHttpListener.BeginGetContext( AsyncHandleHttpRequest, null );

				bStartedSuccessfully = true;
			}
			catch( Exception Ex )
			{
				CrashReporterReceiverServicer.WriteEvent( "Initialisation error: " + Ex.ToString() );
			}
		}