Deployment of Winform application (System Tray App) on Terminal Services or Citrix RRS feed

  • Question

  • Hi,

        I have created winform application(like system tray app). The application will be running continously in user machine like background way. I have  deployed  this winform application in Terminal server, the application running on each instance under Citrix user profile. Nearly 200 people using Citirix , Here I got issue like memory consumption. The memory of winform application is increasing high.

        I have read some article like NGEN.exe will reduce memory consumption in terminal service.

     Kindly guide me NGEN.exe approach is good for memory consumption (Terminal Service)  or any other approach is their to reduce memory of winform/standalone application in Citrix machine.


    Meenakshi Kabali

    Wednesday, December 10, 2014 1:38 PM


All replies

  • Hello Meenakshi,

    >>Kindly guide me NGEN.exe approach is good for memory consumption (Terminal Service)…

    You could check this blog which shows how to use the NGEN.exe to reduce the memory usage of managed application based on .NET Framework:


    Also you could this article which describes to use the AppDomain to reduce the memory usage of the managed application, I think it would be helpful:



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Fred Bao Monday, December 22, 2014 9:22 AM
    Thursday, December 11, 2014 3:28 AM
  • Hi Fred,

             I have created Native image for my winform application using Ngen and checked the application startup performance.but there is no difference in private data value.

    Using below syntax i have applied Ngen and verified the exe memory through task manager.

    ngen install <application.exe>

    It was created image successfully.but it does not help me to reduce performance(private data).

    Kindly explain me how Ngen reduce the performance of .net application.


    Meenakshi K

    Thursday, December 11, 2014 7:50 AM
  • Hi,

    >>Kindly explain me how Ngen reduce the performance of .net application.

    A detail explain for how the Ngen works to reduce the performance of .net application could find in this link:


    And search for "Ngen.exe Explained"

    Friday, December 12, 2014 9:32 AM