Restart service - Terminal Services

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Re: Restart service - Terminal Services

    Interesting question... the answer is maybe... .NET, in general, has the
    ability to interact with services, provided that Identity Impersonation is
    turned on and using an account that has administrator rights to the server.
    Using this knowledge, you could stop and restart the TS Service from
    ASP.NET. The other thing you could do is to stop and start the process from
    the System.Diagnostics namespace.

    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskcreatingservicecontrollercomponentinstances.a sp[/url]

    HTH,
    Bill Priess
    eCircle Software, LLC

    "Justin Rich" <jrich@fhs.k12.nh.us.SPAM> wrote in message
    news:%2301Zu%23yODHA.3236@TK2MSFTNGP10.phx.gbl...
    > Since i have my server in a remote location i cant ever be at the keys.
    > Every now and then i will get disconnected twice from terminal services
    and
    > will be locked out. This is a pain to deal with because they dont ever
    seem
    > to time out.
    > Is there a way i can write an ASP page that will allow me to kick the
    > disconnected sessions off or a way to just restart the terminal service so
    > that it removes those sessions?
    >
    > Thanks
    > Justin
    >
    >

    Bill Priess Guest

  2. Similar Questions and Discussions

    1. Restart CF Services
      What would cause CF services to need to be restarted? Today ColdFusion services were taking up 99% and 49% of each of our two servers CPU cycles. ...
    2. terminal services
      i have installed terminal services on my network and i don't seem to be issuing any licenses other than the temporary ones is this the norm or...
    3. Cannot connect to Terminal Server via Terminal Services Manager after upgrade to Windows Server 2003
      The following error is displayed in the Terminal Services Manager on our domain controller (DC-01) when trying to connect to Terminal Services on...
    4. more than 2 terminal services on SBS 2K3?
      I have heard that you can setup more than 2 terminal services clients with SBS by downloading some software from MS? Is this true? This should...
    5. XP and Terminal Services
      I have a Win2000 laptop that I use to access a remote server via Terminal Services Client. When I try to access the same server, also through TSC...
  3. #2

    Default Re: Restart service - Terminal Services


    "Justin Rich" <jrich@fhs.k12.nh.us.SPAM> wrote in message
    news:%2301Zu%23yODHA.3236@TK2MSFTNGP10.phx.gbl...
    > Since i have my server in a remote location i cant ever be at the keys.
    > Every now and then i will get disconnected twice from terminal services
    and
    > will be locked out. This is a pain to deal with because they dont ever
    seem
    > to time out.
    > Is there a way i can write an ASP page that will allow me to kick the
    > disconnected sessions off or a way to just restart the terminal service so
    > that it removes those sessions?
    >
    tsdiscon.exe will do this

    RUN
    tsdiscon 1 /SERVER:MYSERVER
    tsdiscon 2 /SERVER:MYSERVER

    To kick disconnect sessions 1 and 2. Be careful on XP you can disconnect
    your own session.

    David


    David Browne Guest

  4. #3

    Default Re: Restart service - Terminal Services

    Other then i cant list them (guess i dont need to) that works great..
    I will just enable telnet server.. and use that...
    the other day i ran in to a bit of a deadlock..
    i managed to screw up IIS which stopped all ASP scripts.. and i couldnt fix
    it.. cuz i couldnt use terminal server...
    so i think telnet will be my backup option..

    Thanks
    Justin

    "David Browne" <davidbaxterbrowne no potted [email]meat@hotmail.com[/email]> wrote in
    message news:ehnXcFzODHA.4024@tk2msftngp13.phx.gbl...
    >
    > "Justin Rich" <jrich@fhs.k12.nh.us.SPAM> wrote in message
    > news:%2301Zu%23yODHA.3236@TK2MSFTNGP10.phx.gbl...
    > > Since i have my server in a remote location i cant ever be at the keys.
    > > Every now and then i will get disconnected twice from terminal services
    > and
    > > will be locked out. This is a pain to deal with because they dont ever
    > seem
    > > to time out.
    > > Is there a way i can write an ASP page that will allow me to kick the
    > > disconnected sessions off or a way to just restart the terminal service
    so
    > > that it removes those sessions?
    > >
    >
    > tsdiscon.exe will do this
    >
    > RUN
    > tsdiscon 1 /SERVER:MYSERVER
    > tsdiscon 2 /SERVER:MYSERVER
    >
    > To kick disconnect sessions 1 and 2. Be careful on XP you can disconnect
    > your own session.
    >
    > David
    >
    >

    Justin Rich Guest

  5. #4

    Default Re: Restart service - Terminal Services


    "Justin Rich" <jrich@fhs.k12.nh.us.SPAM> wrote in message
    news:ukHXaG1ODHA.560@TK2MSFTNGP10.phx.gbl...
    > Other then i cant list them (guess i dont need to) that works great..
    > I will just enable telnet server.. and use that...
    > the other day i ran in to a bit of a deadlock..
    > i managed to screw up IIS which stopped all ASP scripts.. and i couldnt
    fix
    > it.. cuz i couldnt use terminal server...
    > so i think telnet will be my backup option..
    >
    You can just run it from ASPX like this


    Dim p As New System.Diagnostics.Process()
    p.StartInfo = New System.Diagnostics.ProcessStartInfo()
    p.StartInfo.FileName = "cmd.exe"
    p.StartInfo.Arguments = "/c c:\discon.cmd"
    p.Start()
    p.WaitForExit()

    David


    David Browne Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139