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 5958699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:34:50+00:00 2026-05-22T18:34:50+00:00

On Localhost my username is ‘MTA’ when calling this code: string opl = HttpContext.Current.User.Identity.Name.ToString();

  • 0

On Localhost my username is ‘MTA’ when calling this code:

string opl = HttpContext.Current.User.Identity.Name.ToString();
TextBox1.Text = opl.Substring(opl.IndexOf(@"\") + 1);

OR this code:

string opl = System.Environment.UserName.ToString();
TextBox1.Text = opl.Substring(opl.IndexOf(@"\") + 1);

But after publishing and accessing the website from a Windows Server. My username is now ‘SRVCMAN’.

  • 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-22T18:34:50+00:00Added an answer on May 22, 2026 at 6:34 pm

    I believe you are looking for implementing Windows Authentication Mode.
    Refer to the following articles and read about it:

    • How To: Use Windows Authentication in ASP.NET 2.0
    • Explained: Windows Authentication in ASP.NET 2.0
    • How to implement Windows authentication and authorization in ASP.NET
    • Authenticating Users with Windows Authentication
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://localhost:50034/Admin/Delete/723 Always needs this parameter to perform the action, however, if you go to
I am getting the following error: Access denied for user 'apache'@'localhost' (using password: NO)
For testing purposes I want send mail to my localhost user account rather than
My javascript paths work on this page: http://localhost:53049/ But not on this page: http://localhost:53049/Home/Messages
http://localhost/XYZ/Client/(S(enlodz55ov4ncafza0gpp045))/Info/Rates.aspx Does anyway know what /(S(enlodz55ov4ncafza0gpp045))/ means? Any help appreciated.
Is it always possible to ping localhost and it resolves to 127.0.0.1? I know
I am not able to access localhost https pages in firefox3. It gave the
I want to create a new net.tcp://localhost:x/Service endpoint for a WCF service call, with
I have IIS6 configured such that browsing to http://localhost:8082/Reports gets me the reporting services
Is it possible to run SQL Server 2005 on localhost, with a schema of

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.