473,378 Members | 1,419 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Preventing an application from being started from another computer

Is there a way to set the security for a .net application so that it can
only be run on the machine were it is installed?

I would like to prevent users from being able to start the application by
navigating to a shared drive on the computer where the program was installed
and starting it using the shortcut or exe installed on the host computer.

thanks,

Dennis
Nov 15 '05 #1
6 1479
Dennis,

You should be able to apply the ZoneIdentityPermission attribute to the
entry point of your application. You can pass the MyComputer value from the
SecurityZone enumeration to the constructor of the attribute. Once you do
that, your application should only run when executed from the local machine.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Dennis C. Drumm" <de*******@primacode.com> wrote in message
news:ex**************@TK2MSFTNGP09.phx.gbl...
Is there a way to set the security for a .net application so that it can
only be run on the machine were it is installed?

I would like to prevent users from being able to start the application by
navigating to a shared drive on the computer where the program was installed and starting it using the shortcut or exe installed on the host computer.

thanks,

Dennis

Nov 15 '05 #2
Hi Dennis,

Maybe you could write something to the registry during installation. When
the user tries to start the application from another system it won't find
this registry entry and fail. There might be better ways though.

Happy coding!
Morten

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 15 '05 #3
Nicholas:

That sounds like it would work, but after doing some reading, the how of it
still escapes me! I will keep at it, but if you could provide a little more
information or an article that discusses this issue it would be greatly
appreciated.

Dennis

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:uZ*************@TK2MSFTNGP09.phx.gbl...
Dennis,

You should be able to apply the ZoneIdentityPermission attribute to the entry point of your application. You can pass the MyComputer value from the SecurityZone enumeration to the constructor of the attribute. Once you do
that, your application should only run when executed from the local machine.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Dennis C. Drumm" <de*******@primacode.com> wrote in message
news:ex**************@TK2MSFTNGP09.phx.gbl...
Is there a way to set the security for a .net application so that it can
only be run on the machine were it is installed?

I would like to prevent users from being able to start the application by navigating to a shared drive on the computer where the program was

installed
and starting it using the shortcut or exe installed on the host computer.
thanks,

Dennis


Nov 15 '05 #4

Hi Dennis,

Thank you for posting in the community!

Just as Nicholas's solution, you need just apply the
ZoneIdentityPermissionAttribute to the entire assembly like this:
[assembly:ZoneIdentityPermissionAttribute(SecurityA ction.RequestMinimum
,Zone=SecurityZone.MyComputer)]

======================================
Please apply my suggestion above and let me know if it helps resolve your
problem.

Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #5
Jeffrey:

Thanks, that is what I needed.

I'm still a little confused by the syntax though. The MSDN
documentation for the ZoneIdentityPermissionAttribute constructor only
takes one argument. The ", Zone = SecurityZone.MyComputer" in the argument
list is hanging me up.

Could you explain what is going on here. (I know this will probably turn out
to be embarrassing!)

Thanks,

Dennis

"""Jeffrey Tan[MSFT]""" <v-*****@online.microsoft.com> wrote in message
news:4c**************@cpmsftngxa06.phx.gbl...

Hi Dennis,

Thank you for posting in the community!

Just as Nicholas's solution, you need just apply the
ZoneIdentityPermissionAttribute to the entire assembly like this:
[assembly:ZoneIdentityPermissionAttribute(Security. Request
,Zone=SecurityZone.MyComputer)]

======================================
Please apply my suggestion above and let me know if it helps resolve your
problem.

Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Nov 15 '05 #6

Hi Dennis,

Thanks very much for your feedback.

I am glad it works. :-)

Actually, for an attribute, the first is the constructor of the attribute,
while the following fields are its properties.

If you have any further concern, please feel free to post, we will help
you. thanks.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Mark Fisher | last post by:
I have a Java desktop GUI application that the user can run multiple times. In order to keep one instance of the application distinct from another, I'd like to put the instance number of the...
5
by: VinnieT | last post by:
I have a load balanced system that consists of 3 production servers. There are about 20 different applications that are used on these boxes. One of my applications in particular is used more than...
2
by: johnmann56 | last post by:
Hello. I have written a simple image viewer application using C# .NET. It only needs to display one image at a time. When a different program, in C, running on the same machine, does a...
8
by: alanstew | last post by:
With the body tag calling out 'window onload', a function with a 'window.open' fails at the 'window.open' line. If I cut out the body tag, the function executes as normal. At first I thought it...
1
by: Paul | last post by:
I am trying to test out an installed web application, used visual studio to create a MSI file (windows installer program). I then copied the program to a disk and onto another computer. The...
10
by: et | last post by:
I have an asp.net program that uses a connection string, using integrated security to connect to a sql database. It runs fine on one server, but the other server gives me the error that "Login...
16
by: Fred | last post by:
hi, is there some way to prevent(at least for not so advanced users) image saving on local disk; currently i use javascript which handles the right mouse button click, but all it takes is to...
9
by: jeff | last post by:
Hi All. I realize that when my Deployed winforms application starts, Windows needs to load the .net 2 framework before control is given to my application.... Is there anyway to either ... -...
22
by: Mark Rae | last post by:
Hi, I'm using the following example for this: http://www.yoda.arachsys.com/csharp/faq/#one.application.instance which works perfectly on Vista, but not on XP... Doesn't throw any errors,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.