Skip to content

Instantly share code, notes, and snippets.

@RoyiNamir
Last active July 4, 2018 13:15
Show Gist options
  • Save RoyiNamir/284ed2ebdf6ebf745d803e4200f40364 to your computer and use it in GitHub Desktop.
Save RoyiNamir/284ed2ebdf6ebf745d803e4200f40364 to your computer and use it in GitHub Desktop.
web.config
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5.2" />
<httpRuntime targetFramework="4.5.2"/>
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceCredentialsBehavior">
<serviceMetadata httpGetEnabled="true" httpGetUrl="http://ds.com/Service1.svc" />
<serviceCredentials>
<serviceCertificate findValue="9394f570069e7af263ef7ca5a46a5bcab9f68659"
storeLocation="LocalMachine" storeName="Root"
x509FindType="FindByThumbprint" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="ServiceCredentialsBehavior" name="WcfService1WAS.HelloWorldService">
<endpoint address="HelloWorldService/"
binding="wsHttpBinding"
bindingConfiguration="WSHttpBinding_ICalculator"
name="SecuredByClientCertificate"
contract="WcfService1WAS.IHelloWorldService" >
</endpoint>
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_ICalculator">
<security mode="Message">
<message clientCredentialType="Certificate" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client />
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="false" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<!--
To browse web app root directory during debugging, set the value below to true.
Set to false before deployment to avoid disclosing web app folder information.
-->
<directoryBrowse enabled="true"/>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment