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

  • Home
  • SEARCH
  • 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 5846879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:38:21+00:00 2026-05-22T12:38:21+00:00

I am chasing a strange error at a customer site and was wondering if

  • 0

I am chasing a strange error at a customer site and was wondering if it is possible that Environment.MachineName could return a zero length string. The docs say this is read from the registry but doesn’t specify where. I can’t imagine that a machine cannot have a netbios name but just wanted to ask.

EDIT

After some investigation, it appears that this was not returning a zero length string, but I was just interested if it is feasible.

  • 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-22T12:38:22+00:00Added an answer on May 22, 2026 at 12:38 pm

    I don’t know if it can be an empty string, sorry, but concerning the registry you might want to check the following (and subkeys):

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ActiveComputerName
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerName
    

    On my system it is actually looking at HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ActiveComputerName\ComputerName:

    enter image description here

    BTW, as you can see I tried to figure this out using SysInternals Process Monitor, but initially failed. Then i figured, that the above keys (and some related ones) are suppressed by default. Just in case you try the same be aware of that.

    You might also check the value of the %COMPUTERNAME%. Although I have no reference or direct evidence, I would assume that it gets its value from the same source.

    I know this is not a real answer to your question, but it wouldn’t fit in a comment either.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm chasing a production bug that's intermittent enough to be a real bastich to
It seems to me that a lot of my debugging time is spent chasing
I'm chasing a bug in Perl code that seems to fundamentally be a version
While chasing incremental build time improvements, I found that .btproj files and thus all
How do I know if I am overanalysing? I've been chasing a problem the
Chasing down some DB performance issues in a fairly typical EclipseLink/JPA application. I am
I recently spent some time chasing an annoying little bug and I'm looking for
While Joel Spolsky thinks that every bug should be fixed before new code is
So I'm chasing down the non-secure item on my page. I am using the
I have a bug I am chasing (I think its a deadlock). When I

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.