Solved

Polling in VB.NET

Posted on 2006-10-20
14
581 Views
Last Modified: 2008-03-03
Experts,

I am working on a POS system for my company and they want to use or create a new polling system from what they are using now, it is currently being done in DOS.  I need to find a strong windows-based communications package that supports user scripting and VB.NET that can perform polling through a modem.  Does anyone know of any free 3rd party .NET controls or package that can help me either create a new system, or provide me with a new system.  If I create the system it will be in VB.NET using VS2005.  I've seen a lot of companies offer to sell their polling systems, however my company doesn't want to go that route.  They want something either customized or something very general that can be customized and most importantly free.

0
Comment
Question by:jtaylor8181
  • 8
  • 6
14 Comments
 
LVL 7

Expert Comment

by:Mohamed Zedan
ID: 17774004
post more info please so I could help you are generalizing the subject to much. :)
0
 
LVL 4

Author Comment

by:jtaylor8181
ID: 17774658
Basically the the main office (server) will receive reports from their stores (clients) through the modem at the end of the night.  The main office can also send updates and reports to there stores as well.  Once they have received their reports, or possibly at anytime during the day (that is a separate issue).  The actual polling is just sending the server the client's reports.  What I need is a .net control, dll, or package that supports polling in this type of situation.  The main concern is being able to communicate to all these stores and not have any issues done the line because the server is busy.  Is that enough info, or is more needed?
0
 
LVL 7

Expert Comment

by:Mohamed Zedan
ID: 17775050
does the server dial the clients through dialup connection or vise-versa , or is the connection through ADSL i.e. Always connected ?

what kind of data is sent are they files or a connection to the main server's database and execution of some queries ?

are the stores networked together or does the server contacts eah one separately?
0
 
LVL 4

Author Comment

by:jtaylor8181
ID: 17775143
Clients dialup to the server, send .ini files, csv files, etc., and are not networked together.
0
 
LVL 7

Accepted Solution

by:
Mohamed Zedan earned 500 total points
ID: 17775170
ok ...

you could setup vpn connections using the dialup modem on each client and setup a vpn connection on the server to recieve the client calls

once connected through the vpn connection both machines would be on one network then you could copy files programatically or manualy as you do on a regular networked pc ... using shared folders ...

if you need more details just ask :)
0
 
LVL 4

Author Comment

by:jtaylor8181
ID: 17775772
Sounds great however I have never used a vpn connection.  Do you know of any good tutorials on this topic.
0
 
LVL 4

Author Comment

by:jtaylor8181
ID: 17775825
I have found a couple of things so far but it seems like the internet is needed to do this, however none of our stores have internet connection.  is using the vpn still possible in this scenario?
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 7

Expert Comment

by:Mohamed Zedan
ID: 17775843
yes through the dialup connection

you need to do the following :
0
 
LVL 7

Expert Comment

by:Mohamed Zedan
ID: 17775892
on the server

open network connections in the my network places window
click create new connection
Select setup an advanced connection
click next
Select Accept incoming connections
click next
select the modem that you will accept calls on
click next
select allow Virtual private Connections
click next
Select the users that you will allow to connect through that connections (these are local users you can add or delete users as you wish)
click next
highlight Internet protocol (TCP/IP) and press Properties
Select Specify TCP/IP Addresses
AND enter 192.168.0.2 in from
               192.168.0.100 in to
then hit ok
click next
then click finish

0
 
LVL 7

Expert Comment

by:Mohamed Zedan
ID: 17775913
on the clients
open network connection and click create new connection
select connect to the network at my workplace
click next
select dialup connection
click next
Name the connection
click next
enter the phone number of the server
click next
click finish

when you connect using this connection supply the user name and password that you selected at the server
 hope this helps you ....
0
 
LVL 4

Author Comment

by:jtaylor8181
ID: 17775957
Sorry to keep bugging you about this but how would I access this network to send files from the client to the server.
0
 
LVL 7

Expert Comment

by:Mohamed Zedan
ID: 17776018
do you mean programmatically or manually while they are both basically the same...

you first need to share a folder by right clicking on it and selecting properties then sharing tab
enable file sharing and select allow network users to change the content of the folder

then ok

all you have to do then is open start then run then enter the following
\\the ip address of the server \the shared folder name
i.e.
\\192.168.0.5\mainshare
this should open the remote folder then you could access it normally

or you could type the server computer name instead of the ip address they are both the same
0
 
LVL 4

Author Comment

by:jtaylor8181
ID: 17776143
I know this is asking for a bit much but can you give me another example programmatically to do this.  I you could I would appreciate it and thanks for all of your help with this.  I really do appreciate it.
0
 
LVL 7

Expert Comment

by:Mohamed Zedan
ID: 17777905
This function will copy the a file from src to dest

    Public Function CopyFile(ByVal Src As String, ByVal Dest As String) As Boolean
        Try
            Dim stSrc As New IO.FileStream(Src, IO.FileMode.Open)
            Dim Bytes(stSrc.Length - 1) As Byte
            stSrc.Read(Bytes, 0, stSrc.Length)
            Dim stDest As New IO.FileStream(Dest, IO.FileMode.Create)
            stDest.Write(Bytes, 0, Bytes.Length)
            stSrc.Close()
            stDest.Close()
            Return True
        Catch ex As Exception
            Return False
        End Try
    End Function

all you have to do is call the function providing the src file path and the destination file path
i.e.
the file is located at C:\test.ini
the serverPc Shared folder is MainShare
so you call the function like this

CopyFile("C:\Test.ini","\\ServerPC\MainShare\Test.ini")
or
CopyFile("C:\Test.ini","\\192.168.0.2\MainShare\Test.ini")

Glad to be of service :)
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now