Help:Getting Error While Registering Obj with Remoting Services
-
I have a dll where i write // RMLib1.h #pragma once #using #using using namespace System; using namespace System::Runtime::Remoting; using namespace System::Runtime::Remoting::Channels; using namespace System::Runtime::Remoting::Channels::Tcp; namespace RMLib1 { public __gc class HelloObj:public MarshalByRefObject { public: HelloObj(); String* Greet(String* name); private: int numGreet; }; } #include "stdafx.h" this is implementation of these methods #include "RMLib1.h" using namespace RMLib1; HelloObj::HelloObj() { Console::WriteLine("HelloObj Activated "); } String* HelloObj::Greet(String* name) { numGreet++; String* greeting =S"Hello" ; return greeting; } Inother project i try register this objas remote services using namespace System; #using using namespace System::Runtime::Remoting; using namespace System::Runtime::Remoting::Channels; using namespace System::Runtime::Remoting::Channels::Tcp; #using using namespace RMLib1; // This is the entry point for this application int _tmain(void) { Console::WriteLine(S"Hello World"); TcpChannel* chan = new TcpChannel(8085); ChannelServices::RegisterChannel(chan); Console::WriteLine(S"Registering Hello Obj As SingleTon "); RemotingConfiguration::RegisterWellKnownServiceType(Type::GetType("HelloObj"),"HelloObj",WellKnownObjectMode::Singleton); Console::WriteLine(S"Waiting For Remote Calls"); Console::WriteLine(S"Hit Enter To Exit "); Console::ReadLine(); return 0; } I can compile this code but when try to excecute it gives me error System.ArgumentNullException:Value Can not be Be NULL Parameter Name:Type This line is giving Problem Any Idea............. RemotingConfiguration::RegisterWellKnownServiceType(Type::GetType("HelloObj"),"HelloObj",WellKnownObjectMode::Singleton);