I followed the same steps as in the MSDN link to add a Certificate.
Then I just changed binding to https like
binding="mexHttpsBinding"
and added Transport security binding under
wshttpBinding
.
That's all I did. And its running.
The problems in your config are....
endpoint address="https://localhost/samplewcf/Service.svc"
httpsGetUrl="https://localhost/samplewcf/Service1.svc"
These names are varying, one is
Service.svc
and other is
Service1.svc
.
Write the correct one in both the cases.
And use Relative address here, not the absolute Url, as I suggested you before in the previous question.
So, they should look like below if the web.config and Service are in the same folder.
endpoint address="Service1.svc"
httpsGetUrl="Service1.svc"
So, don't be in a hurry and do it carefully. Let me know it solved or not.
[Update]
Config file is like below, underlined items need to verified and changed according to your project.
="1.0"
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<services>
<service name="Ntitish_WcfService.Service1" behaviorConfiguration="Ntitish_WcfService.Service1Behavior">
<endpoint address="service.svc" binding="wsHttpBinding" contract="Ntitish_WcfService.IService" bindingConfiguration="TransportSecurity"/>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="Ntitish_WcfService.Service1Behavior">
<serviceMetadata httpsGetEnabled="true" httpsGetUrl="Service.svc"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<wsHttpBinding>
<binding name="TransportSecurity">
<security mode="Transport">
<transport clientCredentialType="None"></transport>
</security>
</binding>
</wsHttpBinding>
</bindings>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>