New Features in ASP.NET 4.5

What's new in Visual Studio 2012 and ASP.NET 4.5 for web developers.
Course info
Rating
(179)
Level
Intermediate
Updated
Mar 21, 2013
Duration
4h 29m
Table of contents
Visual Studio Features
Working with Data
Framework Features
HTML5 Features
oAuth and Security Features
Description
Course info
Rating
(179)
Level
Intermediate
Updated
Mar 21, 2013
Duration
4h 29m
Description

This course provides a tour of what's new in Visual Studio 2012 for ASP.NET Web Forms developers and how it can make you more productive as a developer. The course begins by showing you key enhancements to Visual Studio's HTML editor and its improved support for working with CSS and JavaScript. Next, you’ll explore what's new with data binding (some significant features have been added here) including model binding and strongly typed data controls. You’ll also see enhancements that have been made to the ASP.NET framework such as bundling and minification of JavaScript and CSS, asynchronous modules and handlers, SignalR and more. Several new HTML5 features are also demonstrated including new HTML5 input types, Web Sockets and support for multiple file uploads. The course concludes with a look at important security-related improvements in ASP.NET including support for OAuth, request validation and support for preventing cross-site request forgery (XSRF) attacks.

About the author
About the author

Dan Wahlin founded Wahlin Consulting, which provides consulting and training services on JavaScript, Angular, Node.js, C#, ASP.NET MVC, Web API, and Docker. He is a Google GDE, Microsoft MVP and Regional Director, and speaks at conferences and user groups around the world.

More from the author
More courses by Dan Wahlin
Section Introduction Transcripts
Section Introduction Transcripts

Visual Studio Features
Welcome to the New Features in ASP. NET 4. 5 Web Forms course. My name's Dan Wahlin with Pluralsight and in this course we're going to focus 100% on what's new in Visual Studio 2012 and in the ASP. NET 4. 5 Web Forms framework. Now, if you're new to ASP. NET then I'd recommend you watch the Introduction to ASP. NET WebForms course that myself and Fritz Onion put together first, but if you have ASP. NET experience already, then you're in the right place. We're going to focus on all the great features that are available. So, we'll start off by covering some new productivity enhancements in Visual Studio 2012. We're going to cover things ranging from the HTML editor enhancements, CSS enhancements, and even JavaScript. And talk about how you'll be more productive, write less code, and be able to get more done and also be able to find things more easily as you type. I'll also introduce some plugins you can use. It'll enhance productivity as well. From there we'll talk about one of my favorite topics and that's data. ASP. NET has always been very good at working with data and this release doesn't disappoint at all. In fact, there's some very significant enhancements such as model binding, strongly-typed data controls, enhancing coding, and more that we'll be covering here. From there we're going to talk about several different framework features ranging from bundling and minifi cation of JavaScript and CSS files, WebSockets, SignalR, the ASP. NET Web API and the functionality it offers, as well as a few other things along the way. Next up will be HTML5 Features. Obviously HTML5 is very, very popular these days and ASP. NET has some enhancements, such as direct support for HTML5 input elements. And we'll talk about how to work with those, validate them with the validator controls, and some other HTML5 specific enhancements along the way. And finally, we'll talk about Security Features that are built into ASP. NET 4. 5. We'll talk about OAuth and how you can integrate with external sites like Facebook, Twitter, Microsoft, Google, and others. We'll go into some validated and un-validated request validation and explain how you can get more granular as data is posted back that might have HTML content in it. And we'll even talk about how ASP. NET can help you prevent cross-site request forgery attacks. So, there's a lot of great stuff to cover. Let's go ahead and jump in and start talking about what's new in Visual Studio.

Working with Data
Dan Wahlin: The ability to work with data in a variety of ways has always been a strength with ASP. net. We have a robust set of server controls that can bind collections to, and it'll automatically generate the HTML needed by the browsers. On ASP. net 4. 5, some significant enhancements have been made to how we can work with data. In fact, I'd argue it's one of the more exciting features in this particular release. And that's what we're going to talk about in this module. The first thing that we'll cover is the support for strongly typed data controls. This allows controls like the grid view to call out to methods that you supply directly. And this makes it easier when you're performing different create, read, update, and delete operations. We'll also talk about new HTML and coding techniques you can use as you bind data into our server controls. And we'll cover my favorite feature related to data, and that is the new model binding support. This is a feature that's been brought over from ASP. net MVC. And it will really simplify the amount of code you have to write, especially as data's posted back to a server because it can map posted-back data to properties directly. And then we'll wrap up with a new validation feature called unobtrusive validation that cleans up the page and removes a lot of the JavaScript we used to have related to validation. And instead substitutes in some HTML 5 attributes. So let's go ahead and get started by talking about strongly typed data controls.

Framework Features
Several new features have been baked into the ASP. NET 4. 5 framework and several more are available up on NuGet. We're going to talk about some of those key features in this module. So, the first thing we'll talk about is Bundling and Minification. This is the process of shrinking down the size of your JavaScript and CSS files and also minimizing HTTP requests made from a browser up to a server. We'll also talk about Async Support and a way Async keywords, now available in VB and C#, can be used to simplify asynchronous operations and we'll talk about how we can apply those in HTTP modules and HTTP handlers. From there, we'll take a look at a great feature for cleaning up URLs called Friendly URLs. This is a NuGet package that's available and it's installed directly now if you have the Web 2012. 2 update installed for Visual Studio. Next up is the ASP. NET Web API. A great feature if you need to exchange data with a lot of different clients, whether it's mobile or touch devices or desktops. You can use JSON data, XML data, and even other formats. It's works very, very well for AJAX-enabled clients as well. And finally, we'll talk about SignalR, which is a very exciting part of the framework to provide real-time data feeds. If you want to push data from a server to a client or talk from a client up and then push that out to multiple clients, SignalR can do it for you and you don't even have to be an expert at the underlying technologies. So, let's go ahead and get started by taking a look at Bundling and Minification support.

HTML5 Features
HTML 5 provides several different features that enhance the end user experience in the browser, and fortunately ASP dot net 4 dot 5 offers several features as well that relate to HTML 5 and make it easier to work with as a developer. And that's what we're going to talk about in this module. The first thing we'll talk about is the text box control. It's text mode property has been enhanced to support HTML 5 input types such as email, url, color, and others, and we'll talk about those. From there we'll talk about how users can now upload multiple files from a browser up to the server if the browser supports it, a really nice feature that actually simplifies that overall process. Next up is WebSockets, one of the more exciting HTML 5 technologies out there and a technology that actually will allow you to provide real time communication between a browser and a server. In fact, I could use this technology to actually push data from a server as data changes there out to multiple clients. And finally we'll cover additional HTML 5 features that make life easier as a developer such as simplified paths with video and audio tags, validater controls, and integration with the HTML 5 input types and a few other things along the way.

oAuth and Security Features
Dan Wahlin: Security is an important part of any application, and ASP. NET has always provided excellent support for securing applications in different scenarios. In ASP. NET 4. 5 we now have some new and enhanced support for security in different areas. For instance, we now have oAuth support so you can rely on third-party providers, and as users are posting back data or you might be encoding data we have some better options there, as well. We'll start off by talking about the oAuth support that's built into ASP. NET 4. 5 and how we can use third-party sites, such as Facebook, Twitter, Google, Microsoft and others, to actually authenticate our website users. For now, we'll talk about a different way to access data that's been posted back, especially in scenarios where HTML content might be entered in a textbox, and this is called deferred request validation or you might here it referred to as lazy validation. If you need to access HTML content, that's posted back, for instance in an HTML editor embedded in the browser. There's also a new feature on the request object, and we'll talk about handling unvalidated requests and getting the raw content that's been posted back. And we'll also talk about how if you need to actually take HTML content and put it back in the page, how you can encode it using the new AntiXssEncoder. This is a special Encoder that has white listed characters, anything outside of that list is automatically encoded, so that we prevent cross site scripting attacks. And then, finally, we'll wrap up with a new anti cross site request forgery validation feature, this makes it so external sites can't actually send users over to your site without them knowing it and perform different actions. So let's go ahead and jump in and get started with oAuth support.