Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Request.Servervariables help needed

LEGEND ,
Apr 17, 2007 Apr 17, 2007

Copy link to clipboard

Copied

Hi,

I'm using the following code to reutrn the username of an authenticated
user:

<%=Request.ServerVariables("AUTH_USER")%>

The value this is returned is in the format domain\username

How can I change this so that it just returns the username and not the
domain?

Thanks,

Mintyman

P.S. I'm using ASP on IIS 6.0


TOPICS
Server side applications

Views

190
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 17, 2007 Apr 17, 2007

Copy link to clipboard

Copied

LATEST
You can't, as the domain is an integral part of identifying a user properly.
You can use Split, or a combination of Right and InStr to get just the user
name portion afterward, but the server variable will always have both.


"Mintyman" <mintyman@ntlworld.com> wrote in message
news:f022u9$ihh$1@forums.macromedia.com...
> Hi,
>
> I'm using the following code to reutrn the username of an authenticated
> user:
>
> <%=Request.ServerVariables("AUTH_USER")%>
>
> The value this is returned is in the format domain\username
>
> How can I change this so that it just returns the username and not the
> domain?
>
> Thanks,
>
> Mintyman
>
> P.S. I'm using ASP on IIS 6.0
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines