By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,346 Members | 2,339 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,346 IT Pros & Developers. It's quick & easy.

Problem with Environment.MachineName

P: n/a
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
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,

Maybe your ASP.NET account doesn't have permission to read environment
variables. Refer to:
http://msdn.microsoft.com/library/de.../en-us/cpref/h
tml/frlrfsystemenvironmentclassmachinenametopic.asp

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2

P: n/a
Ely
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.
"Natty Gur" <na***@dao2com.com> wrote in message
news:ug****************@TK2MSFTNGP09.phx.gbl...
Hi,

Maybe your ASP.NET account doesn't have permission to read environment
variables. Refer to:
http://msdn.microsoft.com/library/de.../en-us/cpref/h
tml/frlrfsystemenvironmentclassmachinenametopic.asp

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.