You may receive the error when you try to step into a Web service method from your Web Application or Windows Application through the debugger. This kind of scenario is prevalent in applications using the layered architecture and one of the layers form a Web service.
To resolve this issue, you just need to add a Web.Config file to the Web Service and set the <compilation debug="true"> in the Web.Config file.
While using Visual Studio 2005, this issue may arise because, by default when you create a Web Application or Web Service, the Web.Config file is not created. It is only created when we try to debug the application for the first time. Usually, we try to debug the application from the presentation or UI Layer which consumes the Web service and hence the web.config file gets added to the UI Layer whereas, the Web Service doesnt have a Web.Config and by default the debug is set to false. To resolve this issue quickly, set the Web Service as the Start up project and a Web Service file (.asmx) as the start up page and start debugging. Visual Studio 2005 would ask whether to add a Web.Config file and enable debug to true. Select that option and continue so that Visual Studio 2005 would add a Web.Config to the Webservice layer and enable debugging.
Thereafter, the Web Service can be debugged from the consumer layer (UI Layer or whichever layer that consumes the service) by setting back the Start up project and Start pages respectively in the consumer layer.
Kind Regards:
Ali Usman