Errores con Windows Communication Foundation (WCF)

Publicado el 21.05.2023 a las 21:12

Logo de fjmduran

Errores con Windows Communication Foundation (WCF)

  1. 驴Qu茅 es WCF?

  2. Error; Could not find a base address that matches scheme https for the endpoint with binding WebHttpBinding. Registered base address schemes are [http]

  3. Error; No se pudo recuperar el generador de clases COM para el componente con CLSID {A9E69610-B80D-11D0-B9B9-00A0C922E750} debido al siguiente error: 80040154 Clase no registrada (Excepci贸n de HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

    • Revisa que tengas activadas todas las caracter铆sticas WCF de tu Windows

Errores con Windows Communication Foundation (WCF)

驴Qu茅 es WCF?

WCF (Windows Communication Foundation) es un framework de comunicaci贸n desarrollado por Microsoft para la creaci贸n de servicios web.


WCF permite la creaci贸n de servicios que se pueden consumir a trav茅s de diferentes protocolos de comunicaci贸n como HTTP, TCP, MSMQ, etc.

Adem谩s, WCF ofrece una gran flexibilidad en cuanto a la configuraci贸n y personalizaci贸n de los servicios, lo que lo hace ideal para aplicaciones empresariales complejas.


WCF se ha utilizado ampliamente en el desarrollo de aplicaciones empresariales y sistemas distribuidos en la plataforma .NET de Microsoft.

Error; Could not find a base address that matches scheme https for the endpoint with binding WebHttpBinding. Registered base address schemes are [http]

Despu茅s de dar muchas vueltas, el problema era que no estaba bien configurado el web.config, te dejo uno que funciona correctamente 馃憞

  <?xml version="1.0" encoding="utf-8"?>
  <configuration>
  
    <appSettings>
      <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
    </appSettings>
  
    <system.web>
      <compilation debug="true" targetFramework="4.6" />
      <httpRuntime targetFramework="4.6" />
    </system.web>
  
    <system.serviceModel>
      <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
  
      <bindings>
        <webHttpBinding>
          <binding name="Binding" crossDomainScriptAccessEnabled="true">
            <security mode="Transport">
              <transport clientCredentialType="None" />
            </security>
          </binding>
          <binding name="httpbind" crossDomainScriptAccessEnabled="true">
          </binding>
        </webHttpBinding>
      </bindings>
  
      <services>
        <service name="Proyect_name.file_with_extension_svc" behaviorConfiguration="ServiceBehaviour">
          <endpoint address="" binding="webHttpBinding" bindingConfiguration="httpbind" contract="Proyect_name.file_with_extension_cs" behaviorConfiguration="web"/>
        </service>
      </services>
  
      <behaviors>
        <serviceBehaviors>
          <behavior name="ServiceBehaviour">
            <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
            <serviceDebug includeExceptionDetailInFaults="true" />
          </behavior>
          <behavior name="web">
            <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
            <serviceDebug includeExceptionDetailInFaults="true" />
          </behavior>
        </serviceBehaviors>
        <endpointBehaviors>
          <behavior name="web">
            <webHttp helpEnabled="true" />
          </behavior>
        </endpointBehaviors>
      </behaviors>
    </system.serviceModel>
  
    <system.webServer>
      <modules runAllManagedModulesForAllRequests="true" />
      <!--
      Para examinar el directorio ra铆z de la aplicaci贸n web durante la depuraci贸n, establezca el valor siguiente en true.
          Establ茅zcalo en false antes de la implementaci贸n para evitar revelar informaci贸n sobre la carpeta de aplicaci贸n web.
          -->
      <directoryBrowse enabled="true" />
    </system.webServer>
    
    <runtime>
  
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  
        <dependentAssembly>
  
          <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
  
          <bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
  
        </dependentAssembly>
  
      </assemblyBinding>
  
    </runtime>
  
    <connectionStrings>
      <add name="ConnectionString" connectionString="Data Source=MYPCSQLEXPRESS;User ID=user;Password=pwd" providerName="System.Data.SqlClient" />
    </connectionStrings>
  
  </configuration>

Error; No se pudo recuperar el generador de clases COM para el componente con CLSID {A9E69610-B80D-11D0-B9B9-00A0C922E750} debido al siguiente error: 80040154 Clase no registrada (Excepci贸n de HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

Revisa que tengas activadas todas las caracter铆sticas WCF de tu Windows

Al resecatar antiguos proyectos de WCF, me ha pasado que me daba este error y la soluci贸n no era registrar las bibliotecas ADO, si no activar los complementos de WCF.


En agregar/quitar programas revisa 馃憞

Agregar o quitar programas de Windows 10

Hasta luego 馃枛