If I recall, the DefaultBinding stuff comes into play when you specify
endpoints without bindings. I think in your case, the default endpoint logic
is getting applied which is based on the base address and not the default
binding.
On Oct 11, 2010, at 7:23 PM, João Bragança wrote:
> I have a WCF service where I need to upload images. I am configuring
> it like so:
>
> public class WcfServicesInstaller : IWindsorInstaller
> {
> private const int FIVE_MEGABYTES = 1024*1024*5;
>
> private const string SERVICE_SUFFIX = "Service";
>
> #region IWindsorInstaller Members
>
> public void Install(IWindsorContainer container,
> IConfigurationStore
> store)
> {
> container.AddFacility<WcfFacility>(f =>
> f.DefaultBinding = new
> BasicHttpBinding
>
> {
>
> MaxReceivedMessageSize = FIVE_MEGABYTES,
>
> // 5
> megs,
>
> MaxBufferPoolSize = FIVE_MEGABYTES,
>
> MaxBufferSize = FIVE_MEGABYTES,
>
> ReaderQuotas = new XmlDictionaryReaderQuotas
>
> {
>
> MaxArrayLength = FIVE_MEGABYTES,
>
> MaxDepth = FIVE_MEGABYTES,
>
> MaxStringContentLength = FIVE_MEGABYTES,
>
> MaxNameTableCharCount = FIVE_MEGABYTES,
>
> MaxBytesPerRead = FIVE_MEGABYTES
>
> }
>
> })
>
> .Register(AllTypes.FromAssemblyContaining<IAuthenticationService>()
> .Where(type =>
> type.Name.EndsWith(SERVICE_SUFFIX))
> .WithService.FirstInterface()
> .Configure(r =>
> NameService(r).LifeStyle.Transient),
> Component.For<IServiceBehavior>()
>
> .ImplementedBy<ServiceDebugBehavior>()
> .DependsOn(new
> {
>
> IncludeExceptionDetailInFaults = true,
>
> HttpHelpPageEnabled = true,
> }),
> Component.For<IServiceBehavior>()
>
> .ImplementedBy<ServiceMetadataBehavior>()
> .DependsOn(new
> {
>
> HttpGetEnabled = true
> }),
>
> Component.For<IServiceBehavior>().ImplementedBy<UnitOfWorkBehavior>());
> }
>
> #endregion
>
> private static ComponentRegistration<object>
> NameService(ComponentRegistration<object> registration)
> {
> var implementation = registration.Implementation;
> registration.Named(implementation.Name.Substring(0,
> implementation.Name.Length - SERVICE_SUFFIX.Length)
> .ToLowerInvariant() + ".svc");
> return registration;
> }
> }
>
> But when I upload one I get everyone's second favorite wcf exception:
>
> The formatter threw an exception while trying to deserialize the
> message: There was an error while trying to deserialize parameter
> http://tempuri.org/:Data. The InnerException message was 'There was an
> error deserializing the object of type System.Byte[]. The maximum
> array length quota (16384) has been exceeded while reading XML data.
> This quota may be increased by changing the MaxArrayLength property on
> the XmlDictionaryReaderQuotas object used when creating the XML
> reader. Line 1, position 26406.
>
> Is the wcf facility ignoring my DefaultBinding when using the "look no
> config" method? Or am I doing something else wrong?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/castle-project-users?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.