Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 14 of 14
  1. #1
    New Coder
    Join Date
    Feb 2007
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation login user name error

    i am trying to get the login user name but i am getting error

    my code is


    <%@ Language=VBScript %>
    <HTML>
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    </HEAD>
    <BODY>

    <P>&nbsp;</P>

    <% Response.Write Request.ServerVariables("LOGON_USER")
    Response.Write Request.ServerVariables("AUTH_USER") %>

    </BODY>
    </HTML>



    the error is like this

    Error Type:
    Microsoft VBScript compilation (0x800A0408)
    Invalid character
    /survey/testusername.asp, line 11, column 51


    by the way if i comment the second statement (Response.Write Request.ServerVariables("AUTH_USER"))

    i ll not get error and also nothing will be displayed in the browser.

  • #2
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    Are you running this off localhost?

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #3
    SSJ
    SSJ is offline
    Regular Coder
    Join Date
    Mar 2007
    Posts
    230
    Thanks
    0
    Thanked 4 Times in 4 Posts

  • #4
    New Coder
    Join Date
    Feb 2007
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation

    Quote Originally Posted by nikkiH View Post
    Are you running this off localhost?
    no am not running on local host , am accessing my asp page ( my asp page in a windows 2000 server )

    and am one of the clients to this server


    am accessing like this

    http://172.31.31.50/test/usernametest.asp

    where 172.31.31.50 is my server ip address

  • #5
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    Okay, and that machine is set up for authentication? And the web site is set up in IIS to use that authentication?

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #6
    New Coder
    Join Date
    Feb 2007
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Authentication

    Quote Originally Posted by nikkiH View Post
    Okay, and that machine is set up for authentication? And the web site is set up in IIS to use that authentication?
    thanks alot for your reply , but what i have to do now , shall i disable the authetication , but am able to enter the asp pages without any authenication ,

    which authentication you mean , ??????????????? and how to disable that ????

  • #7
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    AUTH_USER is authentication. That's what you're doing here.
    This variable is mostly meant for intranet applications, as it uses integrated windows authentication. Most home users do not log into a network, domain, or even their computer.
    So, I'll assume this is an intranet app.

    Your site must not be using anonymous access (IIS) for this to work (turn it off if it is on).
    IIS must be set to use Integrated Windows Authentication (turn it on if it is off).
    Internet Explorer must be set to see the intranet site as safe or it won't send the credentials. Add the site to Trusted if it is not there.

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #8
    New Coder
    Join Date
    Feb 2007
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Login user name

    Quote Originally Posted by nikkiH View Post
    AUTH_USER is authentication. That's what you're doing here.
    This variable is mostly meant for intranet applications, as it uses integrated windows authentication. Most home users do not log into a network, domain, or even their computer.
    So, I'll assume this is an intranet app.

    Your site must not be using anonymous access (IIS) for this to work (turn it off if it is on).
    IIS must be set to use Integrated Windows Authentication (turn it on if it is off).
    Internet Explorer must be set to see the intranet site as safe or it won't send the credentials. Add the site to Trusted if it is not there.





    by the way i have disabled the Anonymous Access in the IIS
    but it makes problem to me because the dllhost.exe has been increased and my cpu usage reached 100 and this leads to hanging and slowing of the system , ( but i can get the login user) and also the users will be asked everytime for authentication when they access the pages.

    and if i disabled the Anonymous access in the IIS, the performace will be good but i ll not get the login username

    Please help me in that

  • #9
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    Is this an intranet site?
    Machine/server specs?

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #10
    New Coder
    Join Date
    Feb 2007
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation network login user name

    Quote Originally Posted by nikkiH View Post
    Is this an intranet site?
    Machine/server specs?
    yes it is intranet site ,
    the specification of my server
    p-4 3000 mhz
    ram 512
    os is windows 2000 server ,
    i need to get the network login user name by anyway ,

  • #11
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    Hmmm...
    You have Integrated Windows Authentication checked, right?
    This is IIS 6?

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #12
    New Coder
    Join Date
    Feb 2007
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation login user name error

    Yes it is checked
    am using IIS 5
    please reply me with detailed anwer,thanking your cooperation
    Quote Originally Posted by nikkiH View Post
    Hmmm...
    You have Integrated Windows Authentication checked, right?
    This is IIS 6?

  • #13
    New Coder
    Join Date
    Feb 2007
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation network login user name

    Till Now , I Did Not Get The Answer For My Questions,

    Please Any One Knows How To Solve My Problem And Help Me, Very Very Urgent

  • #14
    Senior Coder
    Join Date
    Nov 2002
    Location
    North-East, UK
    Posts
    1,265
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The error is because you have an invalid character in the variable.

    What happens if you use Server.HTMLEncode around the variable?

    if that doesn't help then it is something to do with your computer or account name that you are trying to authenticate.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •