Hi Steven,
Thanks for the advice. I had thought that the MappingMode property you
mentioned was just for WCF clients, but if it can be used on a WCF service as
well thats good.
Unfortunately, I cant get the MappingMode property to be accepted by the
compiler. The 3rd example URI you sent shows this for a WCF client, but when
I try it the compiler says its not a valid property.
There is no mention of the property in the MSDN doc for the
HTTPTransportBindingElement here.
http://msdn2.microsoft.com/en-us/library/system.servicemodel.channels.httptransportbindingelement_properties.aspx and when I try to compile the following 2 lines of code, I get the compiler
errors shown below:
HttpTransportBindingElement httpElement =
(HttpTransportBindingElement)be;
httpElement.MappingMode = HttpMappingMode.Soap;
Done building target "CoreCompile" in project "WCFServiceLibrary1.csproj" --
FAI
LED.
Done building project "WCFServiceLibrary1.csproj" -- FAILED.
Build FAILED.
App_Code\WCFService2.cs(49,33): error CS0117:
'System.ServiceModel.Channels.Http
TransportBindingElement' does not contain a definition for 'MappingMode'
App_Code\WCFService2.cs(49,47): error CS0103: The name 'HttpMappingMode'
does not exist in the current context
0 Warning(s)
2 Error(s)
Is there any documentation you can point me at that shows how to do this, or
have I missed something?
Thanks, Dan
--------------------------------------------------------------------------------------
[quoted text, click to view] "Steven Cheng[MSFT]" wrote:
> Hi Dan,
>
> As for the WCF binding's WS-Addressing feature, it does be configurable.
> Actually, it is controlled at the transport layer through the "MappingMode"
> property of the HttpTransportBindingElement and you set it to
> "HttpMappingMode.Soap"(By default, the HttpTransportBindingElement in
> WSHttpBinding set it to "HttpMappingMode.SoapWithWsAddressing" which will
> add WS-Addressing feature. The following article has mentioned this:
>
>
http://wcf.netfx3.com/content/WindowsCommunicationFoundationWCFInteroperabil > ityandMigrationwithWSE20.aspx
>
> However, currently since WSHttpBinding is a well encapsulated one, if you
> do need to customize this WS-Addressing feature, I suggeset you create a
> custom binding in which you can customize the inner bindingElements(such as
> adjust the properties on the HttpTransportBindingElement). Here is the MSDN
> document introducing this:
>
> #Creating User-Defined Bindings
>
http://msdn2.microsoft.com/en-us/library/ms733893.aspx >
> In addition, here is another article mentioned customizing WCF binding
> which can also give you some ideas on this:
>
>
http://www.pluralsight.com/blogs/aaron/archive/2006/04/18/21943.aspx >
> Hope this helps.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
>
> ==================================================
>
> Get notification to my posts through email? Please refer to
>
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif > ications.
>
>
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
>
http://msdn.microsoft.com/subscriptions/support/default.aspx. >
> ==================================================
>
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>
>