Click here to Skip to main content
15,890,185 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am rather new to .net web services. I am writing a web service and I can test it under Visual Studio 2008 built-in Development Server.

Now, I want to call the web service from a windows application. How can test and debug the web service as and when I write the web service code? Do I need to run IIS and put the asmx file into the wwwroot? or can I test and debug it some other way.

I need to write the web service code and test it by calling it from the WinForm at the same time

Thank you
Posted

If you need to debug both the web service and the WinForms app at the same time, you need to run them both in their own instance of Visual Studio - i.e. run 2 instances of VS.

You don't need to use IIS - your WinForms app can connect to the built-in Development Server - just make sure to start the web service before the WinForms app!

Nick
 
Share this answer
 
Thats great! Thanks for the quick answer.

One more doubt. How do I set the web reference to the asmx, then? It will be available through localhost if I run both instances at the same time?

What is the usual standard that developers use for testing web service from a winform?
 
Share this answer
 
Hi Nick,

Thank you for the solution.

In fact, since your answer, I played around VS2008 a little bit and found a solution: Add Project feature, which is very handy.

You first start a Web service project and add a Windows Forms project to it just as we do in component/dll projects. This will enable you to run single instance of VS and debug both web and winform application simultaneously.

Thank you for the food for thought, anyway

Neji
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900