Bug 683640 - GetProperty<T> on Binding does not work
Summary: GetProperty<T> on Binding does not work
Status: NEW
Alias: None
Product: Mono: Class Libraries
Classification: Mono
Component: WCF (show other bugs)
Version: 2.10.x
Hardware: x86 Apple iOS 4.3
: P5 - None : Critical
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-30 05:32 UTC by Roy Cornelissen
Modified: 2011-03-30 05:32 UTC (History)
0 users

See Also:
Found By: Community User
Services Priority:
Business Priority:
Blocker: Yes
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roy Cornelissen 2011-03-30 05:32:25 UTC
Description of Problem:
Found this problem when trying to use WCF proxy generated by SLSvcUtil.exe for a WCF service. When I try to set the CookieContainer, the program fails saying "Unable to set the CookieContainer. Please make sure the binding contains an HttpCookieContainerBindingElement.", even though EnableCookieContainer is set on the binding.

This is due to the fact that GetProperty<T> returns null when evaluating the binding.

Steps to reproduce the problem:
1. Generate a WCF proxy for a WCF service (I did so with SLSvcUtil.exe on a Windows machine, then used the code in a MonoTouch project)
2. In code:

BasicHttpBinding binding = new BasicHttpBinding();
EndpointAddress address = new EndpointAddress("....");
binding.EnableHttpCookieContainer = true;

var client = new MyProxyClass(binding, address);
client.CookieContainer = _someCookieContainer; // <-- this line fails at runtime


Actual Results:
Exception "Unable to set the CookieContainer. Please make sure the binding contains an HttpCookieContainerBindingElement."

Expected Results:
CookieContainer can be set and will be used by the binding.

How often does this happen? 
Always when running this code.

Additional Information: