2
我開發一個HTTP偵聽器來訪問遠程過程。示例代碼片段:HTTPS偵聽器.NET未能在端口443
HttpListener listener = new HttpListener();
listener.Prefixes.Add("https://*:443/");
listener.Start();
Console.WriteLine("Listening...");
for (; ;)
{
HttpListenerContext ctx = listener.GetContext();
new Thread(new Worker(ctx).ProcessRequest).Start();
}
這是正常工作如果我使用端口8080,但未能在端口443上唯一的例外是
System.Net.HttpListenerException was unhandled
Message=The process cannot access the file because it is being used by another process
請在未來縮進代碼。這會讓其他人更容易閱讀你的代碼。 – tr9sh 2012-02-21 16:41:42