SessionOptions.ParseUrl Method

Parses session URL into its components.

Syntax

C#
public void ParseUrl(string url)
VB.NET
Public Sub ParseUrl(ByVal url As String)

Parameters

Name Description
string url Session URL to parse.

Exceptions

Exception Condition
ArgumentException The URL given does not have correct format.

Remarks

Parses the given session URL and stores the results into Protocol, HostName, UserName, Password (SecurePassword), PortNumber, SshHostKeyFingerprint, FtpSecure, WebdavSecure and WebdavRoot properties.

Resets properties not specified in the URL to their default values. Always resets GiveUpSecurityAndAcceptAnySshHostKey, TlsHostCertificateFingerprint, and GiveUpSecurityAndAcceptAnyTlsHostCertificate to their default values.

Note that the method parser is more strict, than a parser used for URLs with scripting command open or command-line.

You can use the method to accept session URL provided by a custom command pattern !S. This allows easy implementation of WinSCP extensions using e.g. PowerShell scripts that make use of WinSCP .NET assembly.

 
  library_sessionoptions_parseurl.txt · Last modified: by martin
 

Search Documentation

This page

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

Associations

Site design by Black Gate