Hi Ken,
From your description, you have developed an ASP.NET web application and
since your application will have many disk I/O accessing operations in the
application(whi ch seriouly coupled with the machine's physical disk, path
structure), you're wondering a flexible way to make your application avoid
changing when deploy over different servers, correct?
Based on my experience, for ASP.NET application(or other .net
applications) that will deal with some machine specific (or changable)
things, it is a good practice to store those changable info in application
configuration file. Thus, we can modify and customize the configuration
file whenever deploy to a new server box.
For your scenario, you mentioned that
=============
If my apps could reliably (and efficiently) identify what server they were
running off of, they could pick out the right settings for a particular
server.
=============
would you give some further explanation on this? Do you mean you need to
programmtically get the current machine's name or you want the server
configuratino info of the current machine? .NET's built-in class
"System.Environ ment" has provide some static members give us some data of
the current machine(such as MachineName and SpecialFolders. ..). For other
machine specific info, you may use WMI interface to query some certain info
you want.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.