Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Powershell中获取ASP.NET标识_Asp.net_Powershell - Fatal编程技术网

在Powershell中获取ASP.NET标识

在Powershell中获取ASP.NET标识,asp.net,powershell,Asp.net,Powershell,要设置配置文件的RSA加密,需要授予对ASP.NET标识的访问权限才能访问RSA容器。我是根据这里的说明设置的 其中包括创建具有以下内容的identity.aspx文件: <%@ Page Language="C#" %> <% Response.Write(System.Security.Principal.WindowsIdentity.GetCurrent().Name); %> 如何通过powershell而不是aspx文件获取此信息?用于取消引用静态成员的

要设置配置文件的RSA加密,需要授予对ASP.NET标识的访问权限才能访问RSA容器。我是根据这里的说明设置的

其中包括创建具有以下内容的identity.aspx文件:

<%@ Page Language="C#" %>
<%
Response.Write(System.Security.Principal.WindowsIdentity.GetCurrent().Name);
%>


如何通过powershell而不是aspx文件获取此信息?

用于取消引用静态成员的powershell语法与
C#
中的稍有不同,因此:

[System.Security.Principal.WindowsIdentity]::GetCurrent().Name
您应该将页面(.aspx)公开为通用处理程序(.ashx),而不是页面(.aspx)。