如何在VB.Net中向WCF Web服务添加“测试服务”页面

时间:2021-04-29 13:55:04

I am building a Web service using WCF as a way to provide access to data within my VB.Net application.

我正在使用WCF构建一个Web服务,以便在我的VB.Net应用程序中提供对数据的访问。

When building web services hosted on IIS, there is a helpful test page as part of the service that allows the webservice to be invoked with parameters there and then. It's very helpful for testing.

在构建IIS上托管的Web服务时,有一个有用的测试页面作为服务的一部分,允许使用参数调用Web服务。它对测试非常有帮助。

Is there a way to configure a WCF hosted web service to provide the same sort of test interface, rather than the fairly unhelpul 'use svcutil' response?

有没有办法配置WCF托管的Web服务来提供相同类型的测试接口,而不是相当无用的“使用svcutil”响应?

2 个解决方案

#1


2  

I am afraid you have to build web pages form e.g. aspx to call the service and display the result, WCF service no more generates the UI for you anymore.

我担心你必须建立网页形式,例如aspx调用服务并显示结果,WCF服务不再为您生成UI。

#2


5  

Just fyi, you can also use, the WcfTestClient located at:

只需fyi,你也可以使用,WcfTestClient位于:

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\WcfTestClient.exe

C:\ Program Files \ Microsoft Visual Studio 9.0 \ Common7 \ IDE \ WcfTestClient.exe

which provides a lot of the functionality you are looking for

它提供了许多您正在寻找的功能

#1


2  

I am afraid you have to build web pages form e.g. aspx to call the service and display the result, WCF service no more generates the UI for you anymore.

我担心你必须建立网页形式,例如aspx调用服务并显示结果,WCF服务不再为您生成UI。

#2


5  

Just fyi, you can also use, the WcfTestClient located at:

只需fyi,你也可以使用,WcfTestClient位于:

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\WcfTestClient.exe

C:\ Program Files \ Microsoft Visual Studio 9.0 \ Common7 \ IDE \ WcfTestClient.exe

which provides a lot of the functionality you are looking for

它提供了许多您正在寻找的功能