Windows Presentation Foundation (WPF)
Issue 1
Assume that you implement the
ICommand interface, and then you perform one of the following operations:
- You delegate the CanExecuteChanged event to a different object.
- You raise the CanExecuteChanged event together with the sender parameter, and the parameter is set to a different object or to null.
In this situation, listeners of your
CanExecuteChanged event do not receive the event. The following are typical symptoms of this behavior:
- Buttons, MenuItems, or Hyperlinks do not change their IsEnabled state.
- Buttons, MenuItems, or Hyperlinks do not respond to mouse-clicks or to keyboard input.
Issue 2Consider the following scenario:
- You set the focus on a cell at the edge of a DataGrid (for example, on a cell in the top or bottom row, or on a cell in the leftmost or rightmost column).
- You press the arrow key that corresponds to the edge column (for example, you press Up from a cell in the top row).
- The cell contains a focusable element (for example, a TextBox, Hyperlink, Button, or CheckBox element).
In this scenario, the focus moves to the focusable element. However, the focus is expected to remain on the DataGrid cell.
Issue 3Consider the following scenario:
- You create a custom panel that implements the IScrollInfo interface.
- The VerticalOffset property returns a value that exceeds the value of the ExtentHeight property.
- The AutoScroll property is set to true.
- You try to "auto-scroll" the panel. For example, you click the mouse button inside the panel, and then you drag the mouse to a location that is underneath the panel by performing one of the following actions:
- You scroll the panel until it reaches the end of its content.
- You scroll the panel until you release the mouse button.
- You move the mouse elsewhere.
In this scenario, an infinite loop may occur. This consumes memory and may cause a
System.OutOfMemoryException exception to be thrown, which causes the application to exit.
Issue 4Consider the following scenario:
- You call the ScrollIntoView method on a ListBox or a DataGrid.
Note This call can occur in many ways. For example, you call the ScrollIntoView method from a handler for the SelectionChanged event. - There are layout tasks pending on the ListBox or on the DataGrid.
In this scenario, a
System.InvalidCastException exception may cause the application to exit.
Issue 5Consider the following scenario:
- You implement the INotifyDataErrorInfo interface on an object.
- You data-bind some properties of a UI element to the object instead of to a property of the object.
- You deactivate the binding by performing one of the following actions:
- You replace the binding with a different binding.
- You overwrite the property of the UI element with a different value (if it is a one-way binding).
- You remove the UI element from the visual tree and release all references to it.
- Your object raises the ErrorsChanged event.
In this scenario, a
System.NullReferenceException exception may cause the application to exit.
Common language runtime (CLR)
Issue 1
Operations that involve the
Array.Sort method experience slow performance. For example, when a program tries to sort a drop-down list.
Issue 2After you upgrade from the .NET Framework 4 to the .NET Framework 4.5, previously installed .NET Framework 4-based applications may crash. Additionally, you receive an error message that resembles the following:
"Common Language Runtime detected an invalid program"
Issue 3Assume that you upgrade a computer from an earlier version of the .NET Framework to the .NET Framework 4.5. Before the upgrade, there is an application that can read performance counters from ASP.NET. However, after you upgrade the .NET Framework, this feature can no longer read the performance counters from ASP.NET.
Issue 4Assume that you upgrade a computer from the .NET Framework 4 to the .NET Framework 4.5. Before the upgrade, the
Type.IsAssignableFrom method returns a value of
true. However, after the upgrade, the method incorrectly returns a value of
false.
To reproduce this issue, use the following code:
public class TestConstraint where T: U
{
public T t;
}
Class Program
{
static void Main( string[] args )
{
Type t = typeof( TestConstraint ).GetGenericArguments()[ 0 ];
Type u = typeof( TestConstraint ).GetGenericArguments()[ 1 ];
Console.WriteLine( u.IsAssignableFrom(t) );// The .NET Framework 4.0 displays "true." However, the .NET Framework 4.5 displays "false."
}
}
Issue 5The
CryptoStream class throws an
ArgumentNullException exception in the .NET Framework 4.5 instead of throwing a
CryptopgraphicException exception as it did in the .NET Framework 4. If a
CryptoStream class tries to decrypt invalid data and is disposed of two times by using a pattern that resembles the following, the second call to the
Dispose method throws an
ArgumentNullException exception:
using (CryptoStream cs = new CryptoStream(ms, decryptor, CryptoStreamMode.Read))
{
using (StreamReader sr = new StreamReader(cs))
{
}
}
Issue 6Assume that you upgrade an earlier version of the .NET Framework to the .NET Framework 4.5 on a computer. When you use some third-party controls on an application, you may receive a
System.Security.SecurityException exception, and the application crashes.
Windows Forms
Issue 1
Assume that you have a .NET Framework 4.5-based Windows Form application. When you click a menu item to open a child window in the application, interactions with the menu and child windows behave incorrectly.
For example, you may experience the following:
- When you open a shortcut menu in the child window, the main window form takes the focus.
- You cannot use mnemonics to access a menu item.
Issue 2When you set two controls to appear in the same cell as a TableLayoutPanel Windows Forms control, the two controls may be positioned in a different cell.
CauseThis issue occurs because the actual positions of the controls are resolved differently in the .NET Framework 4 and the .NET Framework 4.5.
Issue 3The
System.Windows.Forms.FontDialog.Color property returns a
Color value as the
System.Drawing.SystemColors class. These color objects have names that differ from the standard color names, for example "SystemText."
Standard color names are defined on the static members of the
Color structure and can be recognizable not only by the .NET Framework, but also by Windows Forms.
For more information about the
Color structure, go to the following MSDN website:
XML
Issue 1
When you try to redefine the default XML namespace during XSL transformation, an exception is thrown. Additionally, you receive the following error message:
Cannot construct namespace declaration xmlns='uri:schema1'.
Prefix '' is already mapped to namespace 'uri:schema2'.
Issue 2
Assume that you use the
XmlSerializer class to serialize an array of structs that implements
IEnumerable interface
explicitly. In this situation, a
System.Reflection.TargetInvocationException exception is thrown in the .NET Framework 4.5.
Network Class Library
Issue 1
Assume that you run a .NET Framework 4.5-based application that uses asynchronous APIs to read chunked responses. In this situation, the chunked responses may be read synchronously.
CauseThe
HttpWebRequest class lets callers read an HTTP response either synchronously or asynchronously. However, if the response is a chunked HTTP response, then parts of the response are read by using synchronous I/O (Winsock calls) even when the caller uses the asynchronous code path. In this situation, the calling thread is blocked until data is received on the network.
Issue 2Assume that you have a .NET Framework 4.5-based application that communicates with a server over the Transport Layer Security/Secure Sockets Layer (TLS/SSL) protocol by using the
HttpWebRequest or
SslStream class. If the server requests an SSL renegotiation while the application is sending data, the application may encounter an unhandled exception and then crash.
Issue 3A thread pool freezes in the
HttpWebRequest class if an HTTPS request is aborted during an SSL renegotiation while a write operation is pending.
CauseThis issue occurs because of a race condition that may occur when the
HttpWebRequest class or the
SslStream class handles SSL renegotiation. In this situation, the thread pool may create more and more threads. Additionally, the resources that are held in memory are not cleared.
Issue 4Assume that you have a .NET Framework 4.5-based application that communicates with a server through a proxy. If a request is aborted and proxy authentication is being negotiated at the same time, the application may encounter an unhandled exception and then crash.
CauseThis issue occurs because of an earlier fix to
Thread.Abort() method processing. This fix added a function that could throw a new exception. Therefore, the
Thread.Abort() method no longer throws this exception.
ASP.NET
Issue 1
Consider the following scenario:
- You have an ASP.NET web application that displays different content based on the language setting of the browser.
- A user uses Internet Explorer 10 on a Traditional Chinese version of Windows 8 to browse to that web application.
In this scenario, the web application does not display the Traditional Chinese version of the content to the user.
Issue 2When you run the Perfmon.exe program on your local computer to monitor certain ASP.NET performance counters on a remote computer (for example, the Application Running performance counters), you always receive a value of
0. You receive this value even if there are several ASP.NET applications running on the remote computer.
Issue 3Consider the following scenario:
- In a Microsoft Visual Studio 2012 web site project, you add the <thead> tag into an HTML table control on an .aspx page. For example, you do the following:
<table id="Table1" runat="server"><thead></thead></table>
- You try to build the whole web site.
In this scenario, you receive a compilation error that resembles the following:
"The best overloaded method match for 'System.Web.UI.HtmlControls.HtmlTableRowCollection.Add(System.Web.UI.HtmlControls.HtmlTableRow)' has some invalid arguments"
Issue 4Assume that you set the value of the
cachedRolesInCookie property to
true in your web application. Your application serializes the
RolePrincipal object into the cookie, and then sends it in response. In this situation, the role cookie value is empty in the application's following request.
Issue 5Consider the following scenario:
- You have an ASP.NET web application, and the AntiXssEncoder typeis turned on in the application.
- One of the web pages in the application has a HyperLink Web server control that uses the NavigateUrl property topoint to "mailto:xxx@contoso.com".
- A user accesses the webpage by using his browser, and then clicks the hyperlink.
In this scenario, the user will be redirected to a page that does not exist.
Entity Framework
Issue 1
Consider the following scenario:
- You develop an application that uses Microsoft SQL Server Compact 3.5 or SQL Server Compact 4.0 and Entity Framework in Microsoft Visual Studio 2010.
- The application uses a "LINQ to Entities" query to perform multiple JOINstatements on the entity sets to obtain data.
- You move the application to a computer that has the .NET Framework 4.5 installed.
- You try to run the application.
In this scenario, the application might experience reduced performance because of the generation of SQL statements in Entity Framework that do not perform well against SQL Server Compact 3.5 or SQL Server Compact 4.0.
Issue 2Consider the following scenario:
- You run an application that queries for data by using Entity Framework on a computer that has the .NET Framework 4.5 installed.
- The query uses "group by view" constructs.
In this scenario, you may experience poor query performance.
Note This issue does not occur when the application is running in the .NET Framework 4.
Windows Workflow Foundation (WF)
Issue 1
Consider the following scenario:
- You have an existing Visual Studio 2010 Activity Library project, or you create a new Activity Library project.
- You have some resource files in the project which will be embedded into the assembly.
- You build the project in Visual Studio 2012.
In this scenario, the build process is successful. However, the resource files are not embedded into the assembly correctly.
Issue 2Consider the following scenario:
- You create a Workflow Console Application project that is named "WorkflowConsoleApplication1."
- You open the default workflow, and you add an argument of type string.
- You set the default value of the new argument to a certain value, such as "example."
- You add the following line to the code:
[assembly:System.Windows.Markup.XmlnsDefinition("foobar", "WorkflowConsoleApplication1")]
- You build the solution and then you try to open the default workflow again.
In this scenario, the workflow designer cannot be loade and you receive the following error message:
"Workflow Designer encountered problems with your document"
Windows Communication Foundation (WCF)
Issue 1Consider the following scenario:
- You develop a WCF service project that targets the .NET Framework 4.0 on a computer that has the .NET Framework 4.5 installed.
- You set the value of the aspNetCompatibilityEnabled property to true in the web.config file.
- You deploy the WCF service project on another computer that has the .NET Framework 4.0 installed.
In this scenario, a
System.ServiceModel.ServiceActivationException exception is thrown.
Note This issue does not occur when you deploy the WCF service project on a computer that has the .NET Framework 4.5 installed.
CauseThis issue occurs because the default value of the
AspNetCompatibilityRequirements attribute is
NotAllowed in the .NET Framework 4.0. However, this default value is changed to
Allowed in the .NET Framework 4.5.
WorkaroundTo work around this issue, explicitly set the ASP.NET compatibility mode for the service on the service contract by adding the following code:
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
Issue 2The public API
ByteStreamMessageEncoder.CreateMessage creates an
XmlDictionaryReader class that uses the default
XmlDictionaryReaderQuotas instead of the maximum quotas defined in
XmlDictionaryReaderQuotas.Max. This may cause a
System.Xml.XmlException (maximum quota exceeded) exception to occur.
Issue 3When you try to access an upload stream property (for example, the
HttpRequest.InputStream property)
instead of a service operation, you receive the following error message:
This method or property is not supported after HttpRequest.GetBefferlessInputStream has been invoked"
Issue 4When you try to generate WCF proxies
for ASMX services by using either the
Add Service Reference dialog
or the .NET Framework 4.5 Svcutil.exe utility, the generated service reference is invalid with missing types.
Issue 5Consider the following scenario:
- You create an ASP.NET MVC4 Web API project in Visual Studio 2012.
- You add a WCF service reference in the project.
In this scenario, the
Reference.cs file for the service reference is empty.
CauseThis issue occurs because the
DataContractSerializer class has encountered a type (
Newtonsoft.Json.Linq.JToken) that it does not support. In this case, it throws an exception, and then stops generating the service reference.