FtpClientConnection.ServerUserName プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ユーザーのログオンエイリアスを取得するか設定します。
public:
property System::String ^ ServerUserName { System::String ^ get(); void set(System::String ^ value); };
public string ServerUserName { get; set; }
member this.ServerUserName : string with get, set
Public Property ServerUserName As String
プロパティ値
ユーザーのログオンエイリアスを含む文字列です。
例
FTPクライアント接続を作成する最も一般的な方法は ConnectionManagerを利用することです。 InnerObjectには接続が含まれており、ConnectionManagerに含まれる特定の接続のすべての性質はPropertiesコレクションを通じてアクセス可能です。 以下のコード例は、接続マネージャーを使ってFTP接続を作成する方法を示し、 Properties コレクションを使ってプロパティを設定します。
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Tasks.FileSystemTask;
namespace Microsoft.SqlServer.SSIS.Samples
{
class mySqlServer_Sample
{
static void Main(string[] args)
{
Package pkg = new Package();
FtpClientConnection ftp = null;
Connections conns = pkg.Connections;
ConnectionManager cm = conns.Add("FTP");
// Display the default values of the FTP connection properties.
// Some properties are not shown as they are write-only.
Console.WriteLine("ChunkSize: {0}", cm.Properties["ChunkSize"].GetValue(cm));
Console.WriteLine("Retries: {0}", cm.Properties["Retries"].GetValue(cm));
Console.WriteLine("ServerName: {0}", cm.Properties["ServerName"].GetValue(cm));
Console.WriteLine("ServerPort: {0}", cm.Properties["ServerPort"].GetValue(cm));
Console.WriteLine("ServerUserName: {0}", cm.Properties["ServerUserName"].GetValue(cm));
Console.WriteLine("Timeout: {0}", cm.Properties["Timeout"].GetValue(cm));
Console.WriteLine("UsePassiveMode: {0}",cm.Properties["UsePassiveMode"].GetValue(cm));
Console.WriteLine();
}
}
}
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.SqlServer.Dts.Runtime
Imports Microsoft.SqlServer.Dts.Tasks.FileSystemTask
Namespace Microsoft.SqlServer.SSIS.Samples
Class mySqlServer_Sample
Shared Sub Main(ByVal args() As String)
Dim pkg As Package = New Package()
Dim ftp As FtpClientConnection = Nothing
Dim conns As Connections = pkg.Connections
Dim cm As ConnectionManager = conns.Add("FTP")
' Display the default values of the FTP connection properties.
' Some properties are not shown as they are write-only.
Console.WriteLine("ChunkSize: {0}", cm.Properties("ChunkSize").GetValue(cm))
Console.WriteLine("Retries: {0}", cm.Properties("Retries").GetValue(cm))
Console.WriteLine("ServerName: {0}", cm.Properties("ServerName").GetValue(cm))
Console.WriteLine("ServerPort: {0}", cm.Properties("ServerPort").GetValue(cm))
Console.WriteLine("ServerUserName: {0}", cm.Properties("ServerUserName").GetValue(cm))
Console.WriteLine("Timeout: {0}", cm.Properties("Timeout").GetValue(cm))
Console.WriteLine("UsePassiveMode: {0}",cm.Properties("UsePassiveMode").GetValue(cm))
Console.WriteLine()
End Sub
End Class
End Namespace
出力例:
チャンクサイズ:1
リトライ:5回
サーバー名:
ServerPort: 21
ServerUserName:
タイムアウト:60分
UsePassiveMode: False
注釈
このプロパティのデフォルト 値は匿名です。