会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
双E软件
——专注C#、ASP.NET技术
CnBlogs
Home
New Post
Contact
Admin
Subscription
判断Web服务器是否在线的代码
public
static
bool
isconnect()
{
try
{
HttpWebRequest myHttpWebRequest
=
(HttpWebRequest)WebRequest.Create(
"
http://192.168.0.252/jsfpWebSite/jsfpWebService.asmx
"
);
//
Get the associated response for the above request.
HttpWebResponse myHttpWebResponse
=
(HttpWebResponse)myHttpWebRequest.GetResponse();
myHttpWebResponse.Close();
return
true
;
}
catch
(WebException e)
{
return
false
;
}
}
posted @
2007-08-07 10:17
虚空境界
Views(
691
) Comments(
1
)
收藏
举报
刷新页面
返回顶部
公告