没有协议绑定与WCF服务的给定地址匹配

时间:2013-01-29 10:30:21

标签: asp.net wcf web-services svc

我正在使用IIS6运行一个网站(ASP.Net 4)。我尝试运行svc-service时收到以下错误消息:

  

没有协议绑定与给定地址匹配   'http://www.holtalen.kommune.no/Templates/eDemokrati/Services/eDemokratiService.svc'`。

     

协议绑定在IIS或WAS配置中的站点级别配置。描述:期间发生了未处理的异常   执行当前的Web请求。请查看堆栈跟踪   有关错误及其来源的更多信息   码。   异常详细信息:System.InvalidOperationException:没有协议绑定与给定地址匹配   'http://www.holtalen.kommune.no/Templates/eDemokrati/Services/eDemokratiService.svc'。   协议绑定在IIS或WAS中的站点级别配置   组态。   来源错误:   在执行当前Web请求期间生成了未处理的异常。有关起源和位置的信息   可以使用异常堆栈跟踪来识别异常   下方。

     

堆栈追踪:

     

[InvalidOperationException:没有协议绑定与给定地址匹配   'http://www.holtalen.kommune.no/Templates/eDemokrati/Services/eDemokratiService.svc'。   协议绑定在IIS或WAS中的站点级别配置   组态。]   [ServiceActivationException:没有协议绑定与给定地址匹配   'http://www.holtalen.kommune.no/Templates/eDemokrati/Services/eDemokratiService.svc'。   协议绑定在IIS或WAS中的站点级别配置   组态。]   System.Runtime.AsyncResult.End(IAsyncResult result)+679246   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult的   结果)+190              System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication的   context,String routeServiceVirtualPath,Boolean flowContext,Boolean   ensureWFService)+234   System.ServiceModel.Activation.HttpModule.ProcessRequest(对象   发件人,EventArgs e)+355              System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()   +148   System.Web.HttpApplication.ExecuteStep(IExecutionStep step,Boolean& completedSynchronously

我已将扩展名.svc添加为该网站的应用程序映射。

Web.config的部分内容:

<system.serviceModel>
    <extensions>
      <bindingElementExtensions>
        <add name="udpTransport" type="Microsoft.ServiceModel.Samples.UdpTransportElement, EPiServer.Events" />
      </bindingElementExtensions>
    </extensions>
    <services>
      <!-- Before deployment, you should remove the returnFaults behavior configuration to avoid disclosing information in exception messages -->
      <service name="EPiServer.Events.Remote.EventReplication" behaviorConfiguration="DebugServiceBehaviour">
        <endpoint name="RemoteEventServiceEndPoint" contract="EPiServer.Events.ServiceModel.IEventReplication" binding="customBinding" bindingConfiguration="RemoteEventsBinding" address="soap.udp://239.255.255.19:5000/RemoteEventService" />
        <!-- Uncomment this endpoint and the "RemoteEventServiceClientEndPoint" to enable remote events
            <endpoint name="RemoteEventServiceEndPoint"
                    contract="EPiServer.Events.ServiceModel.IEventReplication"
                    binding="customBinding"
                    bindingConfiguration="RemoteEventsBinding"
                    address="soap.udp://239.255.255.19:5000/RemoteEventService" />-->
      </service>

        <service name="SSP.eDemokrati.Templates.Services.eDemokratiService"  >
                <!-- Add the following endpoint.  -->
                <!-- Note: your service must have an http base address to add this endpoint. -->
                <endpoint contract="SSP.eDemokrati.Templates.Services.eDemokratiService" binding="webHttpBinding"  />
                <host>
     <baseAddresses>
     <add baseAddress="http://www.holtalen.kommune.no/" />
      <!--<add baseAddress="http://172.28.160.23:80/" />
     --> 

     </baseAddresses>
    </host>
       </service>



      <!-- In order to get fault information from the server for debug purposes, add behaviorConfiguration="DebugServiceBehaviour" to the endpoint "RemoteEventServiceEndPoint" -->
    </services>


    <client>
      <endpoint name="RemoteEventServiceClientEndPoint" address="soap.udp://239.255.255.19:5000/RemoteEventService" binding="customBinding" bindingConfiguration="RemoteEventsBinding" contract="EPiServer.Events.ServiceModel.IEventReplication" />
      <!-- Uncomment this endpoint and the "RemoteEventServiceEndPoint" to enable remote events
        <endpoint name="RemoteEventServiceClientEndPoint"
           address="soap.udp://239.255.255.19:5000/RemoteEventService"
           binding="customBinding"
           bindingConfiguration="RemoteEventsBinding"
           contract="EPiServer.Events.ServiceModel.IEventReplication" />-->

    </client>
    <behaviors>
      <serviceBehaviors>
        <behavior name="DebugServiceBehaviour">
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <customBinding>
        <binding name="RemoteEventsBinding">
          <binaryMessageEncoding />
          <udpTransport multicast="True" />
        </binding>
      </customBinding>
   </bindings>

        <serviceHostingEnvironment multipleSiteBindingsEnabled="false">
   <serviceActivations>
    <add relativeAddress="Templates/eDemokrati/services/eDemokratiService.svc" service="SSP.eDemokrati.Templates.Services.eDemokratiService" />
   </serviceActivations>
  </serviceHostingEnvironment>

  </system.serviceModel>

我应该向IIS添加哪些配置才能使其正常工作?

0 个答案:

没有答案