Estou tentando consumir um serviço porém da o erro:
An unhandled exception of type 'System.InvalidOperationException' occurred in System.ServiceModel.dll
E a mensagem:
"Não foi possível localizar o elemento de ponto de extremidade padrão que referencia o contrato 'ServicoEmpresa.IEmpresaServicoRemoto' na seção de configuração do ServiceModel cliente. Isso pode ter ocorrido devido à falta de um arquivo de configuração para o seu aplicativo ou porque nenhum elemento de ponto de extremidade correspondendo a este contrato pôde ser encontrado no elemento cliente."
Isso e problema no app.config?
Arquivo cliente
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="wsHttpBinding_IEmpresaServicoRemoto" />
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:8733/Design_Time_Addresses/PontoCerto.ServicoRemoto/EmpresaServicoRemoto/"
binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_IEmpresaServicoRemoto"
contract="PontoCerto.ServicoRemoto.Contratos.IEmpresaServicoRemoto" name="BasicHttpBinding_IEmpresaServicoRemoto" />
</client>
<behaviors>
</behaviors>
</system.serviceModel>
</configuration>"
Arquivo do serviço:
>`<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
</appSettings>
<system.web>
<compilation debug="true" />
<membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers>
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
</providers>
</membership>
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
<providers>
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
</providers>
</roleManager>
</system.web>
<!-- When deploying the service library project, the content of the config file must be added to the host's
app.config file. System.Configuration does not support config files for libraries. -->
<system.serviceModel>
<extensions>
<behaviorExtensions>
<add name="CustomMessage" type="PontoCerto.ServicoRemoto.Infraestrutura.CustomBehaviorExtensionElement, PontoCerto.ServicoRemoto,
 Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</behaviorExtensions>
</extensions>
<services>
<service name="PontoCerto.ServicoRemoto.Servico.Service1">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8733/Design_Time_Addresses/PontoCerto.ServicoRemoto/Service1/" />
</baseAddresses>
</host>
<!-- Service Endpoints -->
<!-- Unless fully qualified, address is relative to base address supplied above -->
<endpoint address="" binding="basicHttpBinding" contract="PontoCerto.ServicoRemoto.Contratos.IService1">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<!-- Metadata Endpoints -->
<!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. -->
<!-- This endpoint does not use a secure binding and should be secured or removed before deployment -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
<service name="PontoCerto.ServicoRemoto.Servicos.EmpresaServicoRemoto">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8733/Design_Time_Addresses/PontoCerto.ServicoRemoto/EmpresaServicoRemoto/" />
</baseAddresses>
</host>
<!-- Service Endpoints -->
<!-- Unless fully qualified, address is relative to base address supplied above -->
<endpoint address="" binding="wsHttpBinding"
contract="PontoCerto.ServicoRemoto.Contratos.IEmpresaServicoRemoto"
behaviorConfiguration="ClientEndpointBehavior">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<!-- Metadata Endpoints -->
<!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. -->
<!-- This endpoint does not use a secure binding and should be secured or removed before deployment -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="ClientEndpointBehavior">
<CustomMessage />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information,
set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="True" httpsGetEnabled="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>
</system.serviceModel>
</configuration>