我怎样才能发现,如果一个Web服务正在运行或不? [英] How can I find out if a Web service is running or not?

查看:136
本文介绍了我怎样才能发现,如果一个Web服务正在运行或不?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要检查网络服务的可用性。 这是我的我运行一个函数从Web服务

I want to check availability of web service. this is my code that i running a function from web service

DataSet ds = new DataSet();
DataTable dt = new DataTable();
NegsoNotifier.WorkItemsService.WorkItemsSoapClient wiservice;

wiservice = new NegsoNotifier.WorkItemsService.WorkItemsSoapClient();
System.ServiceModel.EndpointAddress adr;
adr = new System.ServiceModel.EndpointAddress(Weburl);
wiservice.Endpoint.Address = adr;
//wiservice.Open();

ds = wiservice.GetMyWorkItems(Username, Password);
dt = ds.Tables[0];

我如何理解这个Web服务正在运行或不?

How can I understand this Web service is running or not?

推荐答案

如果该服务的答案,那么它运行。如果有一个答案是正确的问题答案,那么它的正常运行。

If the service answers, then it was running. If it answers with an answer that is correct for the question, then it's running correctly.

请注意,它可以运行,但没有运行的正确的。例如,它需要一个数据库服务器可能已关闭。

Note that it could be running, but not running correctly. For instance, a database server that it needs might be down.

这篇关于我怎样才能发现,如果一个Web服务正在运行或不?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆