Do not want application to run on server

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm developing a C# application that I want to run on standalone computers,
but not from a server or network. Is there a way on starting the application
that I can check if the application is on a server and stop it from running?
Thanks.
 
pcad1 said:
I'm developing a C# application that I want to run on standalone
computers,
but not from a server or network. Is there a way on starting the
application
that I can check if the application is on a server and stop it from
running?
Thanks.

check out this link
http://www.csharpfriends.com/dotnet/top/configuration/operation_system_name_and_version.aspx
it shows how to use the System.OperatingSystem object to get the version
major and minor and determine the system it is on. You could determine if
it is on one of those servers and stop the app.
 
Do you mean that you don't want the user to be able to install the app on a
file share and run it over a network?
You can access the directory where the app is running from and then ask the
OS if the drive is a networked share. If so, stop.

--- Nick
 
Nick,

This is exactly what I would like to do. Easy enuf to access the directory
where app is running but what CODE is used to "ask the OS if the drive is a
networked share"? Specific code would be very helpful. Thanks again.
 
Back
Top