タグ付けされた質問 「httplistener」

10
HttpListenerアクセス​​が拒否されました
HTTPサーバーをC#で作成しています。 関数HttpListener.Start()を実行しようとするHttpListenerExceptionと、格言が出ます "アクセスが拒否されました"。 Windows 7で管理モードでアプリを実行すると、正常に動作します。 管理モードなしで実行できますか?はいの場合はどうですか?そうでない場合、実行を開始した後にアプリを管理モードに変更するにはどうすればよいですか? using System; using System.Net; namespace ConsoleApplication1 { class Program { private HttpListener httpListener = null; static void Main(string[] args) { Program p = new Program(); p.Server(); } public void Server() { this.httpListener = new HttpListener(); if (httpListener.IsListening) throw new InvalidOperationException("Server is currently running."); httpListener.Prefixes.Clear(); …
弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.