Specializations

Monday, March 25, 2013

What's New in the .NET Framework 4.5



This topic contains a summary of key new features and improvements in the following areas of the .NET Framework 4.5. This topic does not provide comprehensive information and is subject to change. For general information about the .NET Framework, see Getting Started with the .NET Framework. For supported platforms, see System Requirements. For download links and installation instructions, see Installing the .NET Framework 4.5.
Windows Store apps are designed for specific form factors and leverage the power of the Windows operating system. A subset of the .NET Framework 4.5 is available for building Windows Store apps for Windows by using C# or Visual Basic. This subset is called .NET for Windows Store apps and is discussed in an overview in the Windows Dev Center.
The Portable Class Library project in Visual Studio 2012 enables you to write and build managed assemblies that work on multiple .NET Framework platforms. Using a Portable Class Library project, you choose the platforms (such as Windows Phone and .NET for Windows Store apps) to target. The available types and members in your project are automatically restricted to the common types and members across these platforms.
The following features and improvements were added to the common language runtime and to .NET Framework classes:
  • Ability to reduce system restarts by detecting and closing .NET Framework 4 applications during deployment. See Reducing System Restarts During .NET Framework 4.5 Installations.
  • Support for arrays that are larger than 2 gigabytes (GB) on 64-bit platforms. This feature can be enabled in the application configuration file. See the<gcAllowVeryLargeObjects> element, which also lists other restrictions on object size and array size.
  • Better performance through background garbage collection for servers. When you use server garbage collection in the .NET Framework 4.5, background garbage collection is automatically enabled. See the Background Server Garbage Collection section of the Fundamentals of Garbage Collection topic.
  • Background just-in-time (JIT) compilation, which is optionally available on multi-core processors to improve application performance. See ProfileOptimization.
  • Ability to limit how long the regular expression engine will attempt to resolve a regular expression before it times out. See the Regex.MatchTimeout property.
  • Ability to define the default culture for an application domain. See the CultureInfo class.
  • Console support for Unicode (UTF-16) encoding. See the Console class.
  • Support for versioning of cultural string ordering and comparison data. See the SortVersion class.
  • Better performance when retrieving resources. See Packaging and Deploying Resources in Desktop Apps.
  • Zip compression improvements to reduce the size of a compressed file. See the System.IO.Compression namespace.
  • Ability to customize a reflection context to override default reflection behavior through the CustomReflectionContext class.
  • Support for the 2008 version of the Internationalized Domain Names in Applications (IDNA) standard when the System.Globalization.IdnMapping class is used on Windows 8.
  • Delegation of string comparison to the operating system, which implements Unicode 6.0, when the .NET Framework is used on Windows 8. When running on other platforms, the .NET Framework includes its own string comparison data, which implements Unicode 5.x. See the String class and the Remarks section of theSortVersion class.
  • Ability to compute the hash codes for strings on a per application domain basis. See <UseRandomizedStringHashAlgorithm> Element.
  • Type reflection support split between Type and TypeInfo classes. See Reflection in the .NET Framework for Windows Store Apps.
The Managed Extensibility Framework (MEF) provides the following new features:
  • Support for generic types.
  • Convention-based programming model that enables you to create parts based on naming conventions rather than attributes.
  • Multiple scopes.
  • A subset of MEF that you can use when you create Windows Store apps. This subset is available as a downloadable package from the NuGet Gallery. To install the package, open your project in Visual Studio 2012, choose Manage NuGet Packages from the Project menu, and search online for the Microsoft.Compositionpackage.
For more information, see Managed Extensibility Framework (MEF).
In the .NET Framework 4.5, new asynchronous features were added to the C# and Visual Basic languages. These features add a task-based model for performing asynchronous operations. To use this new model, use the asynchronous methods in the I/O classes. See Asynchronous File I/O.
Resource File Generator (Resgen.exe) enables you to create a .resw file for use in Windows Store apps from a .resources file embedded in a .NET Framework assembly. For more information, see Resgen.exe (Resource File Generator).
Managed Profile Guided Optimization (Mpgo.exe) enables you to improve application startup time, memory utilization (working set size), and throughput by optimizing native image assemblies. The command-line tool generates profile data for native image application assemblies. See Mpgo.exe (Managed Profile Guided Optimization Tool).
The .NET Framework 4.5 provides several new features and improvements for parallel computing. These include improved performance, increased control, improved support for asynchronous programming, a new dataflow library, and improved support for parallel debugging and performance analysis. See the entry What’s New for Parallelism in .NET 4.5 in the Parallel Programming with .NET blog.
ASP.NET 4.5 includes the following new features:
  • Support for new HTML5 form types.
  • Support for model binders in Web Forms. These let you bind data controls directly to data-access methods, and automatically convert user input to and from .NET Framework data types.
  • Support for unobtrusive JavaScript in client-side validation scripts.
  • Improved handling of client script through bundling and minification for improved page performance.
  • Integrated encoding routines from the AntiXSS library (previously an external library) to protect from cross-site scripting attacks.
  • Support for WebSockets protocol.
  • Support for reading and writing HTTP requests and responses asynchronously.
  • Support for asynchronous modules and handlers.
  • Support for content distribution network (CDN) fallback in the ScriptManager control.
For more information about these features, see ASP.NET 4.5 and Visual Studio 2012.
The .NET Framework 4.5 provides a new programming interface for HTTP applications. For more information, see the new System.Net.Http and System.Net.Http.Headersnamespaces.
Support is also included for a new programming interface for accepting and interacting with a WebSocket connection by using the existing HttpListener and related classes. For more information, see the new System.Net.WebSockets namespace and the HttpListener class.
In addition, the .NET Framework 4.5 includes the following networking improvements:
  • RFC-compliant URI support. For more information, see Uri and related classes.
  • Support for Internationalized Domain Name (IDN) parsing. For more information, see Uri and related classes.
  • Support for Email Address Internationalization (EAI). For more information, see the System.Net.Mail namespace.
  • Improved IPv6 support. For more information, see the System.Net.NetworkInformation namespace.
  • Dual-mode socket support. For more information, see the Socket and TcpListener classes.
In the .NET Framework 4.5, Windows Presentation Foundation (WPF) contains changes and improvements in the following areas:
  • The new Ribbon control, which enables you to implement a ribbon user interface that hosts a Quick Access Toolbar, Application Menu, and tabs.
  • The new INotifyDataErrorInfo interface, which supports synchronous and asynchronous data validation.
  • New features for the VirtualizingPanel and Dispatcher classes.
  • Improved performance when displaying large sets of grouped data, and by accessing collections on non-UI threads.
  • Data binding to static properties, data binding to custom types that implement the ICustomTypeProvider interface, and retrieval of data binding information from a binding expression.
  • Repositioning of data as the values change (live shaping).
  • Ability to check whether the data context for an item container is disconnected.
  • Ability to set the amount of time that should elapse between property changes and data source updates.
  • Improved support for implementing weak event patterns. Also, events can now accept markup extensions.
For more information, see What's New in WPF Version 4.5.
In the .NET Framework 4.5, the following features have been added to make it simpler to write and maintain Windows Communication Foundation (WCF) applications:
  • Simplification of generated configuration files.
  • Support for contract-first development.
  • Ability to configure ASP.NET compatibility mode more easily.
  • Changes in default transport property values to reduce the likelihood that you will have to set them.
  • Updates to the XmlDictionaryReaderQuotas class to reduce the likelihood that you will have to manually configure quotas for XML dictionary readers.
  • Validation of WCF configuration files by Visual Studio as part of the build process, so you can detect configuration errors before you run your application.
  • New asynchronous streaming support.
  • New HTTPS protocol mapping to make it easier to expose an endpoint over HTTPS with Internet Information Services (IIS).
  • Ability to generate metadata in a single WSDL document by appending ?singleWSDL to the service URL.
  • Websockets support to enable true bidirectional communication over ports 80 and 443 with performance characteristics similar to the TCP transport.
  • Support for configuring services in code.
  • XML Editor tooltips.
  • ChannelFactory caching support.
  • Binary encoder compression support.
  • Support for a UDP transport that enables developers to write services that use "fire and forget" messaging. A client sends a message to a service and expects no response from the service.
  • Ability to support multiple authentication modes on a single WCF endpoint when using the HTTP transport and transport security.
  • Support for WCF services that use internationalized domain names (IDNs).
Several new features have been added to Windows Workflow Foundation (WF) in the .NET Framework 4.5. These new features include:
  • State machine workflows, which were first introduced as part of the .NET Framework 4.0.1 (.NET Framework 4 Platform Update 1). This update included several new classes and activities that enabled developers to create state machine workflows. These classes and activities were updated for the .NET Framework 4.5 to include:
    • The ability to set breakpoints on states.
    • The ability to copy and paste transitions in the workflow designer.
    • Designer support for shared trigger transition creation.
    • Activities for creating state machine workflows, including: StateMachine, State, and Transition.
  • Enhanced Workflow Designer features such as the following:
    • Enhanced workflow search capabilities in Visual Studio, including Quick Find and Find in Files.
    • Ability to automatically create a Sequence activity when a second child activity is added to a container activity, and to include both activities in the Sequence activity.
    • Panning support, which enables the visible portion of a workflow to be changed without using the scroll bars.
    • A new Document Outline view that shows the components of a workflow in a tree-style outline view and lets you select a component in the Document Outline view.
    • Ability to add annotations to activities.
    • Ability to define and consume activity delegates by using the workflow designer.
    • Auto-connect and auto-insert for activities and transitions in state machine and flowchart workflows.
  • Storage of the view state information for a workflow in a single element in the XAML file, so you can easily locate and edit the view state information.
  • A NoPersistScope container activity to prevent child activities from persisting.
  • Support for C# expressions:
    • Workflow projects that use Visual Basic will use Visual Basic expressions, and C# workflow projects will use C# expressions.
    • C# workflow projects that were created in Visual Studio 2010 and that have Visual Basic expressions are compatible with C# workflow projects that use C# expressions.
  • Versioning enhancements:
    • The new WorkflowIdentity class, which provides a mapping between a persisted workflow instance and its workflow definition.
    • Side-by-side execution of multiple workflow versions in the same host, including WorkflowServiceHost.
    • In Dynamic Update, the ability to modify the definition of a persisted workflow instance.
  • Contract-first workflow service development, which provides support for automatically generating activities to match an existing service contract.
For more information, see What's New in Windows Workflow Foundation.

new in .NET4.5 and VS2012


What is new in .NET4.5 and VS2012

          ·         ASP.NET Core Runtime and Framework
·         Asynchronously Reading and Writing HTTP Requests and Responses
·         Improvements to HttpRequest handling
·         Asynchronously flushing a response
·         Support for await and Task-Based Asynchronous Modules and Handlers
·         Asynchronous HTTP modules
·         Asynchronous HTTP handlers
·         New ASP.NET Request Validation Features
·         Deferred ("lazy") request validation
·         Support for unvalidated requests
·         AntiXSS Library
·         Support for WebSockets Protocol
·         Bundling and Minification
·         Performance Improvements for Web Hosting
·         Key Performance Factors
·         Requirements for New Performance Features
·         Sharing Common Assemblies
·         Using multi-Core JIT compilation for faster startup
·         Tuning garbage collection to optimize for memory
·         Prefetching for web applications
·         ASP.NET Web Forms
·         Strongly Typed Data Controls
·         Model Binding
·         Selecting data
·         Value providers
·         Filtering by values from a control
·         HTML Encoded Data-Binding Expressions
·         Unobtrusive Validation
·         HTML5 Updates
·         ASP.NET MVC 4
·         ASP.NET Web Pages 2
·         Visual Studio 2012 Release Candidate
·         Project Sharing Between Visual Studio 2010 and Visual Studio 2012 Release Candidate (Project Compatibility)
·         Configuration Changes in ASP.NET 4.5 Website Templates
·         Native Support in IIS 7 for ASP.NET Routing
·         HTML Editor
·         Smart Tasks
·         WAI-ARIA support
·         New HTML5 snippets
·         Extract to user control
·         IntelliSense for code nuggets in attributes
·         Automatic renaming of matching tag when you rename an opening or closing tag
·         Event handler generation
·         Smart indent
·         Auto-reduce statement completion
·         JavaScript Editor
·         Code outlining
·         Brace matching
·         Go to Definition
·         ECMAScript5 support
·         DOM IntelliSense
·         VSDOC signature overloads
·         Implicit references
·         CSS Editor
·         Auto-reduce statement completion
·         Hierarchical indentation.
·         CSS hacks support
·         Vendor specific schemas (-moz-,-webkit)
·         Commenting and uncommenting support
·         Color picker
·         Snippets
·         Custom regions
·         Page Inspector
·         Publishing
·         Publish profiles
·         ASP.NET precompilation and merge

Differences between .NET 4.0 and .NET 4.5 in High level in .NET



Support for Windows Runtime
Support for Metro Style Applications
Support for Async Programming
Garbage Collector Improvements
Faster ASP.NET Startup
Better Data Access Support
WebSockets Support
Workflow Support - BCL Support



-Asp.net 4.0
Web.config File Refactoring
Extensible Output Caching
Auto-Start Web Applications
Permanently Redirecting a Page
Shrinking Session State
Expanding the Range of Allowable URLs
Extensible Request Validation
Object Caching and Object Caching Extensibility
Extensible HTML, URL, and HTTP Header Encoding
Performance Monitoring for Individual Applications in a Single Worker Process
Multi-Targeting
.... etc
And Asp.net 4.5 there is also a long list of improvements.
Asynchronously Reading and Writing HTTP Requests and Responses
Improvements to HttpRequest handling
Asynchronously flushing a response
Support for await and Task-Based Asynchronous Modules and Handlers



It breaks down the changes to the framework in the following categories:
  • .NET for Metro style Apps
  • Portable Class Libraries
  • Core New Features and Improvements
  • Parallel Computing
  • Web
  • Networking
  • Windows Presentation Foundation (WPF)
  • Windows Communication Foundation (WCF)
  • Windows Workflow Foundation (WF)
You sound like you are more interested in the Web section as this shows the changes to ASP.NET 4.5. The rest of the changes can be found under the other headings.
You can also see some of the features that were new when the .NET Framework 4.0 was shipped here.


Reference:http://stackoverflow.com/questions/10492647/differences-between-net-4-0-and-net-4-5-in-high-level-in-net


Microsoft .NET Framework 4 (Standalone Installer)



Overview

The .NET Framework is Microsoft's comprehensive and consistent programming model for building applications that have visually stunning user experiences, seamless and secure communication, and the ability to model a range of business processes.

The .NET Framework 4 works side by side with older Framework versions. Applications that are based on earlier versions of the Framework will continue to run on the version targeted by default.

The Microsoft .NET Framework 4 provides the following new features and improvements:
  • Improvements in Common Language Runtime (CLR) and Base Class Library (BCL)
    • Performance improvement including better multicore support, background garbage collection, and profiler attach on server.
    • New memory mapped file and numeric types.
    • Easier debugging including dump debugging, Watson minidumps, mixed mode debugging for 64 bit and code contracts.
    • For a comprehensive list of enhancements to CLR and BCL go here.
  • Innovations in the Visual Basic and C# languages, for example statement lambdas, implicit line continuations, dynamic dispatch, and named/optional parameters.
  • Improvements in Data Access and Modeling
    • The Entity Framework enables developers to program against relational databases using .NET objects and Language Integrated Query (LINQ). It has many new features, including persistence ignorance and POCO support, foreign key associations, lazy loading, test-driven development support, functions in the model, and new LINQ operators. Additional features include better n-tier support with self-tracking entities, customizable code generation using T4 templates, model first development, an improved designer experience, better performance, and pluralization of entity sets. For more information go here.
    • WCF Data Services is a component of the .NET Framework that enables you to create REST-based services and applications that use the Open Data Protocol (OData) to expose and consume data over the Web. WCF Data Services has many new features, including enhanced BLOB support, data binding, row count, feed customization, projections, and request pipeline improvements. Built-in integration with Microsoft Office 2010 now makes it possible to expose Microsoft Office SharePoint Server data as an OData feed and access that data feed by using the WCF Data Services client library. For more information go here.
  • Enhancements to ASP.NET
    • More control over HTML, element IDs and custom CSS that make it much easier to create standards-compliant and SEO-friendly web forms.
    • New dynamic data features including new query filters, entity templates, richer support for Entity Framework 4, and validation and templating features that can be easily applied to existing web forms.
    • Web forms support for new AJAX library improvements including built-in support for content delivery networks (CDNs).
    • For a comprehensive list of enhancements to ASP.NET go here.
  • Improvements in Windows Presentation Foundation (WPF)
    • Added support for Windows 7 multi-touch, ribbon controls, and taskbar extensibility features.
    • Added support for Surface 2.0 SDK.
    • New line-of-business controls including charting control, smart edit, data grid, and others that improve the experience for developers who build data centric applications.
    • Improvements in performance and scalability.
    • Visual improvements in text clarity, layout pixel snapping, localization, and interoperability.
    • For a comprehensive list of enhancements to WPF go here.
  • Improvements to Windows Workflow (WF) that enable developers to better host and interact with workflows. These include an improved activity programming model, an improved designer experience, a new flowchart modeling style, an expanded activity palette, workflow-rules integration, and new message correlation features. The .NET Framework 4 also offers significant performance gains for WF-based workflows. For a comprehensive list of enhancements to WF go here.
  • Improvements to Windows Communication Foundation (WCF) such as support for WCF Workflow Services enabling workflow programs with messaging activities, correlation support. Additionally, .NET Framework 4 provides new WCF features such as service discovery, routing service, REST support, diagnostics, and performance. For a comprehensive list of enhancements to WCF go here.
  • Innovative new parallel-programming features such as parallel loop support, Task Parallel Library (TPL), Parallel LINQ (PLINQ), and coordination data structures which let developers harness the power of multi-core processors.
Top of pageTop of page

System requirements

Supported Operating Systems: Windows 7, Windows 7 Service Pack 1, Windows Server 2003 Service Pack 2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2008 R2 SP1, Windows Vista Service Pack 1, Windows XP Service Pack 3
    • Windows XP SP3
    • Windows Server 2003 SP2
    • Windows Vista SP1 or later
    • Windows Server 2008 (not supported on Server Core Role)
    • Windows 7
    • Windows Server 2008 R2 (not supported on Server Core Role)
    • Windows 7 SP1
    • Windows Server 2008 R2 SP1
  • Supported Architectures:
    • x86
    • x64
    • ia64 (some features are not supported on ia64 for example, WPF)
  • Hardware Requirements:
    • Recommended Minimum: Pentium 1 GHz or higher with 512 MB RAM or more
    • Minimum disk space:
      • x86 – 850 MB
      • x64 – 2 GB
  • Prerequisites:
Top of pageTop of page

Instructions

  1. Important: Make sure that your computer has the latest Windows service pack and critical updates. To find security updates, visit Windows Update. If you are installing on XP 64 bit or Windows 2003 you might need to install the Windows Imaging Component. The Windows Imaging Component 32 bit can be found here . The Windows Imaging Component 64 bit can be found here .
  2. On this page, locate the Download button and then click it to start the download. If you want a smaller x86 only installer you can find it here. If you need to install on ia64 then use the ia64 installer found here.
  3. To start the installation immediately, click Run.
  4. To save the download to your computer so that you can install it later, click Save.
  5. To cancel the installation, click Cancel.
Top of pageTop of page

Additional information


Additional Requirements for Server Installation

If you have to perform a server installation, your computer must have the following software in addition to the basic requirements:
  • Internet Information Services (IIS) version 6.0 or later. To access the features of ASP.NET, IIS with the latest security updates must be installed before the .NET Framework is installed. ASP.NET is supported only on Windows XP Professional, Windows Server 2003, Windows Server 2008, and Windows Server 2008 R2.
  • (Recommended) Microsoft Data Access Components 2.8 or later


NOTE: Most users do not have to perform a server installation. If you are unsure whether to perform a server installation, just perform a basic installation.


Installer for Windows Server 2008 R2 Service Pack 1 Server Core

This version of Microsoft .NET Framework 4 does not support the Server Core role on Windows Server 2008 and Windows Server 2008 R2. To get a version of Microsoft .NET Framework 4 that supports Server Core role on Windows Server 2008 R2 Service Pack 1 go to Microsoft .NET Framework 4 (Standalone Installer) for Server Core.


.NET Framework 4 Readme

Differences Between ASMX and WCF Services


Differences Between ASMX and WCF Services

9 out of 12 rated this helpful - Rate this topic
Retired Content
The Web Service Software Factory is now maintained by the community and can be found on the Service Factory site.
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies.
This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
Retired: November 2011
Some differences between ASMX and WCF services are subtle and some differences between them are not subtle. The purpose of this section is to identify many of these differences and to provide guidance for how to handle them when preparing for, or when performing, migration. ASMX provides a very successful baseline for services, and WCF extends those capabilities for the next generation of services.
There are differences between ASMX and WCF, but it is important to also understand that WCF supports the same capabilities that ASMX provides. For example, you can use message types, XmlSerialization, custom SOAP headers, and Web Service Enhancements (WSE) in a WCF service. The remainder of this section describes some of these items; it also describes other areas that represent differences between ASMX and WCF.
The following subtopics describe the major differences between ASMX and WCF services: