区間偽装のサンプル
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
「[[Open棟梁 wiki>https://opentouryo.osscons.jp]]」は、「...
-[[戻る>IdentityImpersonation]]
*目次 [#x05788f7]
#contents
*概要 [#s3e7414f]
区間偽装のサンプルです。
Open棟梁の[[IdentityImpersonation]].[[ImpersonateValidUse...
try
{
// コードの特定部分を実行するときのみ、任意のユーザ...
// 偽装して
ii = new IdentityImpersonation();
ret = ii.ImpersonateValidUser("x", "", "x");
// ファイルを開く
Console.WriteLine(
string.Format("ユーザ「{0}」を偽装):", WindowsId...
+ ResourceLoader.LoadAsString(@"c:\test.txt", Enco...
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
}
finally
{
// 偽装解除
ret = ii.UndoImpersonation();
}
終了行:
「[[Open棟梁 wiki>https://opentouryo.osscons.jp]]」は、「...
-[[戻る>IdentityImpersonation]]
*目次 [#x05788f7]
#contents
*概要 [#s3e7414f]
区間偽装のサンプルです。
Open棟梁の[[IdentityImpersonation]].[[ImpersonateValidUse...
try
{
// コードの特定部分を実行するときのみ、任意のユーザ...
// 偽装して
ii = new IdentityImpersonation();
ret = ii.ImpersonateValidUser("x", "", "x");
// ファイルを開く
Console.WriteLine(
string.Format("ユーザ「{0}」を偽装):", WindowsId...
+ ResourceLoader.LoadAsString(@"c:\test.txt", Enco...
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
}
finally
{
// 偽装解除
ret = ii.UndoImpersonation();
}
ページ名: