Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
Window Service not able to call remoting object
puneetshadija
Aug 31 2009 6:05 AM
4.5k
Reply
Hi All,
I have created a simple remoting server inside a Window Service as :
TcpChannel tcpChannel = new TcpChannel(8085);
ChannelServices.RegisterChannel(tcpChannel,true);
WellKnownServiceTypeEntry entry = new WellKnownServiceTypeEntry("RemotingWindowSrvc", "RemotingWindowSrvc.MailFormat", "MailFormat", WellKnownObjectMode.SingleCall);
RemotingConfiguration.RegisterWellKnownServiceType(entry);
Then we try and make call to this server in my client as:
private void GetRemoteObject()
{
TcpChannel chan = new TcpChannel();
ChannelServices.RegisterChannel(chan);
MailFormat obj = (MailFormat)Activator.GetObject(typeof(MailFormat), "tcp://localhost:8085/MailFormat");
obj.sendUserRegistration("...");
}
}
MailFormat: is the name of the Class, being called here.
But upon calling "obj.sendUserRegistration("...");", client hangs indefinitely.
please help me with this.
Thanks,
Puneet
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
search functionality in windows application?
How do you handle exceptions when remoting?