Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between Policy15 and Policy12?

Tags:

c#

wcf

I've got a basic service host:

m_host = new ServiceHost(m_service, m_baseAddress);
ServiceMetadataBehavior behavior = new ServiceMetadataBehavior();
behavior.HttpGetEnabled = true;
behavior.MetadataExporter.PolicyVersion = PolicyVersion.Policy15;
m_host.Description.Behaviors.Add(behavior);
m_host.AddServiceEndpoint(
    typeof(IManagerService), 
    new BasicHttpBinding(), m_soapAddress);
m_host.Open();

My question is how do I know which PolicyVersion to use? The MSDN is not very helpful, it seems to think I should know already if I want 1.2 or 1.5...

PolicyVersion.Policy15 Property

PolicyVersion.Policy12 Property

like image 310
Denise Skidmore Avatar asked Jun 03 '13 14:06

Denise Skidmore


1 Answers

In case others wonder what changes there were from 1.2 to 1.5, here's a link that gives a list of changes.

From Denise, MSDN has an article about how to publish your own metadata using code that helped get this running that you can find here.

like image 83
Tombala Avatar answered Oct 02 '22 12:10

Tombala