Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I'm working on a ASP.Net project and It contains a AJAX-enabled WCF service. when I run that service always I get a message saying "Metadata publishing for this service is currently disabled." So I tried to enable the service by editing the web.config file but i couldn't do it. I don't know much about WCF services. since this is a ASP.Net project I don't have a app.config file. so I need a little help to enable this metadata thing to run my web service. thanks. my web.config file is given below.



XML
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<system.serviceModel>
<services>
<!-- Before deployment, you should remove the returnFaults behavior configuration to avoid disclosing information in exception messages -->
<service name="ImageService" behaviorConfiguration="returnFaults">
<endpoint contract="ImageService" binding="mexHttpBinding" address="mex"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="returnFaults" >
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900