开发者

How does visual studio find web services on the local machine?

When adding a new web reference, one of the options that visual studio gives you is to search for web services on the local machine (The exact option name is "Web services on the local machine").

My question is, how does Visual Studio find the web services on the local machine? The local website that contains the service doesn't contain a .disco file.

I tried to use fiddler but got nothing (visual studio didn开发者_如何转开发't make any requests to the local web server). Does visual studio scan the default website for files with the extension .asmx?


MSDN article here ( http://msdn.microsoft.com/en-us/library/8dcbc50t.aspx) states that "For this link to return information, a Web server, such as Internet Information Services (IIS), must be running on the local computer."

A poster in another forum ( http://forums.asp.net/t/1224187.aspx) is having trouble with accessing local web services and the error message reads

Active Directory Services cannot find the web server. A possible cause for this is an incompatibility between versions of Internet Information Server (IIS) on the client and the server. Another possible cause is that IIS is not installed on the local machine, or the user identity under which you are running may not have permissions to view websites on this machine. To view websites on this machine, make sure that you run Visual Studio as administrator. On Windows Vista computers with IIS installed, make sure that IIS Metabase and IIS 6 configuration compatibility feature is enabled."

This makes me think that the local web services are discovered by querying the IIS metabase from the local computer. Most probably, there is some managed COM API that allows one to do this.

EDIT: Regarding your experiment with Fiddler - it does not catch calls made to "localhost" (see http://www.fiddler2.com/fiddler/help/hookup.asp#Q-LocalTraffic), so, even if Visual Studio made such calls, these would not be displayed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜