Share via


SqlCeReplication.InternetPassword Property

SQL Server Compact 3.5 서버 에이전트에 연결할 때 사용되는 암호를 지정합니다.

네임스페이스: System.Data.SqlServerCe
어셈블리: System.Data.SqlServerCe(system.data.sqlserverce.dll에 있음)

구문

‘선언
Public Property InternetPassword As String
public string InternetPassword { get; set; }
public:
property String^ InternetPassword {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_InternetPassword ()

/** @property */
public void set_InternetPassword (String value)
public function get InternetPassword () : String

public function set InternetPassword (value : String)

속성 값

IIS(인터넷 정보 서비스) 암호 문자열입니다. 기본적으로 암호는 사용하지 않습니다.

주의

기본 인증 또는 Windows 통합 인증을 사용하도록 SQL Server Compact 3.5 서버 에이전트를 구성하는 경우 InternetPassword 속성이 필요합니다. Windows 통합 인증이 사용되는 경우 InternetPassword은 네트워크를 통해 전달되지 않습니다.

기본 인증을 사용할 때는 사용자 암호를 보호하기 위해 SSL(Secure Sockets Layer)이나 PCT(Private Communication Technology) 암호화를 사용하도록 IIS를 구성해야 합니다. SSL이나 PCT 암호화가 없으면 기본 인증에서는 쉽게 해독할 수 있는 형식으로 네트워크를 통해 암호를 전송합니다. 이것은 안전하지 않으므로 기본 인증을 사용할 때는 항상 SSL이나 PCT 암호화를 사용하여 암호를 보호해야 합니다.

다음 예제에서는 SqlCeReplication 개체의 InternetPassword 속성을 설정합니다.

Dim repl As SqlCeReplication = Nothing

Try
    ' Instantiate and configure SqlCeReplication object
    '
    'NOTE: when possible, prompt users to enter security 
    'credentials at runtime. If you store credentials in a file, 
    'you must secure the file to prevent unauthorized access.
    '
    repl = New SqlCeReplication()
    repl.InternetUrl = "https://www.adventure-works.com/sqlce/sqlcesa35.dll"
    repl.InternetLogin = "MyInternetLogin"
    repl.InternetPassword = "<enterStrongPassword>"
    repl.Publisher = "MyPublisher"
    repl.PublisherDatabase = "MyPublisherDatabase"
    repl.PublisherLogin = "MyPublisherLogin"
    repl.PublisherPassword = "<enterStrongPassword>"
    repl.Publication = "MyPublication"
    repl.Subscriber = "MySubscriber"
    repl.SubscriberConnectionString = "Data Source=MyDatabase.sdf"

    ' Create the local SQL Mobile Database subscription
    '
    repl.AddSubscription(AddOption.CreateDatabase)

    ' Synchronize to the SQL Server to populate the Subscription 
    '
    repl.Synchronize()
Catch
    ' Handle errors here
    '
Finally
    ' Dispose the repl object
    '
    repl.Dispose()
End Try
SqlCeReplication repl = null;

try
{
    // Instantiate and configure SqlCeReplication object
    //
    //NOTE: when possible, prompt users to enter security 
    //credentials at runtime. If you store credentials in a file, 
    //you must secure the file to prevent unauthorized access.
    //
    repl = new SqlCeReplication();
    repl.InternetUrl = "https://www.adventure-works.com/sqlce/sqlcesa35.dll";
    repl.InternetLogin = "MyInternetLogin";
    repl.InternetPassword = "<enterStrongPassword>";
    repl.Publisher = "MyPublisher";
    repl.PublisherDatabase = "MyPublisherDatabase";
    repl.PublisherLogin = "MyPublisherLogin";
    repl.PublisherPassword = "<enterStrongPassword>";
    repl.Publication = "MyPublication";
    repl.Subscriber = "MySubscriber";
    repl.SubscriberConnectionString = "Data Source=MyDatabase.sdf";

    // Create a local SQL Mobile Database subscription
    //
    repl.AddSubscription(AddOption.CreateDatabase);

    // Synchronize to the SQL Server database
    //
    repl.Synchronize();
}
catch (SqlCeException)
{
    // Handle errors here
    //
}
finally
{
    // Dispose the repl object
    //
    repl.Dispose();
}

스레드 보안

이 유형의 모든 public static(Microsoft Visual Basic의 경우 공유) 멤버는 스레드로부터 안전합니다. 인스턴스 멤버는 스레드로부터의 안전성이 보장되지 않습니다.

플랫폼

개발 플랫폼

Windows Vista, Windows Mobile 5.0, Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Mobile 2003 for Pocket PC, Windows CE 5.0
버전 정보
.NET Framework 및 NET Compact Framework
3.5에서 지원됨
.NET Framework
3.0에서 지원됨
.NET Compact Framework 및 .Net Framework
2.0에서 지원됨

참고 항목

참조

SqlCeReplication Class
SqlCeReplication Members
System.Data.SqlServerCe Namespace