Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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.


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.



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.


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:
  1. On the first computer (DebugUserComputer1), click Start, point to All Programs, and then click Microsoft Visual Studio .NET.
  2. On the File menu, point to New, and then click Project.
  3. In the New Project dialog box, click Visual C# Projects under Project Types.
  4. Under Templates, click ASP.NET Web Application.
  5. 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 "Create User Accounts" section.)
  6. Open WebForm1.aspx in Designer.
  7. Double-click WebForm1.aspx to open the Code Editor window.
  8. Paste the following sample code in the Page_Load event:
    Response.Write("This is debug test");					
    
  9. 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 "Create User Accounts" section.)


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 "mmc %systemroot%\system32\inetsrv\iis.msc"

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.



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.


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.


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.


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


References


For more information about application pools, visit the following Microsoft Web site:

Internet Information Services
http://msdn2.microsoft.com/en-us/library/aa155133.aspx

For more information about recycling worker processes, visit the following Microsoft Web site: http://technet2.microsoft.com/WindowsServer/en/library/8ab11829-9e81-4853-a9d8-c251d6054bcd1033.mspx?mfr=true

For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
332088 How To Modify Application Pool Recycling Events in IIS 6.0
318041 How To Set Up and Use Remote Debugging in Microsoft Visual Studio .NET


↑ Back to the top


Keywords: KB817265, kbhowto, kbwebforms, kbwebserver, kbdebug, kbuser, kbhowtomaster

↑ Back to the top

Article Info
Article ID : 817265
Revision : 7
Created on : 12/3/2007
Published on : 12/3/2007
Exists online : False
Views : 559