私はこの問題に関する多くの異なる質問と回答を見てきましたが、適切な解決策を見つけることはできません。私はコードを介して接続しているWebサービスを持っています。 Webサービスが起動し、開発マシン上で実行されています。私はIIS 7を実行しています。httpとhttpsの両方のアドレスでIE経由でサービスに接続できます。コードから私はhttpにアクセスすることができますが、https経由でアクセスしようとしているときにエンドポイントが聞こえない404エラーが発生します。これはシンプルなようですが、明らかに何かが欠けています。WCF設定をhttpsで利用できない
web.configファイルがどのように見えるSERVER: (のみ相対部分)どんなに私はこの仕事をするために右の設定を見つけることができないよう試みているものを
<system.serviceModel>
<diagnostics>
<messageLogging logEntireMessage="true" logMessagesAtServiceLevel="true"
logMessagesAtTransportLevel="true" />
<endToEndTracing activityTracing="true" />
</diagnostics>
<services>
<service behaviorConfiguration="behaviorAction" name="CI.PCI.ServiceImplementations.SPPService">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="HostBinding"
contract="CI.PCI.ServiceContracts.ISPPService" listenUri="https://cisppdev.children.org/sppservices/sppservices.svc" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="behaviorAction">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="SafenetTokenServiceSoap11Binding" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:30:00" sendTimeout="00:30:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="327680" maxBufferPoolSize="524288" maxReceivedMessageSize="327680"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="Transport">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
<binding name="HostBinding" receiveTimeout="00:30:00" sendTimeout="00:30:00"
bypassProxyOnLocal="true" maxBufferSize="327680" maxReceivedMessageSize="327680">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="Transport" />
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
From the client code I am dynamically creating a connection which basically goes like this:
BasicHttpBinding binding = new BasicHttpBinding();
url = Settings1.Default.DevURL; -- (https://cisppdev.children.org/sppservices/sppservices.svc)
binding.Security.Mode = BasicHttpSecurityMode.Transport;
EndpointAddress ep = new EndpointAddress(url);
binding.OpenTimeout = new TimeSpan(0, 10, 0);
binding.CloseTimeout = new TimeSpan(0, 10, 0);
binding.ReceiveTimeout = new TimeSpan(0, 15, 0);
binding.SendTimeout = new TimeSpan(0, 15, 0);
binding.MaxBufferSize = 327680;
binding.MaxReceivedMessageSize = 327680;
binding.MaxBufferPoolSize = 524288;
binding.TransferMode = TransferMode.Buffered;
ChannelFactory<ServiceContracts.ISPPService> factory = new ChannelFactory<ServiceContracts.ISPPService>(binding, ep);
factory.Open();
ServiceContracts.ISPPService channel = factory.CreateChannel();
。私は証明書を持っていない、私はちょうどhttpではなくhttpsサービスを呼び出すしたい。どんな助けもありがとう!
おかげ