2008-09-17 4 views
0

.NET Remoting을 사용하고 있습니다. 내 서버/호스트는 Windows 서비스입니다. 때로는 제대로 작동하고 한 번 요청을 처리 한 다음 다시 처리하지 않을 것입니다 (다시 시작할 때까지). 제공 어떤 도움.NET Remoting Server 하나의 요청 만 처리합니다.

using System; 
    using System.Collections.Generic; 
    using System.ComponentModel; 
    using System.Data; 
    using System.Diagnostics; 
    using System.Linq; 
    using System.Runtime.Remoting; 
    using System.Runtime.Remoting.Channels; 
    using System.Runtime.Remoting.Channels.Tcp; 
    using System.ServiceProcess; 
    using System.Text; 
    using Remoting; 

    namespace CreateReview 
    { 
     public partial class Service1 : ServiceBase 
     { 
      public Service1() 
      { 
       InitializeComponent(); 
      } 

      readonly TcpChannel channel = new TcpChannel(8180); 

      protected override void OnStart(string[] args) 
      { 
       // Create an instance of a channel 
       ChannelServices.RegisterChannel(channel, false); 

       // Register as an available service with the name HelloWorld 
       RemotingConfiguration.RegisterWellKnownServiceType(
        typeof(SampleObject), 
        "SetupReview", 
        WellKnownObjectMode.SingleCall); 
      } 

      protected override void OnStop() 
      { 

      } 
     } 
    } 

감사 : 다음은 Windows 서비스는 Windows 서비스에서 코드가 같이 실행 중입니다. 에서는 SingleCall 유형으로 Vaccano

답변

1

은, 당신의 SampleObject는 모든 클라이언트가 만드는 전화 생성됩니다. 이것은 당신의 사물이 잘못되었다는 것을 나에게 시사하며, 당신이하는 일을 보여주지 않는다. 공유 리소스 또는 잠금에 대한 의존성을 조사해야합니다. Remoting 호출이 얼마나 멀리 떨어져 있는지 보려면 SampleObject의 생성자에서 디버그를 작성하십시오.