[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.mobile

Check sql server 2005 end point

lautaro

5/15/2008 3:30:00 PM

I'm developing a windows mobile 6 aplication with C# .NET 2008. I'm
trying to check network,internet,sqlserver2005 availability. I already
check network and internet successfully.

Usually if you use the SQL server compact CE you can check this Uri
http://yourserverip/SQLSync/sqlcesa30.dll and this make the trick, but
I am using sql server 2005 web server. Did some one have any Idea how
to verify if your web server is online.

Thanks in advanced
1 Answer

Armando Rocha

5/16/2008 11:38:00 AM

0

Hi,

You can do a webrequest to your WebServer:

bool _IsOnline = false;
private void Connect()
{
try
{
WebResponse response = null;
WebRequest request = WebRequest.Create(http://yourserver);
request.Timeout = 20000;
response = request.GetResponse();
_IsOnline = true;
}
catch
{
_IsOnline = false;
}
}

--
Armando Rocha
Mobile Developer

http://www.ifthenso...
PORTUGAL
"lautaro" <cheyzan@gmail.com> escreveu na mensagem
news:39f50749-28f6-4f6b-89bc-d48f15a8fbf9@m36g2000hse.googlegroups.com...
> I'm developing a windows mobile 6 aplication with C# .NET 2008. I'm
> trying to check network,internet,sqlserver2005 availability. I already
> check network and internet successfully.
>
> Usually if you use the SQL server compact CE you can check this Uri
> http://yourserverip/SQLSync/sqlcesa30.dll and this make the trick, but
> I am using sql server 2005 web server. Did some one have any Idea how
> to verify if your web server is online.
>
> Thanks in advanced