When I add a service reference to a WCF web service in my current ASP.net MVC 3 project, proxy classes are successfully generated, but there's no information added to web.config. This results in an error when I attempt to instantiate the proxy class using the no-args constructor. On this line:
var proxy = new ReportingService.ApiServiceClient();
I get the following runtime exception:
Could not find default endpoint element that references contract
'ReportingService.IApiService' in the ServiceModel client configuration
section. This might be because no configuration file was found for your
application, or because no endpoint element matching this contract could
be found in the client element.
This makes sense because there's absolutely nothing in my config file indicating the default endpoint.
What am I missing? Why would adding the service reference fail to create a default endpoint?