WCF WAS MSMQ:异常服务器找不到端点 [英] WCF WAS MSMQ: Exception Server cannot find endpoints

查看:105
本文介绍了WCF WAS MSMQ:异常服务器找不到端点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最初,我们在单个Windows 2008 Windows服务中托管了2个MSMQ服务. WCF服务运行良好.

Originally we hosted 2 MSMQ services in a single Windows 2008 Windows Service.  The WCF services ran fine.

我们要将其移至WAS.

We want to move this to WAS.

该网站称为FallbackService

The site is called FallbackService

该应用程序称为FallbackService

The app is called FallbackService

虚拟目录称为FallbackService

The virtual directory is called FallbackService

应用程序池称为FallbackService

The application pool is called FallbackService

net.msmq绑定和协议

net.msmq binding and protocols are enabled for site and application

MSMQ侦听器适配器服务已激活

MSMQ Listener Adapter Service is activated

队列是私有的和事务性的

Queues are private and transactional

启用了队列安全性访问.

Queues security access is enabled.

队列名称为fallbackservice/fallbackservice.svc    (我也尝试过删除开头的"fallbackservice/")

Queue names are  fallbackservice/fallbackservice.svc    (I have also tried by removing the leading "fallbackservice/")

合同

   [ServiceContract(Namespace ="http://chameleon/fallback")]
   公共接口IFallbackService
    {
       [OperationContract(IsOneWay = true)]
       [TransactionFlow(TransactionFlowOption.Allowed)]
       void SerializePageMetaData(int siteID,PageMetaData pageMetaData);

       [OperationContract(IsOneWay = true)]
       [TransactionFlow(TransactionFlowOption.Allowed)]
       void SerializeZoneContent(int siteID,PageRequestData pageRequestData,List< ZoneContentData> zoneContents);

       [OperationContract(IsOneWay = true)]
       [TransactionFlow(TransactionFlowOption.Allowed)]
       void SerializeContent(int siteID,ContentData content);
    }

    [ServiceContract(Namespace = "http://chameleon/fallback")]
    public interface IFallbackService
    {
        [OperationContract(IsOneWay = true)]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        void SerializePageMetaData(int siteID, PageMetaData pageMetaData);

        [OperationContract(IsOneWay = true)]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        void SerializeZoneContent(int siteID, PageRequestData pageRequestData, List<ZoneContentData> zoneContents);

        [OperationContract(IsOneWay = true)]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        void SerializeContent(int siteID, ContentData content);
    }

实施

   [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
    [DeliveryRequirements(QueuedDeliveryRequirements = QueuedDeliveryRequirementsMode.Required)]
   公共类FallbackService:IFallbackService
    {
       [OperationBehavior(TransactionScopeRequired = true)]
      公共无效SerializePageMetaData(int siteID,PageMetaData pageMetaData)
       {
           //抛出新的Exception("Testing Dead Letter Queue");
           FallbackHandler handler =新的FallbackHandler();
           handler.SerializePageMetaData(siteID,pageMetaData);
       }

       [OperationBehavior(TransactionScopeRequired = true)]
      公共无效SerializeZoneContent(int siteID,PageRequestData pageRequest,List< ZoneContentData> zoneContents)
       {
           FallbackHandler handler =新的FallbackHandler();
           handler.SerializeZoneContent(siteID,pageRequest,zoneContents);
       }

       [OperationBehavior(TransactionScopeRequired = true)]
      公共无效SerializeContent(int siteID,ContentData内容)
       {
           FallbackHandler handler =新的FallbackHandler();
           handler.SerializeContent(siteID,content);
       }

    }

    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
    [DeliveryRequirements(QueuedDeliveryRequirements = QueuedDeliveryRequirementsMode.Required)]
    public class FallbackService : IFallbackService
    {
        [OperationBehavior(TransactionScopeRequired = true)]
        public void SerializePageMetaData(int siteID, PageMetaData pageMetaData)
        {
            //throw new Exception("Testing Dead Letter Queue");
            FallbackHandler handler = new FallbackHandler();
            handler.SerializePageMetaData(siteID, pageMetaData);
        }

        [OperationBehavior(TransactionScopeRequired = true)]
        public void SerializeZoneContent(int siteID, PageRequestData pageRequest, List<ZoneContentData> zoneContents)
        {
            FallbackHandler handler = new FallbackHandler();
            handler.SerializeZoneContent(siteID, pageRequest, zoneContents);
        }

        [OperationBehavior(TransactionScopeRequired = true)]
        public void SerializeContent(int siteID, ContentData content)
        {
            FallbackHandler handler = new FallbackHandler();
            handler.SerializeContent(siteID, content);
        }

    }

 

服务器配置

  < system.serviceModel>
    < bindings>
     < netMsmqBinding>
       <!-FallbackService配置->
       < binding name ="netMsmq"
                                    receiveErrorHandling =拒绝"
                                    maxRetryCycles ="2"
                                    receiveRetryCount ="2"
                                    retryCycleDelay ="00:15:00">
         <安全模式=无"/>
       </binding>

       <!-FallbackDLQService配置->
       < binding name ="netMsmqSystem"
                                    deadLetterQueue =系统">
         <安全模式=无"/>
       </binding>
     </netMsmqBinding>
    </bindings>

    <服务>
     <服务名="Fallback.FallbackService". >
       < host>
         < baseAddresses>
           < add baseAddress =" http://localhost:8050/FallbackService" />
         </baseAddresses>
       </host>
       < endpoint
        地址="net.msmq://localhost/private/FallbackService/FallbackService.svc"
         binding ="netMsmqBinding"
         bindingConfiguration ="netMsmq"
         contract ="Fallback.IFallbackService"
        名称="FallbackService"/>
     </service>
     <服务名="Fallback.FallbackDLQService">
       < endpoint
        地址="net.msmq://localhost/private/FallbackService/FallbackDLQService.svc"
         binding ="netMsmqBinding";
         bindingConfiguration ="netMsmqSystem"
         contract ="Fallback.IFallbackService"
        名称="FallbackDLQService" />
     </service>
    </services>
  </system.serviceModel>

  <system.serviceModel>
    <bindings>
      <netMsmqBinding>
        <!-- FallbackService Configuration -->
        <binding name="netMsmq"
                 receiveErrorHandling="Reject"
                 maxRetryCycles="2"
                 receiveRetryCount="2"
                 retryCycleDelay="00:15:00">
          <security mode="None"/>
        </binding>

        <!-- FallbackDLQService Configuration  -->
        <binding name="netMsmqSystem"
                 deadLetterQueue="System">
          <security mode="None"/>
        </binding>
      </netMsmqBinding>
    </bindings>

    <services>
      <service name="Fallback.FallbackService" >
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8050/FallbackService" />
          </baseAddresses>
        </host>
        <endpoint
          address="net.msmq://localhost/private/FallbackService/FallbackService.svc"
          binding="netMsmqBinding"
          bindingConfiguration="netMsmq"
          contract="Fallback.IFallbackService"
          name="FallbackService"/>
      </service>
      <service name="Fallback.FallbackDLQService">
        <endpoint
          address="net.msmq://localhost/private/FallbackService/FallbackDLQService.svc"
          binding="netMsmqBinding"
          bindingConfiguration="netMsmqSystem"
          contract="Fallback.IFallbackService"
          name="FallbackDLQService"  />
      </service>
    </services>
  </system.serviceModel>

 

客户端配置

     <!-FallbackService客户端绑定->
     < netMsmqBinding>
       < binding name ="netMsmq"
         deadLetterQueue =自定义"
         customDeadLetterQueue =" net.msmq://localhost/private/FallbackService/FallbackDLQService.svc"
         timeToLive =" 00:01:00>
         <安全模式=无". />
       </binding>
     </netMsmqBinding>
    </bindings>

    <!-FallbackService客户端->
    < client>
     <端点地址="net.msmq://localhost/private/FallbackService/FallbackService.svc"
       binding ="netMsmqBinding"
       bindingConfiguration ="netMsmq"
       contract ="Fallback.IFallbackService"
      名称="FallbackService"/>
    </client>

      <!-- FallbackService Client Binding -->
      <netMsmqBinding>
        <binding name="netMsmq"
          deadLetterQueue="Custom"
          customDeadLetterQueue="net.msmq://localhost/private/FallbackService/FallbackDLQService.svc"
          timeToLive="00:01:00">
          <security mode="None" />
        </binding>
      </netMsmqBinding>
    </bindings>

    <!-- FallbackService Client -->
    <client>
      <endpoint address="net.msmq://localhost/private/FallbackService/FallbackService.svc"
        binding="netMsmqBinding"
        bindingConfiguration="netMsmq"
        contract="Fallback.IFallbackService"
        name="FallbackService"/>
    </client>

 

这两个服务位于名为备用"的同一程序集中. Fallback.FallbackService和Fallback.FallbackDLQService

The 2 services are in the same assembly called Fallback.   Fallback.FallbackService and Fallback.FallbackDLQService

.svc文件称为"FallbackService.svc". "FallbackDLQService.svc"

The .svc files are called "FallbackService.svc"  "FallbackDLQService.svc"

这样做会出现错误,提示找不到端点.从那里,即时调试器使我们可以查看w3wp进程的内容;

In doing so we are getting error that Endpoints can't be found.  From there the just in time debugger allows us to view the w3wp process says;


w3wp.exe [480]中发生未处理的异常("System.ServiceModel.EndpointNotFoundException")


An unhandled exception('System.ServiceModel.EndpointNotFoundException') occurred in w3wp.exe[480]

 

错误

 

任何帮助将不胜感激.

预先感谢

标记

 

 

推荐答案

亲爱的马克,我也遇到同样的错误.您的问题已经解决了吗?谢谢...
Dear Mark, I have also get the same error. Your problem has been solved? thx, regards...


这篇关于WCF WAS MSMQ:异常服务器找不到端点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆