So I have created a Web Service the same way as every other one I normally create. Problem is, I want to run it to test if it starts correctly开发者_如何学编程.
If I right click the project -> properties -> debug, you should be able to tell it to start an external .exe which always seemed to be in the /bin/debug folder of the solution for me, but this project is not generating one, so I can't actually start it.
Do you know if there's a setting where I can get it to generate an .exe?
To test a WCF you can use the WCF Test Client
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\WcfTestClient.exe
You then start debugging (f5) your WCF application and add the service URL to the test client
If you are using a webservice then you can start debugging (f5) and since it is local you can pass non complex parameters to test the methods, otherwise you would need to create a new project to test the service.
I think the best approach would be to create a console app which starts your service this will be your server and you could make a console app as a test client or use some Test framework for testing your service like NUnit MS-Test
精彩评论