私はシンプルなウェブサービスを作成しました。 そして、私はこれが私のconfigですwcf httpsサイトが表示されないのはなぜですか
.. HTTPSのURLを経由してサービスをホストする必要がありConsoleホストを作成しました:私は
static void Main(string[] args)
{
ServiceHost host = new ServiceHost(typeof(NuriService));
host.Open();
foreach (Uri address in host.BaseAddresses)
{
Console.WriteLine("Listening on " + address);
}
Console.WriteLine("Press <Enter> to terminate Host.\n\n");
Console.ReadLine();
host.Close();
}
:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service behaviorConfiguration="mexBehaviour" name="NuriServiceLibrary.NuriService">
<clear />
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttpBindingConfig"
contract="NuriServiceLibrary.iNuriService" listenUriMode="Explicit" />
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="https://192.168.....:8001/SecureConsole" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="mexBehaviour">
<serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="basicHttpBindingConfig">
<security mode="Transport">
<transport clientCredentialType="None" />
</security>
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
、これが私のProgram.csのです証明書を作成しました: 1. makecert.exe -sr LocalMachine -ss My -n CN = 192.168 ..... -sky exchange -sk -pe 2. netsh http sslcert ipport = 192.168 ....を追加します。 8001 certhash =(意図的に残した)appid = {(意図的に残した)}
問題は、私のhttpsウェブページが表示されません...このウェブサイトが利用できないことがわかります。 誰もが知っていますか?
を検討する必要がある、あなたのサービスをホストし、そしてクライアントとしてWebブラウザを使用することですか? –
なし、ポート:9000でipを追加しましたが、ウェブサイトにも表示されません。 – skyyyy
ポート9000でIPアドレスを「*追加」しましたか?また、「* website *」と言うと、WCFのヘルプページですか? –