dotMemory 2017.2 Help

Profile ASP Web Site

Typically, determining memory issues in a web application is required when it is already running on a server. In this case, you have two options:

Note that in both cases, to perform profiling you must have administrative rights on the web server.

To remotely profile an ASP web site hosted on a IIS server:

  1. On the web server, do the following:
    • Copy the RemoteAgent.zip archive from the dotMemory installation directory on your local computer (by default, C:\Users\[username]\AppData\Local\JetBrains\Installations\dotMemory[N]) to any directory on the server.
    • Unpack the archive on the server.
    • Start RemoteAgent.exe from the console on the server.
    • Ensure that inbound connections to Remote Agent are not blocked by the firewall.
  2. On the local computer, run dotMemory as a standalone application. The dotMemory window will open.
  3. In the right panel, choose the New Session | Remote tab.
  4. In the central panel, specify the address of the remote agent service in Remote Agent URL.
    By default, the URL is net.tcp://[remote_computer_IP_address]:9100/RemoteAgent.
  5. Click Connect to establish connection with the remote host.
  6. In the central panel, in Attach to Running Application select the w3wp.exe process that corresponds to the app pool running the profiled application.
  7. Optionally, if you are going to control profiling session (take snapshots, end session, and so on) using the API (rather than the Controller window), select Control profiling via API. For more details on how to control profiling using the API, refer to the Controlling Profiling Session Through API chapter.
  8. In the right panel, click Run.
  9. Take snapshots. For more details on how to control profiling session, refer to Controlling Profiling Session (if you control the session manually) or to Controlling Profiling Session Through API (if you control profiling using the API).
  10. After you collect the data, detach the profiler from the app pool using the Detach button of the Controller window.
  11. Analyze the collected snapshots.
    Note that as you profile an app pool, you will see large amount of native code in the snapshot.

To locally profile an ASP web site hosted on a IIS server:

  1. Install dotMemory on the web server.
  2. Run dotMemory as a standalone application. The dotMemory window will open.
  3. In the right panel, choose the Local tab.
  4. In the central panel, in Profile Application select IIS.
  5. In the right panel, in Application Options, turn on Open URL and specify the URL of the profiled application. If you do not do this, dotMemory will start profiling of the first running application pool.
  6. If you want dotMemory to start collecting the stack trace allocation data* right after the profiling session starts, turn on the Start collecting allocation data immediately option in the right panel.
    For more details on profiler options, refer to the Profiler Options section.
  7. Optionally, if you are going to control profiling session (take snapshots, end session, and so on) using the API (rather than the Controller window), select Control profiling via API. For more details on how to control profiling using the API, refer to the Controlling Profiling Session Through API chapter.
  8. Click Run. Note that after you do this, the IIS service and, as a consequence, the profiled application pool will be restarted.
  9. Take snapshots. For more details on how to control profiling session, refer to Controlling Profiling Session (if you control the session manually) or to Controlling Profiling Session Through API (if you control profiling using the API).
  10. After you collect the data, detach the profiler from the app pool using the Detach button of the Controller window.
  11. Analyze the collected snapshots.
    Note that as you profile an app pool, you will see large amount of native code in the snapshot.
Last modified: 14 December 2017