我已经创建了一个简单的web服务。 然后我创建了一个控制台主机必须通过HTTPS URL托管服务..wcf为什么我看不到我的https网站
这是我的配置:
<?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:
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();
}
我通过以下方式创建了证书: 1. makecert.exe -sr LocalMachine -ss My -n CN = 192.168 ..... -sky exchange -sk -pe 2. netsh http add sslcert ipport = 192.168 ....: 8001 certhash =(故意离开)appid = {(故意离开)}
但问题是,我看不到我的https网页...我看到这个网站不可用.. 任何人有想法?
? – 2012-03-13 12:49:48
没有,我添加了端口:9000的IP,但后来网站wouldnt也显示.. – skyyyy 2012-03-13 12:53:04
你在哪里“*添加*”与端口9000的IP地址?另外,当你说“*网站*”时,你的意思是WCF帮助页面? – 2012-03-13 12:57:40