Check sql server 2005 end point

Discussion in 'ASP .Net Mobile' started by lautaro, May 15, 2008.

  1. lautaro

    lautaro Guest

    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
     
    lautaro, May 15, 2008
    #1
    1. Advertising

  2. 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.ifthensoftware.com
    PORTUGAL
    "lautaro" <> escreveu na mensagem
    news:...
    > 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
     
    Armando Rocha, May 16, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Juan T. Llibre
    Replies:
    0
    Views:
    493
    Juan T. Llibre
    Jun 7, 2005
  2. farseer

    SQL Server 2005 + SQL Server Express

    farseer, Aug 7, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    360
    farseer
    Aug 8, 2006
  3. Saraswati lakki
    Replies:
    0
    Views:
    1,410
    Saraswati lakki
    Jan 6, 2012
  4. Wesley Chen
    Replies:
    0
    Views:
    247
    Wesley Chen
    Apr 7, 2009
  5. Wesley Chen
    Replies:
    9
    Views:
    263
    Sean O'Halpin
    Apr 14, 2009
Loading...

Share This Page