.NET Remoting problem

Shantanu

New member
Joined
May 20, 2005
Messages
2
Programming Experience
3-5
can someone tell me that how to use remoting. i tried with a simple .NET remoting programe ,

my programe consist with 3 project . first project has a class library which is the collection of component . second project is basically hosting the first project ( class library ) and third project is the client project which will call the classes of my first project ( Class Library ) through the second project ( Hosting project ) and access the property and method of that.

everything is working fine in the above structure but i dont want to have the second project which is the hosting project in this case . i want my client project to directly call the first project's ( Class Library ) property and method without going through the hosting project.

please remember that i am using TCP channel for this example , so in this case my first and second project ( Class Library and Hosting project ) is configured in a remote machine and

client project is configured in the local machine.



please help to overcome this situation.
Thanks in advance:)

Shantanu
 
You can use IIS to host the class. You'd setup the connection using the web.config
 
actually i dont want to use IIS , i want a simple communication like Client Server Application.

so my client will connect to server with something like this
tcp://202.56.33.21/RemoteServer/ApplicationName

everything is working but i have to keep up running my server application by saying
Console.WriteLine("press any key to continue") ;
Console.ReadLine();

i dont want to keep up running the server application ,whenever client request to server , then server will invoke the method automatically.
when i try to connect from client application to server without keep up running the server app , it says remote server not found.
i am confuse whether i should use windows service for this or nor ....???

Thanks
Shantanu
 
Well if you don't want to use IIS and you want it to always run when the server is on you'll need to use a service app. Only services can start while the machine isn't logged in.
 
You hav two choices
1: Use windows service (as u say)
OR
2: Create a thread.....that register chanell and other formatlities....and then use while(true){}

Your program will always listen client request......and whenever u wanna stope the thread call thread.Abort() method from main class...
 
Back
Top