The Web Matrix project appears to have served as a test bed in the development of ASP.NET. This freebie attracted a lot of attention since it did not require an installation of IIS. It had its own http server whenever needed. Of course, one could use it also in the presence of an installed IIS. This tutorial is about creating a web service on Web Matrix and testing the service on the built in mini web server, as well as testing a second example on the IIS 5.1 on the local machine.
Creating a Web Service with Web Matrix - Testing this web service (Page 4 of 4 )
In the default example the mini web server was used. In this example the IIS on the local machine will be used, given by the second radio button in a previous screen.
When you click on Start it takes a while, but the result from the web service is now returned at the url of the localhost on the IIS, http://localhost/Pythagoras/WsvcWm.asmx.
The hypotenuse gives access to the screen where the web service may be tested as shown.
Clicking on the Invoke button displays the XML returned in the following display. The answer 5 is the correct value for the hypotenuse.
If we now look at the Pythogoras site in IIS we see that the whole directory , C:ASPApril04 is added to the website Pythagoras as shown. Pythagoras is not a web project but a site with a number of web form files.
Two different web services were created using the ASP.NET Web Matrix program. Testing the web service with the built-in mini-web server and with the IIS installed on the machine were also demonstrated. The links at the bottom of the WSDL file provide details about the various protocols, unfortunately missing in this tutorial. In a future article, creating a client for these services will be considered.
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.