0

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

没有协议绑定与给定地址“ 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 result) +190 System.ServiceModel.Activation.HostedHttpRequestAsyncResult .ExecuteSynchronous(HttpApplication context, String routeServiceVirtualPath, Boolean flowContext, Boolean ensureWFService) +234 System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, 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 添加什么配置才能使其正常工作?

4

0 回答 0