Wednesday, December 21, 2022

Changes in the ToString() method in the ContentDispositionHeaderValue class in the .NET Framework 4.6 - Microsoft Support [MS]

Symptoms

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.

Cause

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

Resolution

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.

No comments:

Post a Comment

Search This Blog

December 2014 Cumulative Update 5.0.8308.857 for Lync Server 2013 (Front End Server and Edge Server) - Microsoft Support [MS]

December 2014 Cumulative Update 5.0.8308.857 for Lync Server 2013 (Front End Server and Edge...