Changes in the ToString() method in the ContentDispositionHeaderValue class in the .NET Framework 4.6


Assume that you have upgraded to Microsoft .NET Framework 4.6 on your computer. The ContentDispositionHeaderValue class will not eliminate leading zeroes in the hour portion of the time. 

In previous versions of the .NET Framework, the hour part of the time in the ToString() method would drop leading zeros. In the .NET Framework 4.6, the formatting of the hour part of the time will always be two digits and contain a leading zero if needed.

For example, you input a time "Sun, 15 Apr 2012 09:55:44 GMT," in the previous versions of the .NET Framework, it will be modified to "Sun, 15 Apr 2012 9:55:44 GMT." However, in the .NET Framework 4.6, the time is not modified.


This issue occurs because of a change in the ToString() method in the ContentDispositionHeaderValue class in the .NET Framework 4.6. 


If server requires no leading zeroes, eliminate leading zeroes before the values are passed into the Content-Disposition header constructor.

For more information about the known issues in the .NET Framework 4.6, see Known issues for the .NET Framework 4.6 .

More Information

For more information about the product versioning changes and their effects in the .NET Framework 4.6, see Application Compatibility in the .NET Framework 4.6.

Article ID: 3069495 - Last Review: Jul 20, 2015 - Revision: 1