質問
を使用しています。純リモ.私のサーバー/hosterはWindowsのサービスです。でも仕事は、イブレア城、イブレアなどで研修事業サポート,中国ビジネスを一望しない処理します(まで再起動します。ではWindowsのサービスはこちらからコードをWindowsのサービス:
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()
{
}
}
}
感謝の手で提供します。
Vaccano
解決
としてSingleCallの種類、おSampleObjectされましたの呼び出しのたびのお客様することとしています。このことを示唆するとおオブジェクトを断られないときには、いくつかのどんなものかを示します。見ていく必要があるでdependanciesで共有資源orlocks.試し書のデバッグのSampleObjectのコンストラクタにどのリモコした。
所属していません StackOverflow