相关疑难解决方法(0)

动态模拟远程用户 - c#和asp.net

我想动态模拟远程用户执行某些代码.我在网上搜索了很多,并得到一些代码来冒充.模拟的代码如下所示

namespace Tools
{
#region Using directives.
// ----------------------------------------------------------------------

using System;
using System.Security.Principal;
using System.Runtime.InteropServices;
using System.ComponentModel;

// ----------------------------------------------------------------------
#endregion

/////////////////////////////////////////////////////////////////////////

/// <summary>
/// Impersonation of a user. Allows to execute code under another
/// user context.
/// Please note that the account that instantiates the Impersonator class
/// needs to have the 'Act as part of operating system' privilege set.
/// </summary>
/// <remarks>   
/// This class is based on the information in the Microsoft knowledge base
/// article …
Run Code Online (Sandbox Code Playgroud)

c# asp.net impersonation

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

asp.net ×1

c# ×1

impersonation ×1