Solved

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

Posted on 2012-03-19
7
359 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 83

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
The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

 
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 83

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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to remove duplicate code from my project 5 37
SSIS Start 2 21
Amazon S3 Images with .Net 3 15
Why use this lambda? 12 39
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

820 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