Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

Unable to display username from windows authentication

$
0
0

Hello, I have a windows authentication, and I am required to display the username. It works for my ASP.NET when I use this code:

protected void Page_Load(object sender, EventArgs e)

{

string userName = Page.User.Identity.Name;

Response.Write(userName);

}

but I have to display it using ASP Classic. I tried using this code but nothing is displayed

<%

@ Language = "VBScript" %><html>

<

body>

<%

Dim cn, cnn, cno cn = Request.ServerVariables("LOGON_USER")

cnn = Request.ServerVariables(

"REMOTE_USER") cno = Request.ServerVariables("AUTH_USER")

Response.Write(cn)

Response.Write(cnn)

Response.Write(cno)

%>

</body>

</

html>

 


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>