Installing and Configuring the .NET Profiler for Microsoft SharePoint Running as a Service Inside IIS

To install the .NET profiler for Microsoft SharePoint that is running as a service inside IIS, follow the steps below:

  1. Login to the target IIS web server.
  2. Before attempting to install the profiler, you will have to add a new entry to the IIS registry. For that, follow the steps below:

    • First, go to the Registry Editor (regedit).
    • Under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework, create a new DWORD "LoaderOptimization" with value 1.
    • Then, under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\, create a new DWORD "LoaderOptimization" with value 1.

      These configurations disable loader optimization assemblies, which may interfere with profiler operations.

    • Finally, restart the IIS web server.
  3. Then, log back into the IIS web server. From the command-prompt, switch to the <EG_AGENT_INSTALL_DIR>\lib directory.
  4. Now, issue the following command from that location:

    run SetupDotNetProfiler.bat

  1. Once the batch file begins execution, the following messages will appear:


    *** Setting up Registry values for the Profiler ***


    Modifying the W3SVC service's Environment variables

    Modifying the WAS service's Environment variables


  1. If setup detects that a profiler (this can be an eG;s .NET profiler or any third-party profiler such as NewRelic) pre-exists on the host, then the following message will appear:

    There is another profiler found in registry




    Setup will then prompt you to confirm whether you want to proceed with the installation or not.

    Do you wish to continue setup <yes/no> : yes

    If you specify yes here, then setup will try to overwrite the GUID presently registered with the COR_PROFILER registry key with the GUID of the eG Enterprise profiler. If the GUID is overwritten successfully, then a message to that effect will appear.


    RegValues are modified Successfully ***


  1. If setup is successful, then the following messages will appear:

    Registering the Profiler.

    Installing assembly in Cache...

    Helper assemblies Installation Successful

    Applying required permissions for eGurkha directory.

  1. Finally, restart the IIS web server by issuing the iisreset command at the prompt. This will restart all the web sites and web applications on that IIS web server. If you would rather have the monitored web sites / web applications alone to be restarted, do the following:

    • Open the Internet Information Services (IIS) Manager (see Figure 6).

      Figure 6 : The IIS Manager console

      • Expand the Sites node in the tree-structure in the left panel of Figure 6, and select the sub-node representing the web site / web application you are monitoring. Right-click on that sub-node, move your mouse pointer over Manage Website in the shortcut menu that appears, and pick the Advanced Settings option (see Figure 7).

      Figure 7 : Selecting the Advanced Settings option

      • Figure 8 will then appear. From Figure 8, you can figure out which Application Pool manages the target web site / web application.

      Figure 8 : The Advanced Settings page

      • Then, click the Cancel button in Figure 8 to return to the IIS Manager console.
      • Next, click the Application Pools node in the tree-structure in the left panel of the IIS Manager console (see Figure 9). The right panel will then display all the Application Pools on that IIS web server. Browse the list to locate the Application Pool to which the target web site / web application belongs - i.e., the Application Pool displayed in Figure 8.

      Figure 9 : Locating the Application Pool to which the target web site/web application belongs

      • Right-click on that Application Pool and select the Recycle option from the short-cut menu that appears (see Figure 10). Doing so will restart only those web sites / web applications managed by that application pool.

      Figure 10 : Recycling the application pool to which the target web site/web application belongs