WCF ERROR: Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata

2

Well, this error is happening, after I did the procedure to access IIS remotely.

   Error: 

   Cannot obtain Metadata from http://localhost:xxxx/Service.svc. 
   If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address.
   For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata 

   Exchange Error    
   URI: http://localhost:xxxx/Service.svc    O metadados cont‚m uma referˆncia que nÆo pode ser resolvida: 
   'http://localhost:xxxx/Service.svc'.    
   Não havia um ponto de extremidade em escuta em http://localhost:xxxx/Service.svc capaz de aceitar a mensagem. 
   Em geral, isso ‚ causado por um endere‡o ou a‡Æo de SOAP incorreta. Consulte InnerException, se presente, para obter mais detalhes.    
   Imposs¡vel conectar-se ao servidor remoto    
   Nenhuma conexão pode ser feita porque a maquina de destino as recusou ativamente 127.0.0.1:64969

   HTTP GET Error    
   URI: http://localhost:xxxx/Service.svc    
   Erro ao baixar 'http://localhost:xxxx/Service.svc'.    
   Imposs¡vel conectar-se ao servidor remoto    
   Nenhuma conexÆo p“de ser feita porque a maquina de destino as recusou ativamente 127.0.0.1:64969

WEB.CONFIG

<system.serviceModel><behaviors><serviceBehaviors><behavior><!--Toavoiddisclosingmetadatainformation,setthevaluesbelowtofalsebeforedeployment--><serviceMetadatahttpGetEnabled="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>
    <protocolMapping>
      <add binding="basicHttpsBinding" scheme="https"/>
    </protocolMapping>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
  </system.serviceModel>

INTERFACE

  [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")]
  [ServiceContract]
  public interface IServiceConfFisica

 {

[OperationContract]
[System.ServiceModel.XmlSerializerFormatAttribute()]
executeResponse executeJUP(executeRequest jup);

 }
    
asked by anonymous 01.06.2018 / 15:39

2 answers

1

As I understand it, you are using HTTPS in webconfig binding, and you are calling via http through the client, and even though you are using https on the client, IIS localhost do not have the digital certificate for SSL (https) communication, do a test by changing webconfig binding to HTTP .

    
10.06.2018 / 20:16
1

What is the name of the .svc file? ServiceConfFisica.svc ?

You're trying to open http://localhost:xxxxx/Service.svc !

    
01.06.2018 / 17:29