Solved

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

Posted on 2012-03-19
7
353 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
  • 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 82

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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
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 82

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 500 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now