リモートプロセスにアクセスするためにhttpリスナーを開発しています。例のコードスニペット:HTTPリスナー.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を使用する場合は期待どおりに動作しますが、例外が
System.Net.HttpListenerException was unhandled
Message=The process cannot access the file because it is being used by another process
今後コードをインデントしてください。そうすれば、他の人があなたのコードを読みやすくなります。 – tr9sh