bugfixr
bugfixr

Reputation: 8077

Expose webHttpBinding endPoint in Framework 4.0?

I'm trying to expose a webHttpBinding EndPoint using Framework 4.0.

<endpoint address="web" binding="webHttpBinding" contract="MyContract"/>

However, when browsing using WFC Test Client, I see nothing. If I change my Framework target to 3.5, it works fine.

Is there something different in 4.0 to get this to work?

Upvotes: 0

Views: 1182

Answers (2)

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364409

First of all WCF Test Client is for testing SOAP endpoints, it is not able to use REST endpoints (webHttpBinding).

Edit:

.NET 3.5 handled REST services incorrectly and added these endpoints to WSDL. But generated proxies (even in WCF Test Client) usually didn't work because WSDL is not able to describe HTTP Verbs and other REST specific features needed to call operation. .NET 4.0 doesn't include web endpoints to WSDL (and that is the reason why endpoints are not visible in WCF Test client).

Upvotes: 1

Aliostad
Aliostad

Reputation: 81700

Have a look here:

http://msdn.microsoft.com/en-us/library/w4atty68.aspx

You need to put this

<configuration>
<startup>
<supportedRuntime version="v4.0" />
</startup>
</configuration>

Upvotes: 0

Related Questions