Updating the Web.config File
Before we can take this service out for a test drive, the final task is to update the
serviceModel> section of the Web.config file. As described in more detail during our examination of
ASP.NET later in this book, the Web.config file serves a similar purpose to an executable’s *.config
file; however, it also controls a number of web-specific settings. For this example, all we need to do
is update the WCF-specific section of the file as follows:
contract="IMetadataExchange"/>
Testing the Service
Now you are free to build any sort of client to test your service, including passing in the endpoint of
the *.svc file to the WcfTestClient.exe application:
WcfTestClient http://localhost/AutoLotWCFService/Service.svc
Consider Figure 25-21, which illustrates the result of invoking GetInventory().
Do'stlaringiz bilan baham: |