Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6868643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:27:34+00:00 2026-05-27T03:27:34+00:00

Is it possible to restart server from ASP.NET application that is hosted by LocalSystem

  • 0

Is it possible to restart server from ASP.NET application that is hosted by LocalSystem or LocalService account? This is working when I create custom administrative account and put AppPool to run under that account:

Process.Start("shutdown", "/r /d 4:1 /t 10");

However, I don’t want to have custom accounts (because of password expiry and need to update all AppPools when User passwords are changed – I need to maintain multiple servers).

So, is this possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:27:35+00:00Added an answer on May 27, 2026 at 3:27 am

    You can always start the process with a different identity that can restart the server:

    var info = new ProcessStartInfo("shutdown.exe", "/r /t 0");
    info.UserName = "accountWithAdminPermissions";
    //A not-so-secure use of SecureString
    var secureString = new SecureString();
    var password = "abc123";
    foreach (var letter in password)
    {
        secureString.AppendChar(letter);
    }
    info.Password = secureString;
    var restart = new Process();
    restart.StartInfo = info;
    restart.Start();
    

    If you just want to give a non-Administrative account the permission to restart the server:

    1. Open secpol.msc.
    2. Navigate to Local Policies\User Rights Assignment.
    3. Find Shutdown The System.
    4. Add the account.

    This might be a good way of using an account for least privilege. That way you don’t have to use a really big hammer like an account in the Administrator group.

    Shutdown.exe (I believe) always requires Administrator permissions. You can refer to this MSDN post on restarting the server without shutdown.exe.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know if it is possible to restart a J2EE application (from the
For a web application I switched from using ASP.NET Membership to using my own
Is it possible to re-write this query to restart numbering when the UName changes
Sometimes I edit a file that represents a server restart. I would like to
Unfortunately, GAE requires restart of the server on each code change. Is it possible
I have a strange situation on a production server. Connection for asp.net get queued
Is there any way to restart the CF server through the Application.cfc, when the
I am stuck with asp.net post issue with last 2 weeks. Scenario: My application
I've been trying to create a C# ASP.NET page which sits on a Windows
What would be the possible causes for the below exception on resin server restart?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.