IntelliTrace On Production

Now you can use IntelliTrace Collector create IntelliTrace logs in your production environment where you don’t have visual studio Installed .

Collector supports the following Apps

  1. ASP.NET Web apps hosted on Internet Information Services (IIS) version 7.0, 7.5, and 8.0
  2. SharePoint 2010 and SharePoint 2013 applications
  3. Managed desktop apps (.exe files)

Lets see step by step now we can set up this in the production environment.

Step 1: Install Collector

1. In your server create a Folder. ex: C:\IntelliTraceCollector

2. Download the collector from Microsoft download center. Click Here

3. Copy the IntelliTraceCollector.exe to the folder created & run the IntelliTraceCollector.exe.

4. Then expand IntelliTraceCollection.cab

   I. Open windows command prompt as an administrator

   II. Go to collector directory. ex: cd C:\IntelliTraceCollector

   III. Run the following Command : “expand /f:* IntelliTraceCollection.cab .”

Step 2: Set Permission to collector Directory

Run the following command in the windows command prompt

icacls "C:\IntelliTraceCollector" /grant " <Domain\UserID> ":F

Step 3: Set Permission to collector Trace File Directory

I. Create a folder in you server which will create the trace files . ex: C:\IntelliTraceLog

II. Run the following command in the windows command prompt

icacls "C:\IntelliTraceLog" /grant "IIS APPPOOL\<app pool name>":F

Step 4: Set Permission to App Pool

Run the following command in the windows command prompt

icacls "C:\IntelliTraceCollector" /grant "IIS APPPOOL\<app pool name>":RX

Step 5: Import Intellitrace Powershell dll

I. Open windows power shell command prompt

II. Load the folder in your server which collector is installed

cd C:\IntelliTraceCollector

III. The import the dll by running the following command

Import-Module C:\IntelliTraceCollector\Microsoft.VisualStudio.IntelliTrace.PowerShell.dll

Step 6: Start IntelliTrace Collector

  • For Web applications & SharePoint Application

       Run the following command in PowerShell command prompt

       Start-IntelliTraceCollection "<app pool>" "C:\IntelliTraceCollector\collection_plan.ASP.NET.default.xml" "C:\IntelliTraceLog"

  • For Managed Applications

Run the following command in PowerShell command prompt

         C:\IntelliTraceCollector\IntelliTraceSC.exe launch /cp:"C:\IntelliTraceCollector\collection_plan.ASP.NET.default.xml" /f:"C:\IntelliTraceLog\MyApp.itrace" "C:\MyApp\MyApp.exe"

 

Now you Intellitrace will collect the data for you in you production environment. once you run you application trace file will be created in the log files folder which we created. copy that file in to developer machine, open it in visual studio & see where the issue is. When you open the trace file you will see something like below. So you can easily find where the issue is.

image

You can select any data row then the trace will point you to your code as below.

image

Which provides you rich debugger information in your production environment.

Happy Debugging !!!!!

Comments

  1. hi, thank yo for the blog.. I am stucking at step 5,

    Although I am using IIS 7 PS gives the error:
    PS : Start-IntelliTraceCollection "ASP.NET v4.0" "C:\IntelliTraceCollector\collection_plan.ASP.NET.default.xml" "C:\IntelliTraceLog"

    The term 'Start-IntelliTraceCollection' is not recogniized as the name of a cmdlet, function, script file, or operable program.

    plz guid me..

    Thanks

    ReplyDelete
    Replies
    1. Hi Ruwani,

      Thanx for you comment. I have missed one step. you have to follow the following step before starting the collector. I have updated the post as well. Thank you for pointing out.

      I. Open windows power shell command prompt

      II. Load the folder in your server which collector is installed

      cd C:\IntelliTraceCollector

      III. The import the dll by running the following command

      Import-Module C:\IntelliTraceCollector\Microsoft.VisualStudio.IntelliTrace.PowerShell.dll

      Delete

Post a Comment

Popular posts from this blog

Responsive Web Design

Contract First Development in WCF 4.5

Affine Cipher in C#