NegotiateStream.RemoteIdentity プロパティ
アセンブリ: System (system.dll 内)

リモート エンドポイントの ID を示す IIdentity オブジェクト。


クライアントからアクセスされると、このプロパティは、サーバーのサービス プリンシパル名 (SPN: Service Principal Name) と使用される認証プロトコルを含む GenericIdentity を返します。サーバーからアクセスされると、このプロパティは、クライアントを示す WindowsIdentity を返します。WindowsIdentity が使用できない場合、クライアント情報は GenericIdentity でサーバーに返されます。

このプロパティの値を表示する方法については、次のコード例を参照してください。
public static void EndAuthenticateCallback (IAsyncResult ar) { // Get the saved data. ClientState cState = (ClientState) ar.AsyncState; TcpClient clientRequest = cState.Client; NegotiateStream authStream = (NegotiateStream) cState.AuthenticatedStream; Console.WriteLine("Ending authentication."); // Any exceptions that occurred during authentication are // thrown by the EndAuthenticateAsServer method. try { // This call blocks until the authentication is complete. authStream.EndAuthenticateAsServer(ar); } catch (AuthenticationException e) { Console.WriteLine(e); Console.WriteLine("Authentication failed - closing connection."); cState.Waiter.Set(); return; } catch (Exception e) { Console.WriteLine(e); Console.WriteLine("Closing connection."); cState.Waiter.Set(); return; } // Display properties of the authenticated client. IIdentity id = authStream.RemoteIdentity; Console.WriteLine("{0} was authenticated using {1}.", id.Name, id.AuthenticationType ); cState.Waiter.Set(); }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からNegotiateStream.RemoteIdentity プロパティを検索する場合は、下記のリンクをクリックしてください。

- NegotiateStream.RemoteIdentity プロパティのページへのリンク