System.Net.HttpListener.Start C# (CSharp) Method

Start() public method

public Start ( ) : void
return void
        public void Start()
        {
            throw new PlatformNotSupportedException();
        }

Usage Example

Esempio n. 1
0
 public ApiManager()
 {
     string hostName = Dns.GetHostName();
     string IP = Dns.GetHostByName(hostName).AddressList[0].ToString();
     string DebugPort = ConfigurationManager.AppSettings["DebugPort"];
     m_vListener = new HttpListener();
     if (Convert.ToBoolean(ConfigurationManager.AppSettings["DebugModeLocal"]))
     {
         m_vListener.Prefixes.Add("http://localhost:" + DebugPort + "/debug/");
         //m_vListener.AuthenticationSchemes = AuthenticationSchemes.Anonymous;
         m_vListener.Start();
         Console.WriteLine("API Manager started on http://localhost:" + DebugPort + "/debug/");
         Action action = RunServer;
         action.BeginInvoke(RunServerCallback, action);
     }
     else
     {
         string DebugMode = IP + ":";
         m_vListener.Prefixes.Add("http://" + DebugMode + DebugPort + "/debug/");
         //m_vListener.AuthenticationSchemes = AuthenticationSchemes.Anonymous;
         m_vListener.Start();
         Console.WriteLine("API Manager started on http://" + IP + ":" + DebugPort + "/debug/");
         Action action = RunServer;
         action.BeginInvoke(RunServerCallback, action);
     }
 }
All Usage Examples Of System.Net.HttpListener::Start