You are currently offline, waiting for your internet to reconnect

Change in TSAware Flag Behaviour in .NET Framework 3.5 SP1

From Microsoft .Net 3.5 Framework SP1 onwards, the TSAWARE flag is set ON by default in the PE header of the image produced by the included C# and Visual Basic. NET compilers. This can be verified by running dumpbin on any C#/ assembly built using those compilers as shown below,

Dumpbin /Headers <assembly_name>.exe(dll)

Sample output:
8540 DLL characteristics
       Dynamic base
       NX compatible
       No structured exception handler
       Terminal Server Aware

 Note: dumpbin.exe is included in the Windows SDK and is also installed with Visual Studio.

 For Microsoft Visual C++ projects, this flag can be edited through Visual Studio IDE as follows:

  1. Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties. 
  2. Click the Linker folder.
  3. Click the System property page.
  4. Modify the Terminal Server property.

And for C#/VB.Net projects, you will have to use editbin.exe tool (since the respective compiler dont have the switch) :

1. Open up Visual Studio command prompt
2. Editbin /TSAWARE:NO <FileName>

Note: If your assembly is strong named, modifying it using editbin will invalidate the strong name. Instead you would need to use delayed  signing and strong name it after using editbin.

More Information

As per the TSAWARE MSDN documentation , when an application is not Terminal Server aware (also known as a legacy application), Terminal Server makes certain modifications to the legacy application to make it work properly in a multiuser environment. For example, Terminal Server will create a virtual Windows folder, such that each user gets a Windows folder instead of getting the system's Windows directory. This gives users access to their own INI files. In addition, Terminal Server makes some adjustments to the registry for a legacy application. These modifications slow the loading of the legacy application on Terminal Server.

It is recommended that you update your application to be TSAWARE and not modify this flag.

Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Article ID: 2229865 - Last Review: 06/22/2010 21:28:00 - Revision: 1.0

Microsoft .NET Framework 3.5 Service Pack 1

  • KB2229865