I’ve picked up a project that I’ve not touched in months I used the project to learn WCF, when I run it in Visual studio it opens up a page that allows me to get the generated WSDL, and I can hit the code of the service.
But when I look at the Web.config there is next to no information there:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
No service endpoint or anything, and yet it runs fine (In Visual Studio at least), how is this working?
One of the sore points of WCF 3.x is that it was very heavy to configure, and getting it right was hard, even for the most trivial of services. WCF 4 introduced a “Simplified Configuration” feature whereby pretty much zero configuration is required at the cost of flexibility. You can still use all the configuration you want, it’s just optional at this point.
More of the details are on MSDN blogs: