Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 285293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:31:59+00:00 2026-05-12T05:31:59+00:00

Exactly as per the title. Simply in my HomeController I have: string Username =

  • 0

Exactly as per the title.

Simply in my HomeController I have:

string Username = User.Identity.Name;

Why is this value always blank?

Is there something special I have to place in the web.config to get this value to come through. I’ve tried on both the VS dev web server as well as on a windows server 2003 IIS server.

It’s got to be something simple, a server setting in IIS or something as the code is so simple and seems to be the correct way to reference this value.

Thx a lot

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T05:32:00+00:00Added an answer on May 12, 2026 at 5:32 am

    Sure is mate. You need to authenticate with the website. That’s the name used for authentication.

    You are authenticating, right?

    It’s not a setting, etc.

    Click the LOG IN link, if you’re using the stock standard ASP.NET MVC template (if my memory serves me right).

    UPDATE (as the posted has added more info/comments)

    So what you’re after is Windows Authentication. A quick google search came up with this post. It’s pretty helpful (though a bit old, but still relevant) .. check that out.

    Found a better post with MVC code for Windows Authentication. Check that out instead.

    Config setting that is important, is…

    ...
     <system.web>
      ...
      <authentication mode="Windows"/>
      ...
     </system.web>
     ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Questions exactly like this have been asked before, i've read them all and tried
I have set up AuthLogic almost exactly as per the AuthLogic example app at
I know this isn't exactly programming related per se, but programmers are the most
I know this isn't exactly a programming question per se, but rather a settings
Say I have a tree defined as per the recommendation in this post ,
Exactly as the title says. I've created an @NodeEntity annotated POJO and in it
Exactly what the title says...........any thoughts on other good options for relational database implementation
I have two tables: regions <id> points <region_id, x, y> Assuming there are exactly
In the MVVM Pattern, is there exactly one ViewModel per View or is there
The error I get is exactly the error specified in: http://java.syntaxerrors.info/index.php?title=Own_file (class must be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.