Advertisement
BaSs_HaXoR

How to connect to a VPN Through Code

Aug 25th, 2016
1,145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. | -------- + -------- | ///////// | \\\\\\\\ | -------- + -------- | ///////// | \\\\\\\\\ | -------- + -------- |
  2. [RasDial]:
  3. You can use the rasdial executable to accomplish this:
  4. System.Diagnostics.Process.Start("rasdial.exe", "VPNConnectionName VPNUsername VPNPassword");
  5. | -------- + -------- | ///////// | \\\\\\\\ | -------- + -------- | ///////// | \\\\\\\\\ | -------- + -------- |
  6.  
  7. or
  8.  
  9. | -------- + -------- | ///////// | \\\\\\\\ | -------- + -------- | ///////// | \\\\\\\\\ | -------- + -------- |
  10. [DotRos]: (https://dotras.codeplex.com/)
  11. | -------- + -------- | ///////// | \\\\\\\\ | -------- + -------- | ///////// | \\\\\\\\\ | -------- + -------- |
  12. [The complete list of implemented APIs]
  13. AllocateLocallyUniqueId
  14. CredUIPromptForCredentials
  15. RasClearConnectionStatistics
  16. RasClearLinkStatistics
  17. RasConnectionNotification
  18. RasDeleteEntry
  19. RasDeleteSubEntry
  20. RasDial pinvoke.net
  21. RasDialDlg
  22. RasEntryDlg
  23. RasEnumAutodialAddresses
  24. RasEnumConnections pinvoke.net
  25. RasEnumDevices pinvoke.net
  26. RasEnumEntries pinvoke.net
  27. RasFreeEapUserIdentity
  28. RasGetAutodialAddress
  29. RasGetAutodialEnable
  30. RasGetAutodialParam
  31. RasGetConnectionStatistics
  32. RasGetConnectStatus pinvoke.net
  33. RasGetCountryInfo
  34. RasGetCredentials
  35. RasGetCustomAuthData
  36. RasGetEapUserData
  37. RasGetEapUserIdentity
  38. RasGetEntryProperties pinvoke.net
  39. RasGetErrorString pinvoke.net
  40. RasGetLinkStatistics
  41. RasGetNapStatus
  42. RasGetProjectionInfo
  43. RasGetSubEntryHandle
  44. RasGetSubEntryProperties
  45. RasHangUp pinvoke.net
  46. RasPhonebookDlg
  47. RasRenameEntry
  48. RasSetAutodialAddress
  49. RasSetAutodialEnable
  50. RasSetAutodialParam
  51. RasSetCredentials
  52. RasSetCustomAuthData
  53. RasSetEapUserData
  54. RasSetEntryProperties pinvoke.net
  55. RasSetSubEntryProperties
  56. RasUpdateConnection
  57. RasValidateEntryName pinvoke.net
  58. | -------- + -------- | ///////// | \\\\\\\\ | -------- + -------- | ///////// | \\\\\\\\\ | -------- + -------- |
  59. https://stackoverflow.com/questions/7913695/create-connect-vpn-connection-through-c-net
  60. | -------- + -------- | ///////// | \\\\\\\\ | -------- + -------- | ///////// | \\\\\\\\\ | -------- + -------- |
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement