---
title: "在VS2005中调试Webservice"
author: "winzenghua"
date: "2007-08-15T17:11:00Z"
tags: []
slug: "vs2005-webservice"
draft: false
lastmod: "2007-08-15T17:11:00Z"
id: 952953
url: "https://java4gis.iteye.com/blog/952953"
---

I am trying to debug a webservice by steping into a web method called  
from a windows form project. The strange thing is that sometimes it  
works but often it does not. When it does not work I get the following  
error when trying to step into a web method:

Unable to automatically step into the server. The remote procedure  
could not be debugged. This usually indicaes that debugging has not  
been enabled on the server. See help for information.

Here is how my project looks like:

1\) project: WinForm project which has a button that activates a web  
method.  
2\) project: Web service which is consumed in project 1.

Solution -&gt; Set Startup Project... -&gt; Common Properties -&gt; Startup  
Project:  
Multiple startup projects (注意：设置两个项目同时为启动项目)  
1\) entry: WebServiceProject (Action = Start)  
2\) entry: WinForm project (Action = Start)

Web.config is set to:  
&lt;compilation debug="true"/&gt;  
&lt;authentication mode="Windows"/&gt;

(注意：WebService项目的启动属性设置：等待外部程序请求再启动 )  
WebService project -&gt; Property Pages -&gt; Start Options  
Don't open a page. Wait for a request from an external  
appplication.