
After we create the project we would want to delete the default Service1.svc and IService1.cs files. Let's create a new interface file and name it ITestService: Now, let's create the test service that is going to implement that interface: We are just using a simple method that returns the id back to us. We are done with the test service, let's tweak the default configuration. Open the web config file and paste the following: After we get this hosted in IIS, we are ready to test the service. I am going to be using wcfTestClient which you can get to it thru the command line by typing wcftestclient as depicted below:

The address I specified in IIS is http://localhost:9090/SvcLessService/TestService.svc but you can specify your own address/TestService.svc. So, without the svc file I am able to download and query the wcf service method and below is the wcfTestClient result:

No comments:
Post a Comment