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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With