Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.ArgumentException on H.OpenVpn #24

Open
BoGnY opened this issue May 3, 2024 · 0 comments
Open

System.ArgumentException on H.OpenVpn #24

BoGnY opened this issue May 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@BoGnY
Copy link

BoGnY commented May 3, 2024

Describe the bug

The line

var folder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? string.Empty;
causes a System.ArgumentException 'Formato del percorso non valido.' (in english means 'Path format not valid')

Steps to reproduce the bug

Just call

HOpenVpn.Start(Config, Username, Password);

Expected behavior

OpenVpn connection succesfully

Screenshots

Exception:
image

NuGet package version

0.9.27

IDE

Visual Studio 2022

Additional context

Stacktrace:

System.ArgumentException
  HResult=0x80070057
  Messaggio=Formato del percorso non valido.
  Origine=mscorlib
  Analisi dello stack:
   in System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   in System.IO.Path.InternalGetDirectoryName(String path)
   in H.OpenVpn.HOpenVpn.Start(String config, String username, String password) in /_/src/libs/H.OpenVpn/OpenVPN.cs: riga 155
   in OpenVPN.Main.GnBtnConnect_Click(Object sender, EventArgs e) in C:\Luca\Progetti\OpenVPN\OpenVPN\Main.cs: riga 840
   in System.Windows.Forms.Control.OnClick(EventArgs e)
   in Guna.UI2.WinForms.Guna2GradientButton.OnClick(EventArgs e)
   in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   in System.Windows.Forms.Control.WndProc(Message& m)
   in System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   in System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   in System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   in System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   in System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   in OpenVPN.Program.Main() in C:\Luca\Progetti\OpenVPN\OpenVPN\Program.cs: riga 55

@BoGnY BoGnY added the bug Something isn't working label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant