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

Asked

Viewed 965 times

2

Well, this error is happening, after I did the procedure to access the 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

inserir a descrição da imagem aqui

WEB.CONFIG

 <system.serviceModel>
    <behaviors>
      <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>
    <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);

 }
  • 2

    I don’t understand, you hosted the service on a remote IIS, but you want to access it as Localhost???

  • No, I have the solution in my machine she is with IIS EXPRESS and so I want to do remote access from another PC

2 answers

1

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

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

1


From what I understand, you’re wearing HTTPS in webconfig’s Binding, and is calling via http by the client, in addition, even if you are using https in the client, IIS localhost (development) usually does not have the digital certificate for SSL communication (https), do a test by changing the webconfig’s Binding to HTTP.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.