Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF Services, Can I view output in a browser?

Tags:

c#

wcf

web-config

I feel like this question is so basic that none of the tutorials or documentation even bothers to mention how to do it. I'm familiar with web services on other platforms, but I'm new to WCF services.

I've set up a wsHttpBinding like this (in the web.config):

<service behaviorConfiguration="IdentityServiceBehavior" name="Com.CompanyName.Service.IdentityService">
    <endpoint address="/Identityservice" binding="wsHttpBinding"
          bindingConfiguration="" contract="Com.CompanyName.Service.IIdentityService" />
    <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration=""
          bindingNamespace="" contract="IMetadataExchange" />
</service>

I attempt to hit the URL using Fiddler or just a browser and it just gives me a 400 result. I've tried a bunch of different possibilities for what the URL might be, but no dice. I've tried this URL and a few variations on it: http://localhost:61987/IdentityService.svc/Identityservice

If anyone could point me in the direction of the basic information I'm missing here, I'd be very grateful.

like image 315
Mortoc Avatar asked Nov 05 '22 02:11

Mortoc


1 Answers

You can use the WCF test client to test your WCF services

like image 195
vc 74 Avatar answered Nov 14 '22 22:11

vc 74