I have a ASP.NET MVC 2 application with WCF service defined in it (.svc file using service from a different project). web.config WCF section looks like this:
<system.serviceModel>
<behaviors>
<endpointBehaviors>
<behavior name="RecordServiceAspNetAjaxBehavior">
<enableWebScript />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="HttpGetEnabledBehaviors" >
<!-- Add the following element to your service behavior configuration. -->
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true" />
<services>
<service name="RecordService" behaviorConfiguration="HttpGetEnabledBehaviors">
<endpoint address="" behaviorConfiguration="RecordServiceAspNetAjaxBehavior"
binding="webHttpBinding" contract="RecordService" />
<endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
</service>
</services>
The problem is that after opening RecordService.svc in browser I still get "Metadata publishing for this service is currently disabled." message... how can i enable wsdl/mex?