none
.Net Application with TSAWARE flag set to NO RRS feed

  • Question

  • I have .net application that has TSAWARE:NO set with editbin.exe.

    The problem is that application crash on some Windows 2016 servers with:
    Fault Module Name: ntdll.dll
    Exception Code: c0000409

    If I remove this flag, my application starts normally.

    On all other OS, application with this flag works without problem.

    What could cause this issue? Is there some update or workaround for this?


    • Edited by iz111 Tuesday, November 7, 2017 12:59 PM
    Tuesday, November 7, 2017 12:58 PM

All replies

  • Hi iz111,

    Thank you for posting here.

    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.

    Normally, the value of flag is set to ON. When it works well in another OS, what is the flag value? You could verify by running dumpbin on any C#/VB.net assembly built using those compilers as shown below. 

    Dumpbin /Headers <assembly_name>.exe(dll)

    For more details, please refer to the following link.

    https://support.microsoft.com/en-us/help/2229865/change-in-tsaware-flag-behaviour-in--net-framework-3-5-sp1

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Wednesday, November 8, 2017 7:56 AM
    Moderator
  • The TSAWARE value flag is set to NO. It is set using this command:

    editbin.exe /TSAWARE:NO  <application path>

    Dumpbin says that there is no flag, as expected.
    Wednesday, November 8, 2017 8:18 AM
  • Hi iz111,

    Maybe my reply do not gives a good understanding. According to the description of your question, if you remove the flag which you set to NO, it works well. Hence I suggest you do not set the flag, because the flag set ON as default.

    >>On all other OS, application with this flag works without problem. 

    On another OS, it works well without problem. Hence I suggest you to use way below to check the value of flag.

    Dumpbin /Headers <assembly_name>.exe(dll)

    >>What could cause this issue? Is there some update or workaround for this?

    According to your feedback, Dumpbin says that there is no flag, as expected. Hence the error caused by the value of flag. Do not set the flag or remove it will fix the error.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, November 16, 2017 4:26 PM
    Moderator
  • Problem is that when flag is not set application starts normally, but in that case some other things does not work correctly. For example function GetWindowsDirectory returns wrong HOMEPATH (C:\Windows instead per user home directory).
    Thursday, June 28, 2018 6:53 AM