我如何了解Web服务是否正在运行? [英] How can I understand a Web service is running or not?

查看:107
本文介绍了我如何了解Web服务是否正在运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的代码,我从Web服务运行一个函数

Hi 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?

Thanks.

推荐答案

您所说的Web服务是否运行是什么意思?

使用Web服务URL在浏览器中浏览webserive,您将能够知道它是否启动.
您还问其他吗?
What do you mean by webservice running or not?

Browse the webserive in a browser using webservice URL and you would be able to know if its up or not.
Were you asking anything other than that?


1.通常,当服务未运行时,由于错误消息是浏览器,我们会显示服务不可用".

2. HTTP状态代码为503的异常. true> 503服务不可用(IIS 6.0) [
1. Generally, when service is not running, we get "Service Unavailable" as error message is browser.

2. An exception with HTTP status code as 503. 503-Service Unavailable (IIS 6.0)[^]


您要调试Webservice项目吗? :)
您可以使用此方法,希望该方法可以对您有所帮助.:)

首先打开Visual Studio,然后使用此键(Shift + Alt + O)打开Web服务项目.
第二个选择本地IIS" ,然后选择要调试的Web服务项目.:)
最后,您可以在代码中添加断点,然后按F5键运行您的Web服务项目. ;)








注意:您可以创建一个简单的ASP.NET项目,然后添加Web参考.这是一种确定您创建的WebService是否运行良好的方法...
Do you want to debug the webservice project ?? :)
You can use this methode, i hope this methode can help u.. :)

First open your visual studio, and then open your webservice project by using this key (Shift + Alt + O).
Second plese choose "Local IIS", and then choose the webservice project that what you want to debug.. :)
Finally, you can add breakpoint in your code, and then press F5 for running your webservice project. ;)








NB : You can make a simple ASP.NET project, and then add Web Reference. This is a way to determine whether the WebService you create are running well...


这篇关于我如何了解Web服务是否正在运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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