How to fix Remoting error?
-
I am using webservice in my application. Inside that I have a function to register the remoting service. Following is my code:
RegisterRemoting();
private void RegisterRemoting()
{
try
{
WellKnownClientTypeEntry entry = RemotingConfiguration.IsWellKnownClientType(typeof(IManager));
if (entry == null)
{
RemotingConfiguration.RegisterWellKnownClientType(typeof(IManager), AmortisationGeneral.GetAppSettings("RemotingService"));
Hashtable properties = new Hashtable();
properties["name"] = "HttpBinary";
properties["useDefaultCredentials"] = true;
//SoapClientFormatterSinkProvider clientFormatter = new SoapClientFormatterSinkProvider();
BinaryClientFormatterSinkProvider clientFormatter = new BinaryClientFormatterSinkProvider();
HttpChannel channel = new HttpChannel(properties, clientFormatter, null);
ChannelServices.RegisterChannel(channel, false);
}} catch(Exception ex) { ex.Message.ToString(); return; } }
The uri is coming from an appsettings key which is as follows:
When I try to test the url as specified in the value tag, I was getting the following error:
System.ArgumentNullException: No message was deserialized prior to calling the DispatchChannelSink.
Parameter name: requestMsgIs this something that the remoting service has not been installed properly in my local system? I am using VS 2005. I have tried almost all of the solutions found in google, but didn't solve the issue. Would be great if anybody provides some help on this.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.