Answered destination knowledge coming null

  • Tuesday, December 18, 2012 11:11 PM
     
     

    created the proxy for remote provider hosted on wcf dynamically :

                             

      WSHttpBinding binding = new WSHttpBinding();


                binding.ReaderQuotas.MaxArrayLength = int.MaxValue;
                binding.Security.Mode = SecurityMode.None;
                binding.ReceiveTimeout = binding.OpenTimeout = binding.CloseTimeout = binding.SendTimeout = new TimeSpan(0, 20, 60);
                binding.MaxReceivedMessageSize = int.MaxValue;


                string url = @"http://10.100.5.170/syncService.svc?wsdl";
                ChannelFactory<ISqlSyncContract> factory = new ChannelFactory<ISqlSyncContract>(binding, new EndpointAddress(url));
                //factory.Credentials.Windows.ClientCredential.UserName = "TCDEV-WEB1\\sai";
                //factory.Credentials.Windows.ClientCredential.Password = "xos2012dec";

               base.proxy = factory.CreateChannel();



                //factory.Credentials.Windows.ClientCredential.UserName = "TCDEV-WEB1\\sai";
                //factory.Credentials.Windows.ClientCredential.Password = "xos2012dec";

               this.dbProxy = base.proxy as ISqlSyncContract;

    When doing like this:SyncBatchParameters wrapper = proxy.GetKnowledge(); the destinationknowledge coming null and directly call is going to endsession and throwing object reference not set to instance of an obejct


    ess

All Replies

  • Wednesday, December 26, 2012 2:14 PM
    Moderator
     
     Answered

    I suggest you enable Sync Fx tracing or WCF tracing so you can have a look if there's any exception being raised.

    • Marked As Answer by saitrips Tuesday, January 08, 2013 7:38 PM
    •