J
jason
Hello everyone,
I am writing to discover if there is a way, through System libraries
or some other method, to acquire the name of the local machine from
within an object library DLL.
In case it is relevant, I have an object library DLL that performs a
generic "error handling" process for each exception that is thrown by
either itself, or by an application that is using the DLL. One of the
pieces of information that the generic error handling process expects
is the name of the machine that threw the exception.
I have found that machine name can easily be provided by the consuming
application reporting the exception. For example an ASP.NET website
can use the current HttpContext Server.MachineName property. However,
I'm not sure if there is a similar way to discover the local machine
name to report when the exception happens within the DLL itself, where
it may or may not have access to any of the HttpContext or
configuration settings that any particular subscribing application can
provide.
Thanks for any help,
Jason
I am writing to discover if there is a way, through System libraries
or some other method, to acquire the name of the local machine from
within an object library DLL.
In case it is relevant, I have an object library DLL that performs a
generic "error handling" process for each exception that is thrown by
either itself, or by an application that is using the DLL. One of the
pieces of information that the generic error handling process expects
is the name of the machine that threw the exception.
I have found that machine name can easily be provided by the consuming
application reporting the exception. For example an ASP.NET website
can use the current HttpContext Server.MachineName property. However,
I'm not sure if there is a similar way to discover the local machine
name to report when the exception happens within the DLL itself, where
it may or may not have access to any of the HttpContext or
configuration settings that any particular subscribing application can
provide.
Thanks for any help,
Jason