locked
Need help with start the app. RRS feed

  • Question

  • Hello.

    I create some app and is located on server place.
    I need, that the app can start only one user at the same time.
    Can you help me what is the easiest way to do that?

    Thanks


    Monday, January 18, 2010 11:23 AM

Answers

  • If the app is on a server, you need to save the current user in a file on the server, and this file must be verified every time the application starts: if the user is not the same, application exits (informing other user). When the app close, must delete the file on the server.
    If the file on the server is found but the date 'modified' is older than 'today', app can start as usually, overriding the file with the new user.
    please, mark this as answer if it is THE answer
    ----------------
    Diego Cattaruzza
    Microsoft MVP - Visual Basic: Development
    blog: http://community.visual-basic.it/Diego
    web site: http://www.visual-basic.it
    • Proposed as answer by jtorrecilla Monday, January 18, 2010 1:19 PM
    • Marked as answer by racito Tuesday, January 19, 2010 9:12 AM
    Monday, January 18, 2010 1:14 PM

All replies

  • Hi, you could do it with this steps:

    1 Right Click Solutions Name.
    2 Click on Properties
    3 When the tabs properties appears:
    There must be a checkbox "Convert to single instance application" or something similar...
    Check it and save changes...

    Si la respuesta te ha sido util Marcala como Respuesta o Votala.
    Mi Blog: Jtorrecilla
    Monday, January 18, 2010 12:02 PM
  • If the app is on a server, you need to save the current user in a file on the server, and this file must be verified every time the application starts: if the user is not the same, application exits (informing other user). When the app close, must delete the file on the server.
    If the file on the server is found but the date 'modified' is older than 'today', app can start as usually, overriding the file with the new user.
    please, mark this as answer if it is THE answer
    ----------------
    Diego Cattaruzza
    Microsoft MVP - Visual Basic: Development
    blog: http://community.visual-basic.it/Diego
    web site: http://www.visual-basic.it
    • Proposed as answer by jtorrecilla Monday, January 18, 2010 1:19 PM
    • Marked as answer by racito Tuesday, January 19, 2010 9:12 AM
    Monday, January 18, 2010 1:14 PM
  • Really good answer Diego!
    Si la respuesta te ha sido util Marcala como Respuesta o Votala.
    Mi Blog: Jtorrecilla
    Monday, January 18, 2010 1:19 PM