Skip to content

Instantly share code, notes, and snippets.

@jpda
Last active January 6, 2016 22:04
Show Gist options
  • Select an option

  • Save jpda/c47b3cd8d5cec550bbd0 to your computer and use it in GitHub Desktop.

Select an option

Save jpda/c47b3cd8d5cec550bbd0 to your computer and use it in GitHub Desktop.
WCF Web Host debug web.config
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5"/>
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- don't expose metadata in production -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
<bearerTokenRequired/>
</behavior>
</serviceBehaviors>
</behaviors>
<extensions>
<behaviorExtensions>
<!-- The ServiceBehavior is added here -->
<add name="bearerTokenRequired" type="AuthenticatedService.Inspector.BearerTokenExtensionElement, AuthenticatedService.Inspector"/>
</behaviorExtensions>
</extensions>
<protocolMapping>
<!-- note we're only using HTTPS here -->
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<directoryBrowse enabled="true"/>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment