Konnte nicht finden, eine Basisadresse entspricht Schema http für den Endpunkt mit BasicHttpBinding Bindung

Bin ich immer diese Meldung wenn ich Versuch auf mein service:

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

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidOperationException: Could not find a base address that matches scheme http for the endpoint with binding BasicHttpBinding. Registered base address schemes are [https].

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 

[InvalidOperationException: Could not find a base address that matches scheme http for the endpoint with binding BasicHttpBinding. Registered base address schemes are [https].]
   System.ServiceModel.ServiceHostBase.MakeAbsoluteUri(Uri relativeOrAbsoluteUri, Binding binding, UriSchemeKeyedCollection baseAddresses) +17430541
   System.ServiceModel.Description.ConfigLoader.LoadServiceDescription(ServiceHostBase host, ServiceDescription description, ServiceElement serviceElement, Action`1 addBaseAddress, Boolean skipHost) +1097
   System.ServiceModel.ServiceHostBase.LoadConfigurationSectionInternal(ConfigLoader configLoader, ServiceDescription description, ServiceElement serviceSection) +89
   System.ServiceModel.ServiceHost.ApplyConfiguration() +162
   System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection baseAddresses) +207
   System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses) +475
   System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses) +43
   System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +578
   System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +1451
   System.ServiceModel.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity) +76
   System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +901

[ServiceActivationException: The service '/fileservice/fileservice.svc' cannot be activated due to an exception during compilation.  The exception message is: Could not find a base address that matches scheme http for the endpoint with binding BasicHttpBinding. Registered base address schemes are [https]..]
   System.Runtime.AsyncResult.End(IAsyncResult result) +654324
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +210877
   System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +282

Bin ich über eine config-fast identisch zu einem anderen service, den ich schrieb auf der gleichen url verschiedene Ordner und ich habe keine Probleme.

Dies ist mein web.config:

 <?xml version="1.0" encoding="utf-8"?>
<configuration>

  <system.web>
    <compilation targetFramework="4.0" debug="true">
      <assemblies>
        <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      </assemblies>
    </compilation>
    <caching>
      <outputCacheSettings>
        <outputCacheProfiles>
          <add name="DefaultCache" duration="60" varyByParam="none" />
        </outputCacheProfiles>
      </outputCacheSettings>
    </caching>
  </system.web>

  <system.serviceModel>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" />
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpEndpointBinding">
          <security mode="None">
            <!-- Basic <security mode="Transport"> -->
            <!-- To use Basic auth, just comment Windows and use this, but you need to configure basic in IIS as well -->
            <!-- <transport clientCredentialType="Basic" /> -->
            <transport clientCredentialType="None" />
          </security>
        </binding>
      </basicHttpBinding>
      <webHttpBinding>
        <binding name="default">
          <security mode="None">
            <!-- Basic <security mode="Transport"> -->
            <!-- To use Basic auth, just comment Windows and use this -->
            <!-- <transport clientCredentialType="Basic" /> -->
            <transport clientCredentialType="None" />
          </security>
        </binding>
      </webHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="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>
      <endpointBehaviors>
        <behavior name="restBehavior">
          <webHttp />
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <services>
      <service name="FileStorageService.FileService">
        <endpoint binding="basicHttpBinding" bindingConfiguration="BasicHttpEndpointBinding" contract="FileStorageService.IFileService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="rest" binding="webHttpBinding" bindingConfiguration="default" behaviorConfiguration="restBehavior" contract="FileStorageService.IFileService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
      </service>
    </services>
  </system.serviceModel>

  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
  </system.webServer>

</configuration>

Das einzige, was ich geändert habe war die namespace-und service-Namen. Der namespace für diesen service ist FileStorageService mit der service-name wird FileService.

Ich hab wirklich nichts auf dem server, wie Sie im code sehen:

using System.ServiceModel;

namespace FileStorageService
{
  //NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IFileService" in both code and config file together.
  [ServiceContract]
  public interface IFileService
  {
    [OperationContract]
    void DoWork();
  }
}

namespace FileStorageService
{
  //NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "FileService" in code, svc and config file together.
  public class FileService : IFileService
  {
    public void DoWork()
    {
    }
  }
}

Es ist die grundlegende Informationen, wenn Sie einen neuen Dienst erstellt. Es ist die Veröffentlichung einer SSL-domain, so dass es erfordert https.

Alles, was ich bin versucht zu tun ist, Holen Sie es veröffentlicht, damit ich weiß, es funktioniert, so kann ich bewegen.

Kann jemand sehen, was ich falsch mache?

  • haben Sie versucht Jon Barker Lösung ?
InformationsquelleAutor ErocM | 2014-02-10
Schreibe einen Kommentar