I just created a new WCF Service Application application project in VS2010 (Premium) and it works out of the box, but when I opened the web.config file, there are no endpoints. The application works fine, and I can open the address (http: // localhost: 50639 / Service1.svc? Wsdl) in the browser, and I see the contract, and everything looks fine.
So my question is, does the project use a different approach by default rather than posting information in web.config? I also do not see anything in the code.
To show your point, this is all that the web.config file contains:
<?xml version="1.0"?> <configuration> <system.web> <compilation debug="true" targetFramework="4.0" /> </system.web> <system.serviceModel> <behaviors> <serviceBehaviors> <behavior> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> </system.serviceModel> <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> </configuration>
And yet this service works, and I can connect and call the default methods (e.g. GetData ())
c # wcf
Thomas
source share