2
デバッグ用のコンソールホストを持つc#REST Webサービスがあります。 Iこのサービスに認証モードを追加する必要があり、私のコンソールのホスト・コードは次のようになります。WCF RESTサービスコンソールホスト
<system.web><authentication mode="Windows"/></system.web>
どのように認証を追加することができます。
WebServiceHost host = new WebServiceHost(typeof(WebService,new Uri[] { new(http://localhost:8000/")});
WebHttpBinding binding = new WebHttpBinding();
host.AddServiceEndPoint(typeof(WebService, binding, "");
host.Open();
Console.WriteLine("Testing Webservice through console. Press Enter to quit.");
Console.ReadLine();
host.Close(System.TimeSpan.Zero);
web.configファイルで認証がで追加することができます私のコンソールホストにモード?
どのフレームワークバージョンですか? .NET 3.5 OR 4.0または別のもの? – VoodooChild
これはWCFのASP.NET Webサービス(ASMX)ではありません。 –
運がありましたか? –