Problem with Environment.MachineName

  • Thread starter Thread starter Ely
  • Start date Start date
E

Ely

When I call the Environment.Machinename to try to get the local machines
name, I get a "Object reference not set to an instance of an object" error.
This same code works fine on my local machine, it just started having
problems when i rolled it out to a production machine.

Thanks
 
This was from a windows service, not asp.net.

However, I did find the answer to my problem. The computer had netbios
disabled. Once I re-enabled netbios, the command worked fine.

Thanks for the response.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top