V
vvenk
Hello:
I wanted to implement windows-based authentication.
However when I run this aspx form, I do not see the user name and
Authentication type.
Can somebody tell me what I am doing wrong? Here's the code snippets:
WindowsAuth.ASPX
<html>
<script language="VB" runat=server>
Sub Page_Load(Src As Object, E As EventArgs)
AuthUser.Text = User.Identity.Name
AuthType.Text = User.Identity.AuthenticationType
End Sub
</script>
<body>
<h3><font face="Verdana">Using Windows Authentication</font></h3>
<table Width="700" rules="all" bordercolor="Black"
style="background-color:#ccccff;bordercolor:black;font-family:Verdana;font-size:8pt;border-collapse:collapse;">
<tr>
<td>User:</td>
<td><asp:label id=AuthUser runat=server/>
</tr>
<tr>
<td>Authentication Type:</td>
<td><asp:label id=AuthType runat=server/>
</tr>
</table>
</body>
</html>
Web.config
<configuration>
<system.web>
<authentication mode="Windows" />
<globalization requestEncoding="UTF-8" responseEncoding="UTF-8" />
</system.web>
</configuration>
Thanks.
Venki
I wanted to implement windows-based authentication.
However when I run this aspx form, I do not see the user name and
Authentication type.
Can somebody tell me what I am doing wrong? Here's the code snippets:
WindowsAuth.ASPX
<html>
<script language="VB" runat=server>
Sub Page_Load(Src As Object, E As EventArgs)
AuthUser.Text = User.Identity.Name
AuthType.Text = User.Identity.AuthenticationType
End Sub
</script>
<body>
<h3><font face="Verdana">Using Windows Authentication</font></h3>
<table Width="700" rules="all" bordercolor="Black"
style="background-color:#ccccff;bordercolor:black;font-family:Verdana;font-size:8pt;border-collapse:collapse;">
<tr>
<td>User:</td>
<td><asp:label id=AuthUser runat=server/>
</tr>
<tr>
<td>Authentication Type:</td>
<td><asp:label id=AuthType runat=server/>
</tr>
</table>
</body>
</html>
Web.config
<configuration>
<system.web>
<authentication mode="Windows" />
<globalization requestEncoding="UTF-8" responseEncoding="UTF-8" />
</system.web>
</configuration>
Thanks.
Venki