Export (0) Print
Expand All

Debugging XML Web Services in Managed Code

When you are ready to build and run your XML Web service, you must first compile the ASP.NET Web Service project. Once compiled, you can run the XML Web service. For more information, see Debugging Preparation: ASP.NET Web Service Projects.

You can choose from three methods to build and run your XML Web service:

MethodDescription
With the debuggerThis method starts the default browser and loads the specified start page. Running a page in the debugger makes it possible for you to step through code line-by-line and use additional analysis tools and runtime information. If Visual Studio detects that key files have changed, it will also build the project before launching the browser with the specified start page.
Without the debuggerThis method makes it possible for you to run your code as it normally would run outside of the context of development tools, and therefore no runtime information is available through these tools. If Visual Studio detects that key files have changed, it will build the project before launching the browser with the specified start page. However, you can attach the debugger to the process as needed.
View in browserThis method compiles the project and opens a Web page chosen from Solution Explorer. Visual Studio compiles and runs the project in the default browser within Visual Studio.

To build and run an XML Web service with the debugger

  1. In Solution Explorer, right-click the .asmx file for the XML Web service you wish to run and click Set As Start Page on the shortcut menu.
  2. On the Debug menu, click Start.

    This command instructs Visual Studio to run the XML Web service in the debugger.

  3. To stop running the form and return to the Code Editor, close the browser, or click Stop Debugging on the Debug menu.

To build and run an XML Web service without the debugger

  1. In Solution Explorer, right-click the .asmx file for the XML Web service you wish to run and click Set As Start Page on the shortcut menu.
  2. On the Debug menu, click Start Without Debugging.

    Visual Studio saves all files in the project and then builds it. Once built, Visual Studio launches the default browser and navigates to the project's start page.

  3. To stop running the XML Web service and return to the Code Editor, close the browser.

To build and run an XML Web service using the View in Browser option

  1. In Solution Explorer, right-click the .asmx file for the XML Web service you want to run and click View in Browser on the shortcut menu.

    Visual Studio builds the XML Web service and launches the specified start page within the IDE.

  2. To stop running the XML Web service and return to the Code Editor, close the browser.

See Also

Creating XML Web Services in Managed Code | Debugging Preparation: ASP.NET Web Service Projects

Show:
© 2014 Microsoft