Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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.

↑ Back to the top


Cause

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

↑ Back to the top


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 .

↑ Back to the top


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.

↑ Back to the top


Keywords: kbsurveynew, kbexpertiseadvanced, kbtshoot, kb

↑ Back to the top

Article Info
Article ID : 3069495
Revision : 1
Created on : 1/7/2017
Published on : 7/20/2015
Exists online : False
Views : 553