I am currently getting this error when attempting to instantiate and remote object.
Currently, everything is located locally.
Here is a code snippet to further explain.
The highlighted code is where the error occurs.
Can anyone help
Thanks
===========================================
namespace
ResumeClient{
public class ResumeClient{
public static void Main(string[] args){
ChannelServices.RegisterChannel(
new TcpClientChannel());ResumeLoader loader = (ResumeLoader)Activator.GetObject(
typeof(ResumeLoader), "tcp://localhost:9932/ResumeLoader"); if(loader==null){ Console.WriteLine("Unable to get remote referance"); }
else{
Resume resume = loader.GetResumeByUserID(1);
Console.WriteLine("ResumeID:"+ resume.ResumeID);
Console.WriteLine("UserID:"+ resume.UserID);
Console.WriteLine("Title:"+ resume.Title);
Console.WriteLine("Body:"+ resume.Body);
}
Console.ReadLine();
//Keep the window from closing before we can read the result.}
//END OF MAIN METHOD}
//END OF ResumeClient Object}
//END OF ResumeClientNamespace
Additional information: No connection could be made because the target machine actively refused it
Global IT Solutions
vinod-stylus
MarkBruce
Can u add the details of the Remoting config file as well
Regards,
Vikram
batchelert
Singing in the Rain
I was also facing this error but since my application uses multithreading. In my case a new thread began just before server started listening and there was an error in the method being called in Threadstart. So it never reached till TcpListener, hence the error.
Hope your server side code also is listening to the same port. And this port is not already being used by some other service.
gamehack
I got the same error and I fixed it, but, the circumstances might not be the same as yours. I host the remote object in a Windows service app. I noticed the it wasn't listening to the port I expected to. First I defined and registered the channel in the Main() sub section, then I switch to OnStart() section and it worked.
So, you make sure that the server is really listening. I assumed that you guys configured an published the remote object correctly and declaring and invoking in the same manner on the client side.
Regards
hyl
Regards,
Vikram
Anitha51560
Please let me know if the problem has been identified and fixed. I am getting the same error, and mine is a test application with the client and the server existing in the same machine.
Thanks,
Bhupathy
JohnStallo
Did you get rid of the problem I have the same problem right now. Would you like to help me if you did
Regards,
Laurence
Heis Spiter
I am getting the same error, and mine is a test application with the client and the server existing in the same machine.
if any one gets solution for this, please let me know.
Thanks.
Km. Arumugam