add new issue       

Issue ID:  591     Change WcfProxy to use the data portal URL with default binding (if supplied)      
Created by rocky on 2009-10-06 8:29 AM, 3028 days ago
Project:  CSLA .NET
Category:  enhancement
Priority:  med
Status:  closed
Feature area:Data Portal
  Entering "issue#999" in comment creates link to id 999

show inline images      show change history

comment 2301 posted by JonnyBee on 2010-03-23 5:01 AM, 2860 days ago 
Added DataPortalUrlString property to ApplicationContext (and allow override similar to DataPortalProxy) as accessing the DataPortalUrl property will throw an Exception if value is not defined in config file.

Changed WcfProxy to see if DataPortalUrlString is specified and the set up a default WSttpBinding as:
        var binding = new WSHttpBinding()
          MaxReceivedMessageSize = int.MaxValue,    // default is 65536
          ReaderQuotas = new System.Xml.XmlDictionaryReaderQuotas()
            MaxArrayLength = int.MaxValue,          // default is 16384
            MaxStringContentLength = int.MaxValue,  // default is 8192
comment 2215 posted by rocky on 2010-02-26 12:56 PM, 2885 days ago 

ApplicationContext has a property for the server URL. This is used by Remoting and asmx proxies, but ignored by the WcfProxy.

It should be possible to use that URL, assuming wsHttpBinding, to "just make it work" without needing to have a system.serviceModel entry in the config file.

Of course if there isn't the simple URL in the config file, then the existing behavior (using servicemodel) should remain intact.