Sign In|Join
Home/Silverlight.NET Forums/General Silverlight Programming/Programming with .NET - General/Duplexing Web Service Metadata publishing error
Last post Nov 17, 2008 09:50 PM by stbuchok
Member
65 Points
21 Posts
Nov 17, 2008 08:45 PM | LINK
I am always getting an error about Metadata publishing for this service is currently disabled.
I have followed the tutorial here step by step and can not figureout what is wrong: http://msdn.microsoft.com/en-us/library/cc645027(VS.95).aspx
Participant
826 Points
199 Posts
Nov 17, 2008 09:34 PM | LINK
Do you have a node in your web.config turning on the mex endpoint?
<system.serviceModel> <behaviors> <serviceBehaviors> <behavior name="MyBehavior"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/> <services> <service behaviorConfiguration="MyBehavior" name="MySilverService"> <endpoint address="" binding="basicHttpBinding" contract="MySilverService"/> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> </service> </services> </system.serviceModel>
Nov 17, 2008 09:50 PM | LINK
Had to actually set it programmatially. I had tried that way 8 ways to Sunday with nothin'. So I tried setting it programmatically and voila!
{
smb.HttpGetEnabled =
}
Thanks for your response though.
stbuchok
Member
65 Points
21 Posts
Duplexing Web Service Metadata publishing error
Nov 17, 2008 08:45 PM | LINK
I am always getting an error about Metadata publishing for this service is currently disabled.
I have followed the tutorial here step by step and can not figureout what is wrong: http://msdn.microsoft.com/en-us/library/cc645027(VS.95).aspx
anyeone
Participant
826 Points
199 Posts
Re: Duplexing Web Service Metadata publishing error
Nov 17, 2008 09:34 PM | LINK
Do you have a node in your web.config turning on the mex endpoint?
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="MyBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
<services>
<service behaviorConfiguration="MyBehavior" name="MySilverService">
<endpoint address="" binding="basicHttpBinding" contract="MySilverService"/>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
</system.serviceModel>
Anye Mercy
AnyeDotNet.blogspot.com
Please "Mark as Answer" the posts that help you - this lets others know the problem has been solved and helps others having the same problem know which solution works. Thanks!
stbuchok
Member
65 Points
21 Posts
Re: Re: Duplexing Web Service Metadata publishing error
Nov 17, 2008 09:50 PM | LINK
Had to actually set it programmatially. I had tried that way 8 ways to Sunday with nothin'. So I tried setting it programmatically and voila!
ServiceMetadataBehavior smb = this.Description.Behaviors.Find<ServiceMetadataBehavior>();
if (smb == null){
smb = new ServiceMetadataBehavior();smb.HttpGetEnabled =
true; smb.MetadataExporter.PolicyVersion = PolicyVersion.Policy15; this.Description.Behaviors.Add(smb); this.AddServiceEndpoint(ServiceMetadataBehavior.MexContractName, MetadataExchangeBindings.CreateMexHttpBinding(), "mex");}
Thanks for your response though.