connect to internet from a windows service

Discussion in 'Microsoft Dot NET' started by Guest, Aug 25, 2005.

  1. Guest

    Guest Guest

    Hello,

    I'm creating a windows service with VB.net. (vs 2003)
    I want this service to connect (or check the status of the connection) to
    the internet via a ISDN modem connection (standard dailup) without a logged
    in user.
    The service is running on a windows XP embedded OS.

    Can anyone point me in the right direction with this, I have no idea where
    to start on this on

    Thanks in for your reply

    Regards, @win
     
    Guest, Aug 25, 2005
    #1
    1. Advertisements

  2. Win,

    In my idea simple, with a modem connection you should have a provider who
    handles your connection and therefore you should have a user and a password.

    I hope this helps,

    Cor,
     
    Cor Ligthert [MVP], Aug 26, 2005
    #2
    1. Advertisements

  3. Guest

    Guest Guest

    Hi Cor, Thanks for your response.

    This is not really the problem. Let say the dailup connection was already
    configured and ready to connect. What I want to do now is to let the windows
    service (no logged in user) connect to the internet (at boot, or when
    connection was lost)

    The machine is running in an remote location and does not have a user
    (headless system). I need this system to dump some data every 15 minutes to a
    webservice.
    Before it can do that it needs a connection via the ISDN line. therfore i
    need to setup a routine that prior to dumping the data checks the status of
    the connection, and if lost reestablishes it.

    Thanks for your help
    --
    Regards, @win


    "Cor Ligthert [MVP]" wrote:

    > Win,
    >
    > In my idea simple, with a modem connection you should have a provider who
    > handles your connection and therefore you should have a user and a password.
    >
    > I hope this helps,
    >
    > Cor,
    >
    >
    >
     
    Guest, Aug 26, 2005
    #3
  4. Win,

    Sorry, I was talking from a webservice. What you want to do is a simple ping
    to an external server. And for that I know only a commandline solution which
    you cannot use.

    Can you maybe do something with this one. It is a sample how to get the page
    from Google, however what you get is of course not important.

    Using this class you can as well get server information. However this is a
    very nice short sample.

    \\\
    Module main
    Public Sub main()
    Dim myReg As Net.HttpWebRequest = _
    DirectCast(Net.WebRequest.Create("http://www.google.com"), _
    Net.HttpWebRequest)
    Dim myResp As Net.HttpWebResponse = _
    DirectCast(myReg.GetResponse(), Net.HttpWebResponse)
    Dim myStream As IO.Stream = myResp.GetResponseStream()
    Dim myreader As New IO.StreamReader(myStream)
    Dim mystring As String = myreader.ReadToEnd()
    myResp.Close()
    End Sub
    End Module
    ///

    I hope this helps a little bit?

    Cor
     
    Cor Ligthert [MVP], Aug 26, 2005
    #4
  5. Guest

    Guest Guest

    Thanks hb,

    This is what i need.
    --
    Regards, @win


    "hB" wrote:

    > WinINet dial-up functions
    > InternetAutodial
    > InternetAutodialHangup
    > InternetDial
    > InternetGetConnectedState
    > InternetHangUp
    > InternetGoOnline
    >
    > VisualBasic
    > http://www.vbip.com/wininet/wininet_connection_01.asp
    > http://www.vbip.com/wininet/wininet_dialup.asp
    >
    > simple sample c#
    > http://www.aspemporium.com/howto.aspx?hid=34
    >
    > RAS Library in Dotnet
    > http://www.gotdotnet.com/Workspaces/Workspace.aspx?id=dd3ebd3e-684a-4dde-a843-e5fdb0895b8e
    >
    > ---
    > hB
    >
    >
     
    Guest, Sep 7, 2005
    #5
    1. Advertisements

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. Guest
    Replies:
    0
    Views:
    568
    Guest
    Feb 12, 2004
  2. Michael Riggio

    A web service inside a windows service?

    Michael Riggio, May 14, 2004, in forum: Microsoft Dot NET
    Replies:
    11
    Views:
    392
    Jason DeFontes
    May 18, 2004
  3. Tom Dacon
    Replies:
    9
    Views:
    204
    Tom Dacon
    Aug 29, 2004
  4. Replies:
    0
    Views:
    355
  5. Guest
    Replies:
    5
    Views:
    1,255
    Sajay Antony
    Oct 18, 2005
Loading...

Share This Page