Microsoft KB Archive/817265

= How To Set Up Multiple User Debugging in Internet Information Services (IIS) 6.0 =

Article ID: 817265

Article Last Modified on 12/3/2007

-

APPLIES TO


 * Microsoft ASP.NET 1.1
 * Microsoft Internet Information Services 6.0

-



IN THIS TASK

 * SUMMARY
 * Create User Accounts
 * Add User Accounts to the Appropriate Groups
 * Create ASP NET Web Applications
 * Create Application Pool
 * Assign Applications to the Application Pool
 * Configure a Worker Process Identity for an Application Pool
 * Debug
 * Troubleshoot
 * REFERENCES



SUMMARY
This step-by-step article describes how to set up multiple-user debugging of Microsoft Visual Studio .NET applications in semi-isolated mode under Internet Information Services (IIS) version 6.0.

back to the top

Create User Accounts
On the computer that you use as a common Web server, follow these steps to create user accounts:
 * 1) On the taskbar, click Start, point to Programs, point to Administrative Tools, and then click Computer Management.
 * 2) In Computer Management, expand System Tools, and then expand Local Users and Groups.
 * 3) Right-click Users, and then click New User.
 * 4) In the User Name text box, type DebugUser1.
 * 5) In the Password text box, and again in the Confirm Password text box, type the password for this account.
 * 6) Click to clear the User must change password at next logon check box.
 * 7) Click Create, and then click Close.
 * 8) To create another user that you name DebugUser2, repeat steps 1 through 7.

back to the top

Add User Accounts to the Appropriate Groups
To add user accounts to the correct groups, follow these steps on the computer that you use as a common Web server:
 * 1) Click Start. Point to Programs, point to Administrative Tools, and then click Computer Management.
 * 2) In Computer Management, expand System Tools, expand Local Users and Groups, and then expand Groups.
 * 3) Double-click Debugger Users.
 * 4) In the Debugger Users dialog box, click Add to add the DebugUser1 user to the Debugger Users group.
 * 5) In the Select Users or Groups dialog box, type ServerName\ DebugUser1 in the text box, click OK, and then click OK again.
 * 6) To add DebugerUser1 to other required groups such as IIS_WPG and VS Developers, repeat steps 3 through 5.
 * 7) To add the DebugerUser2 user to appropriate groups, repeat steps 1 through 6.
 * 8) Quit the Computer Management tool.

back to the top

Create ASP.NET Web Applications
To build a Web application project on the remote computer, and then to debug the Web application project, follow these steps on the computers that the debugger users use:  On the first computer (DebugUserComputer1), click Start, point to All Programs, and then click Microsoft Visual Studio .NET. On the File menu, point to New, and then click Project. In the New Project dialog box, click Visual C# Projects under Project Types. Under Templates, click ASP.NET Web Application. In the Location text box, type the URL of the remote server (for example, type http://commonWebServer/DebugApp1 ). Visual Studio .NET creates the solution. Use Debuguser1 credentials to host the application on common Web server. (See the &quot;Create User Accounts&quot; section.) Open WebForm1.aspx in Designer. Double-click WebForm1.aspx to open the Code Editor window.</li>  Paste the following sample code in the Page_Load event: Response.Write(&quot;This is debug test&quot;);                  </li> Repeat steps 1 through 8 to create another ASP.NET Web application project. Name the Web application project DebugApp2 on the DebugUserComputer2, and use DebugUser2 credentials to host the application on the common Web server. (See the &quot;Create User Accounts&quot; section.)</li></ol>

back to the top

Create Application Pools
An application pool is a configuration that links one or more applications to a set of one or more worker processes. Because applications in an application pool are separated by worker process boundaries, an application in one application pool is not affected by problems caused by applications in other application pools.

To create a new application pool, you must be a member of the Administrators group on the local computer, or you must delegate the appropriate authority. As a best practice, use an account that is not in the Administrators group to log on to your computer, and then use the Run as command to run IIS Manager as an administrator. At a command prompt, type the following command:

runas /user:administrative_accountname &quot;mmc %systemroot%\system32\inetsrv\iis.msc&quot;

Steps to Create a New Application Pool

 * 1) Click Start, point to Programs, and then click Control Panel.
 * 2) Double-click Administrative Tools, and then double-click Internet Information Services (IIS).
 * 3) Right-click Application Pool, point to New, and then click Application Pool.
 * 4) Type AppPool1 in the Application Pool ID text box.
 * 5) Click OK.
 * 6) Repeat steps 1 through 5 to create another application pool. Name that pool AppPool2.

back to the top

Assign Applications to the Application Pool

 * 1) Click Start, point to Programs, and then click Control Panel.
 * 2) Double-click Administrative Tools, and then double-click Internet Information Services (IIS).
 * 3) Double-click Web Sites.
 * 4) Double-click Default Web Site.
 * 5) Right-click DebugApp1, and then click Properties.
 * 6) Select AppPool1 in the ApplicationPool list box, and then click OK.
 * 7) Repeat steps 1 through 6 to assign the DebugApp2 application to AppPool2.

back to the top

Configure a Worker Process Identity for an Application Pool

 * 1) Click Start, point to Programs, and then click Control Panel.
 * 2) Double-click Administrative Tools, and then double-click Internet Information Services.
 * 3) Double-click Application Pools.
 * 4) Right-click AppPool1, and then click Properties.
 * 5) Click the Identity tab.
 * 6) Click Configurable.
 * 7) Click Browse, and then type the object name in the text box. Type the account name, DebugUser1 where you want your worker process to run, and then click OK.
 * 8) In the Password text box, type the password that is associated with this account.
 * 9) Click OK.
 * 10) Repeat steps 1 through 9 to configure DebugUser2 to AppPool2.

back to the top

Debug

 * 1) On DebugUserComputer1, open your DebugApp1 ASP.NET Web application project in Visual Studio .NET.
 * 2) Set break points in the code of the Page_Load event.
 * 3) On the Debug menu, click Start to hit the break point.
 * 4) On DebugUserComputer2, open your DebugApp2 ASP.NET Web application project in Visual Studio .NET.
 * 5) Set break points in the code of the Page_Load event.
 * 6) On the Debug menu, click Start to hit the break point.
 * 7) Verify that you can debug your applications DebugApp1 and DebugApp2 at the same time. Both of these applications are hosted on the common Web server.

back to the top

Troubleshoot

 * The remote computer and the local computer must be in the same domain when you add the user to the Debugger Users group.
 * You cannot enable remote debugging on two computers that run Microsoft Windows XP and that are part of a workgroup instead of part of a domain.
 * The Web.config file for the ASP.NET application must not contain any errors, and the compilation element must have a Debug attribute that is set to true.
 * You must install Visual Studio .NET remote debugging components on the remote computer.
 * In the Internet Options dialog box, set the security for this site to allow Integrated Windows authentication.
 * You can also set the security setting so that the site permits anonymous access. You must use a computer name, not an IP address, to refer to the remote computer.

back to the top

<div class="references_section">