text 在Asp.net Web窗体中进行身份验证
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 在Asp.net Web窗体中进行身份验证相关的知识,希望对你有一定的参考价值。
Windows Authentication
<system.web>
<compilation targetFramework="4.5" debug="true"/>
<httpRuntime targetFramework="4.5" maxRequestLength="1048576" executionTimeout="3600"/>
<authentication mode="Windows"/>
<!--Disable Anonymous Users-->
<authorization>
<deny users ="?" />
</authorization>
<!--If you want to have the application code executed using the logged in user Identity, Enable Impersonate else app pool identity is used-->
<identity impersonate="false"/>
<!--Other Setings-->
<trust level="Full"/>
<customErrors mode="Off"/>
<sessionState timeout="120" mode="InProc"/>
<machineKey decryption="AES" validation="SHA1"/>
</system.web>
IIS_IUSRS
IUSR
Everyone
LOCAL SERVICE
string userNTID = HttpContext.Current.User.Identity.Name;
Response.Write("1Application code executed using:");
Response.Write(System.Security.Principal.WindowsIdentity.GetCurrent().Name +"<br>");
Response.Write("1Is User Authenticated: ");
Response.Write(User.Identity.IsAuthenticated.ToString() + "<br>");
Response.Write("1Authentication Type: ");
Response.Write(User.Identity.AuthenticationType.ToString() + "<br>");
Response.Write("User Name: ");
Response.Write(User.Identity.Name.ToString() + "<br>");
以上是关于text 在Asp.net Web窗体中进行身份验证的主要内容,如果未能解决你的问题,请参考以下文章
text 使用ASP.NET Core 2 Web API,Angular 5,.NET核心身份和Facebook登录进行JWT身份验证
ASP.NET MVC:窗体身份验证及角色权限管理示例
添加 FriendlyUrls 时,jQuery ajax 调用不适用于 ASP.Net Web 窗体
Asp.Net 实现Form登录验证
ASP.NET Windows 和窗体身份验证
ASP.NET 窗体身份验证超时和会话超时