检测Web.Config中身份验证模式 [英] Detecting Web.Config Authentication Mode

查看:175
本文介绍了检测Web.Config中身份验证模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说我有以下的web.config:

Say I have the following web.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
	<system.web>
		<authentication mode="Windows"></authentication>
	</system.web>
</configuration>

使用ASP.NET C#,我怎么可以检测认证标签的模式价值?

Using ASP.NET C#, how can I detect the Mode value of the Authentication tag?

推荐答案

尝试 Context.User.Identity.AuthenticationType

去PB的回答乡亲

这篇关于检测Web.Config中身份验证模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆