I wanted to start by using Remoting under C # in testdriven, but I'm stuck.
One thing I found on this topic is the article in Marc Clifton's article , but it seems to be working on the server, manually starting it from the console.
I am trying to start a server (i.e. register a class of service) in a test device. I probably also use the interface incorrectly, but this will happen later.
I always get an exception (sorry for the German post) that the channel is already registered. System.Runtime.Remoting.RemotingException: Der Channel tcp wurde bereits registriert.
After commenting out the ChannelServices.RegisterChannell () line in the test method, this happens to call Activator.GetObject ().
I tried putting StartServer () on the stream, but that didn't help either. I found that creating a new AppDomain might be possible, but have not tried it yet.
Can you tell me if my approach is inherently wrong? How can i fix this?
using System; using NUnit.Framework; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Tcp; namespace Bla.Tests.Remote { [TestFixture] public class VerySimpleProxyTest { int port = 8082; string proxyUri = "MyRemoteProxy"; string host = "localhost"; IChannel channel; [SetUp] public void SetUp() { StartServer(); } [TearDown] public void TearDown() { StopServer(); } [Test] public void UseRemoteService() {
source share