I had an internal interface that I needed to implement over .NET remoting to make sure only our assemblies ever called these members remotely (used InternalsVisibleTo to give access to friend assemblies). However, when I implemented the interface and built it, I got the following error:
'AssemblyName' does not implement interface member 'InterfaceMember1(...)' 'AssemblyName' cannot implement an interface because it is not public.
I was unable to search and find a way to make this work. However, I explicitly implemented the interface which allowed my assembly to build, and I can call the remote methods from any friend assembly with no issues.
I'm concerned with the lack of information I found on this topic though, especially on MSDN and StackOverflow. Is there anything wrong with implementing .NET remoting over an internal interface? And if so, why?
EDIT Here is what my interface and implementation look like:
Interface
internal interface IAdmin
{
bool TESTPING();
bool AdminTask1(int val);
...
}
Implementation
public class RService : MarshalByRefObject, IAdmin
{
//IAdmin members
bool IAdmin.TESTPING()
{
return true;
}
bool IAdmin.AdminTask1(int val)
{
// do stuff
return true;
}
}