<p>Say I have the following web.config:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;configuration&gt;
    &lt;system.web&gt;
        &lt;authentication mode="Windows"&gt;&lt;/authentication&gt;
    &lt;/system.web&gt;
&lt;/configuration&gt;
</code></pre>

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

Try
```
Context.User.Identity.AuthenticationType
```
Go for PB's answer folks