2

Have created a very simple Web Service (asmx) in Visual Studio 2010 Professional, and am trying to use the auto-generated unit test cases. I get something that seems quite familiar on this site:

The web site could not be configured correctly; getting ASP.NET process information failed. Requesting http://localhost:81/zfp/VSEnterpriseHelper.axd return an error: The remote server returned an error: (500) Internal Server Error.

500 Error Running Visual Studio ASP.NET Unit Test

I have tried:
1. Running the tests on IIS rather than ASP.NET Development Server
2. Adding and then removing the XML fragment to my Web Service's .config file
3. Giving the MACHINE\ASPNET account Full control to the local folder

My current questions:
1. Why am I being bothered with this instrumentation / code coverage DLL, when this doesn't seem to be something that ships with Visual Studio 2010 Professional? Is there any way I can turn it off?
2. I'm placing the node under in Web.config - is that the correct node?
3. Is it possible to bind to a web service without using the webby test attributes?

I've seen other people advising making the Web Service as light-weight as possible. I'm trying to call it with jQuery / AJAX / JSON, so being able to debug the actual web service would be really helpful.

Best wishes,

Ben

Community
  • 1
  • 1
Ben
  • 355
  • 2
  • 11
  • Maybe I'm missing something, but in general I don't think you have to configure a website and/or perform out-of-process calls in order to run Unit Tests. – Cristian Lupascu Jan 22 '12 at 12:01

1 Answers1

0

Sorry to not answer your questions directly because I dont know off the top of my head, but if you want to use AJAX / JSON to consume a service that you are building, you should write a .ashx handler and return JSON data directly that can be read directly as native javascript.

http://johnnycoder.com/blog/2008/12/16/httphandler-json-data/

Tyler Zale
  • 634
  • 1
  • 7
  • 23
  • if you change the return type to text/plain it can still be used as json but makes debugging in browser easier. – Tyler Zale Jan 13 '11 at 22:52