Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2012-03-19
7
Medium Priority
?
368 Views
Last Modified: 2012-03-23
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?
0
Comment
Question by:IzzyTwinkly
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 37740191
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.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 37740196
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.
0
 

Author Comment

by:IzzyTwinkly
ID: 37740327
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.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 37741412
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

0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 37743689
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.
0
 

Author Comment

by:IzzyTwinkly
ID: 37745914
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?
0
 
LVL 29

Accepted Solution

by:
Gautham Janardhan earned 2000 total points
ID: 37745921
take a look at this http://msdn.microsoft.com/en-us/library/dd997001.aspx here at installapplication method you can do the check and return if from an invalid ip
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question