GateKiller GateKiller - 1 year ago 159
ASP.NET (C#) Question

Detecting Web.Config Authentication Mode

Say I have the following web.config:

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

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

Answer Source

Try Context.User.Identity.AuthenticationType

Go for PB's answer folks

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download