Installing and Configuring the .NET Profiler on Azure

To install the .NET profiler on Azure, follow the steps below:

  1. Login to the Azure portal.

  2. Figure 35 then appears. From the options listed at the top of Figure 35, select App Services, as indicated.

    Figure 35 : The Azure console

  3. Figure 36 will then appear listing the web applications deployed on the App Services platform. To deploy the .NET profiler, first locate the .NET application in the list of applications in Figure 36, and then click on it.

    Figure 36 : Click on the .NET application deployed on the App Services platform

  4. Figure 37 will then appear. Keep scrolling down the options listed in the left pane of Figure 37, until you find the Extensions option. Alternatively, you can type Extensions in the Search text box on the top of the left pane. Doing so, will automatically take you to the Extensions option. Once this option becomes visible, click on it.

    Figure 37 : Selecting the Extensions option

  5. Upon selecting the Extensions option from the left pane, the right panel will change to display the list of Extensions that pre-exist (if any). To add a new extension, click on the Add button in the right panel (see Figure 38).

    Figure 38 : Clicking on the Add button in the Extensions page

  6. This will invoke Figure 39. From the Choose Extension drop-down list in Figure 39, select the eG extension, eGEnterprise.dotNET.Azure.

    Figure 39 : Selecting the eG extension

  7. Then, click on the Accept legal terms option in the Legal Terms drop-down. Figure 40 will then appear. Click the OK button in Figure 40 to accept the legal terms.

    Figure 40 : Accepting the legal terms

  8. Figure 41 will then appear indicating that the Legal Terms have been Accepted. Click the OK button in Figure 41 to complete the extension creation.

    Figure 41 : Completing the Extension Creation

  9. Figure 42 will then appear displaying the eG extension that you created newly.

    Figure 42 : The newly created eG extension displayed in the Extensions page

  10. Next, go to the SCM web site of the .NET web application. For that, use the URL: https://<Name_of_web_application> For instance, if the .NET web application to be monitored is egdemoapp, then the SCM URL of the app will be:

  11. Figure 43 will then appear.

    Figure 43 : The SCM web site of the target .NET web application

  12. From the Debug console menu of Figure 43, select the Powershell option (see Figure 44).

    Figure 44 : Selecting the Powershell option from the Debug console menu

  13. Figure 45 will then appear. In Figure 45, follow the folder sequence: site/eG_dotNETBTM. Figure 46 will then appear, displaying the contents of the eG_dotNETBTM folder. Now, proceed to edit the eg_DotnetServer.ini file by clicking on the Edit icon (Pencil icon) corresponding to that file in Figure 45.

    Figure 45 : Viewing the folders

    Figure 46 : Viewing the contents of the eG_dotNETBTM folder

  14. Figure 47 will then appear displaying the contents of the eg_DotnetServer.ini file. Against the Agent_IP parameter that you will see in this file, specify the IP address of the eG remote agent the profiler should communicate with. Then, save the changes by clicking the Save button in Figure 47.

    Figure 47 : Editing the Agent_IP field value

  15. You will then return to Figure 46. Now, copy the eGHelperAssembly.dll file in the \site\eG_dotNETBTM folder to the \site\wwwroot\bin folder. For this, at the Powershell command prompt in Figure 46, issue the following command:


    Copy-Item -Path <Application_Install_Dir>\site\eG_dotNETBTM\eGHelperAssembly.dll -Destination <Application_Install_Dir>\site\wwwroot\bin


    For instance, if the target .NET application is installed in the D:\home folder, then the command to copy will be:


    Copy-Item -Path D:\home\site\eG_dotNETBTM\eGHelperAssembly.dll -Destination D:\home\site\wwwroot\bin


  16. Once the file is successfully copied, click on the Process Explorer option in the main menu of the Kudu console. Figure 48 will appear. Right-click on the w3wp.exe process displayed at the top of Figure 48 and select the Kill option from the shortcut menu that appears to kill that process.

    Figure 48 : Killing the w3wp.exe process

  17. Once the process is killed, send a request to the target .NET application.

How to Check if the eG .NET Profiler has been Successfully Deployed?

To check if the profiler has been successfully deployed, do the following:

  1. In the Process Explorer page of Figure 48, right-click on the w3wp.exe process and select the Properties option from the menu that pops out. Then, click on the Environment Variables tab page. This will invoke Figure 49.

    Figure 49 : The Environment Variables tab page

  2. In Figure 49, check if the COR_ENABLE_PROFILING variable is set to the value 1. Also, check if a GUID is displayed against COR_PROFILER. Also, see if the COR_PROFILER_PATH_32 and COR_PROFILER_PATH_64 variables display the path to the eGCLRMonitor.dll. If all the above are true, then you can conclude that the eG .NET Profiler has been installed successfully.