Link to home
Start Free TrialLog in
Avatar of IzzyTwinkly
IzzyTwinklyFlag for United States of America

asked on

How can I prevent my application from being installed on a specific server?

Hi,

I created a small application.  I am trying to publish it using Visual c# express 2010.
I know how to publish it, but I want to make sure that this application can't be installed on a specific server.  
For example, if a user tries to install this application to the server starts its ip with '19.1.1', I want the warning messeage box to be popped up and will not allow the installation.

Should I do something during the publishing process or code this to my application?

Can anybody please tell me how to do that step by step?
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

By publishing, do you mean you are using ClickOnce? You would need to add logic to application startup so that app can be installed but can not be run.
You probably need to do something in the installer.  But Ford has a lot of networks and the 19.1.1.x may be just public facing IPs and not internal ones.
Avatar of IzzyTwinkly

ASKER

Hi guys,

In Visual C# 2010 express, if you right click the project file from the Solution Explorer, 'Publish Wizard' is popped up.  I use this 'Publish Wiazrd'.  I don't know if there is better way.
Avatar of Gautham Janardhan
Gautham Janardhan

you can put an ip filter for the website / virtual dir you are deploying to which is easier i think. if you are doing it thru code.

if (ApplicationDeployment.IsNetworkDeployed)
            {
                // do check here
            }

Open in new window

You could put a routine in somewhere to go check "WhatismyIP.com" or some similar site...  That will get you the public IP that server is using.
Thanks guys,

I don't think that it's hard to make the application not to start in a specific server once it's installed.  
What I am trying to do is a little bit different.  I want to make a user can't even 'INSTALL' this application to a specific server.   Can anybody tell me more specific/detailed method for doing it?
ASKER CERTIFIED SOLUTION
Avatar of Gautham Janardhan
Gautham Janardhan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial