locked
GetSyncBatchParameters() over WCF RRS feed

  • Question

  • Hi,

    We've been following your example for the Syncing of databases over WCF. We have now moved the "Service" into our main WCF project and are experiencing a serious problem.

    In your "example" project "Database SyncSQL Server and SQL Express N-Tier with WCF" we are able to run without any problem, however in our man WCF project we can't. The error we are constantly receiving is an object null error from the internal call to "GetSyncBatchParameters".

    In your example project this call finds its way into the iis worker process and I see the server side code running, in our WCF project it does not.

    I have read that the "SyncBatchParameters" class is not serializable - how can this call complete successfully in your project if so ?

    The only difference I can see is between the projects is that, although we are both using wsHttpBinding in order to make use of session, our project requires security and as such employs "SecurityMode.Message" to protect the service calls along with all the other required settings to make it function. I'm sure this isn't the first WCF service to "require" security in this fashion.

    My question is simple - why would altering the bindings like this make the call to "GetKnowledge" fail to get to the server ?

    Our bindings are set up as follows and have been changed on the client in order to match.

    WSHttpBindingbinding = newWSHttpBinding();

    false;

                binding.BypassProxyOnLocal =

    false;

                binding.HostNameComparisonMode =

    HostNameComparisonMode.StrongWildcard;

                binding.MaxBufferPoolSize = size;

                binding.MaxReceivedMessageSize = size;

                binding.MessageEncoding =

    WSMessageEncoding.Mtom;

                binding.TextEncoding = System.Text.

    Encoding.UTF8;

                binding.UseDefaultWebProxy =

    true;

                binding.ReaderQuotas =

    newSystem.Xml.XmlDictionaryReaderQuotas()

                {

                    MaxDepth = 128,

                    MaxStringContentLength = size,

                    MaxArrayLength = size,

                    MaxBytesPerRead = size,

                    MaxNameTableCharCount = size

                };

                binding.Security.Mode =

    SecurityMode.Message;

                binding.Security.Message =

    newNonDualMessageSecurityOverHttp()

                {

                    ClientCredentialType =

    MessageCredentialType.UserName,

                    AlgorithmSuite =

    SecurityAlgorithmSuite.Default

                };

    Please Help...

                binding.CloseTimeout = timeout;

                binding.OpenTimeout = timeout;

                binding.ReceiveTimeout = timeout;

                binding.SendTimeout = timeout;

                binding.AllowCookies =

    Wednesday, May 15, 2013 2:58 PM

All replies