Enable MEX in a Web.Config
Posted
by Conor
on Stack Overflow
See other posts from Stack Overflow
or by Conor
Published on 2010-05-02T20:49:18Z
Indexed on
2010/05/02
20:58 UTC
Read the original article
Hit count: 486
Hi Folks,
How do I enable/create a MEX endpoint in the below web config so I can view the service from my browser?
I have tried a few variation from googling but VS always complains about it. (not a valid child element etc...)
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
<services>
<service name="MyApp.MyService" behaviorConfiguration="WebServiceBehavior">
<endpoint address="" binding="webHttpBinding" contract="MyApp.IMyService" behaviorConfiguration="JsonBehavior">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="JsonBehavior">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
Cheers, Conor
© Stack Overflow or respective owner