J
Junoti
Hello, I'm hoping someone might be able to help me out. I'm creating a
shared assembly with my interface definitions similar to the following.
When I try to compile the RemotingInterface, everything works. When I
go to compile the RemotingServer assembly, I receive the following
error message. I've included all my references, so I'm almost positive
that's not the issue. Shouldn't this be possible without having to
implement HelloMessage in the RemotingInterface assembly?
Error 2 'RemotingServer.SampleService' does not implement interface
member
'RemotingInterface.ISampleService.HelloWorld(RemotingInterface.IHelloMessage)'
namespace RemotingInterface
{
public interface IHelloMessage
{
string Message
{
get;
set;
}
}
public interface ISampleService
{
//If I have HelloMessage defined in the same assembly, I change
//IHelloMessage to HelloMessage and
everything works fine.
IHelloMessage HelloWorld(IHelloMessage
message);
}
}
Now, in my server assembly, I have the following:
namespace RemotingServer
{
public class SampleService : MarshalByRefObject, ISampleService
{
//This method declaration throws:
//'ISampleService.HelloWorld' in
explicit interface declaration is not a member of interface
//Shouldn't RemotingServer.HelloMessage
is RemotingInterface.IHelloMessage return true?
HelloMessage
ISampleService.HelloWorld(HelloMessage message)
{
HelloMessage response = new HelloMessage();
return response;
}
}
public class HelloMessage : IHelloMessage
{
public string Message
{
get
{
return "Hello";
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
}
}
shared assembly with my interface definitions similar to the following.
When I try to compile the RemotingInterface, everything works. When I
go to compile the RemotingServer assembly, I receive the following
error message. I've included all my references, so I'm almost positive
that's not the issue. Shouldn't this be possible without having to
implement HelloMessage in the RemotingInterface assembly?
Error 2 'RemotingServer.SampleService' does not implement interface
member
'RemotingInterface.ISampleService.HelloWorld(RemotingInterface.IHelloMessage)'
namespace RemotingInterface
{
public interface IHelloMessage
{
string Message
{
get;
set;
}
}
public interface ISampleService
{
//If I have HelloMessage defined in the same assembly, I change
//IHelloMessage to HelloMessage and
everything works fine.
IHelloMessage HelloWorld(IHelloMessage
message);
}
}
Now, in my server assembly, I have the following:
namespace RemotingServer
{
public class SampleService : MarshalByRefObject, ISampleService
{
//This method declaration throws:
//'ISampleService.HelloWorld' in
explicit interface declaration is not a member of interface
//Shouldn't RemotingServer.HelloMessage
is RemotingInterface.IHelloMessage return true?
HelloMessage
ISampleService.HelloWorld(HelloMessage message)
{
HelloMessage response = new HelloMessage();
return response;
}
}
public class HelloMessage : IHelloMessage
{
public string Message
{
get
{
return "Hello";
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
}
}