1. By default, ASP.NET runs its worker process (Aspnet_wp.exe) with a weak account (the local machine account, which is named ASPNET) which don't have permission to interact with desktop.
2. By default, IIS Admin Service won't allow its application to interact with desktop.
1. Give permission for ASP.NET worker process account (<localmachine>\ASPNET) to interact with desktop or allow ASP.NET worker process to run in SYSTEM account.
To know how to allow worker process to run in SYSTEM account and to know the default permissions of ASPNET account, check this article
2. Enable IIS Admin Service to interact with desktop
To configure this, follow this steps.
a. Open Control Panel and follow these steps:
For Windows NT: click Services.
For Windows 2000, Windows XP, and .NET Server: click Administrative Tools, and then click Services.
b. Double-click IIS Admin Service.
c. On the Log On tab, select the Allow Service to Interact with Desktop check box.
Note: This article assumes that the IIS Admin Service runs as a local system.
d. Stop and restart the IIS Admin Service.
1. In Microsoft Visual Studio .NET, create a new ASP.NET Web Application project by using Visual Basic .NET or Visual C# .NET. Name the project
CreateProcess. By default, WebForm1.aspx is created.
2. Right-click WebForm1.aspx, and then click View Code.
3. Modify the Page_Load event as follows :
Visual C# .NET Sample Code
private void Page_Load(object sender, System.EventArgs e)
Visual Basic .NET Sample Code
Private Sub Page_Load ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
4. On the Build menu, click Build Solution.
5. Type the following URL in the browser:
Article ID: 555134 - Last Review: Feb 14, 2017 - Revision: 1