473,383 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

How to connect/disconnect to remote machine using VPN programmatic

hi all,

I want to kow if there is a way to connet a machine using a VPN client
through vb.net or c# code. I have requirement where i need to copy file using
VPN. Hence, I need to start the connection before copying files and then
disconnect it.

RASdail API is not an option as I am not using modem for internet
connection. Can anyone through some light on it?

Thanks,
maximus
May 10 '06 #1
1 6946
Maximus,

Here's what I use through the network (no modem). Hope this helps.

Public Enum VPNSetupType
Connect
Disconnect
End Enum

Public Shared Sub VPNSetup(ByVal SetupType As VPNSetupType)
Select Case SetupType
Case VPNSetupType.Connect
Shell("rasdial mypresetupvpn myusername mypassword",
AppWinStyle.Hide, True, 45000)
Case VPNSetupType.Disconnect
Shell("rasdial mypresetupvpn /DISCONNECT", AppWinStyle.Hide,
True, 45000)
End Select
End Sub

"Maximus" wrote:
hi all,

I want to kow if there is a way to connet a machine using a VPN client
through vb.net or c# code. I have requirement where i need to copy file using
VPN. Hence, I need to start the connection before copying files and then
disconnect it.

RASdail API is not an option as I am not using modem for internet
connection. Can anyone through some light on it?

Thanks,
maximus

May 10 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: banz | last post by:
Hello I have a problem to resolve: I wrote a Perlscript which caches data from a server (local on my machine) I would like to have a other connection to a remote server but I don't know how to...
3
by: spens | last post by:
os winxp import wmi c = wmi.WMI(computer="10.1.1.1", user="name", password="pass") for host in c.Win32_ComputerSystem(): ...... and so on
1
by: remya1000 | last post by:
from my system i need to open a calculator in remote machine. and i'm using Vb.net and WMI. i need to pop up the calculator in remote machine, while i run one program in my system. while running in...
1
by: mohammedsk | last post by:
Hi, I am trying to connect to a remote machine with known IP address within a network in an office using C language. I used C before to connect to database, but never used it to connect locally to...
0
vinoj
by: vinoj | last post by:
Hi All, These are the following things which i want to do:- 1. I will be taking the ipaddress, username and password from the user using cgi ffrom the browser. 2. Now i want...
2
by: pnalla | last post by:
How to access windows services on remote machine using C#.please give me some example code.also how to start/stop service on remote machine .please give me some example code. thanks prasad
0
by: qwerty27 | last post by:
how to get version of installed component services on remote machine using c#? this is for local machine....but i want fr remote machine COMSVCSLib.MtsGrpClass group = new...
2
by: vimalsantoki | last post by:
Any one please help me in c#. I want to start a GUI process in remote machine using c#.net. I have develop one windows application for LAN in which I provide a facility of remote process start...
1
by: Namitha Bhat | last post by:
Hi ALL, This realates to vb script code to append a file in C Drive in a remote machine accessed from a machine in different domain. I am able to successfully connect to the machine, but the file...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.