Announcing release of ASP.NET and Web Tools for Visual Studio 2013

Announcing release of ASP.NET and Web Tools for Visual Studio 2013

Rate This
  • Comments 19

I’m excited to show the new features of ASP.NET and Web Tools for Visual Studio 2013. Visit Somasegar’s blog for details on Visual Studio 2013 RTW. Download Visual Studio 2013 to try out the new features in this release. Read the Visual Studio blog for information about general editor enhancements, including the preview time JavaScript editor improvement blog post and future posts on JavaScript editor improvements,

Check http://www.asp.net/ for release notes, documentation, and tutorials. This blog includes features introduced after the RC release as well as features included in the earlier RC announcement blog. We will have incoming blogs to talk about the features in detail.

Visual Studio Web Tooling Enhancements

One ASP.NET

We made a simple UI for creating projects that offer support for multiple ASP.NET frameworks (Web Forms, MVC, and Web API). New features are available for Web Forms that used to be offered only for MVC, such as automatic test project creation and multiple authentication configurations.

image

image

Different authentication configurations can be chosen. The chosen authentication works the same in all ASP.NET frameworks and in different hosting environments, such as IIS, IIS Express, or OWIN based self hosted Web API and SignalR sites.

All of the ASP.NET project templates now use Bootstrap 3.0 to provide responsive design and theming capabilities. Responsive design means your web page automatically adapts to changes in browser window size by doing things like changing the way menu bars are displayed or the way columns are arranged. Theming means you can change the look and feel of a site easily, and you can choose from a wide selection of ready-made themes. You can do these things by writing CSS, but that requires a lot of complex code: Bootstrap makes it easy. For an example of responsive design in action and how to change a site’s theme, see Bootstrap in the Visual Studio 2013 web project templates.

The Single Page Application template has been updated with support for OAuth 2.0 and a Web API based account controller that can be used from JavaScript and also from native mobile applications.

For more information about the new process for creating web projects, see Creating ASP.NET Web Projects in Visual Studio 2013.

Browser Link – SignalR channel between browser and Visual Studio

A new feature, Browser Link, enables you to click a button in Visual Studio to trigger a page refresh in one or more browsers that are running from your web project. You don’t have to click Refresh in each browser or close and open the browser. In Visual Studio 2012 a typical development cycle is edit markup and code, press Control+F5 to run in the browser, close the browser, edit again, and repeat the process. In Visual Studio 2013 you cut out some of these steps. You can edit markup and code, press Control+F5 to run in the browser, edit again, click the Browser Link Refresh button, and see the results of your changes. You can connect multiple browsers to your development site, including mobile emulators, and click a button to refresh all the browsers all at the same time.

image

Browser Link works by using a SignalR channel between browsers and Visual Studio 2013.

We also released API to write Browser Link extensions. Mads Kristensen’s Web Essentials for Visual Studio 2013 (source) contains several useful extensions, such as:

  • Design Mode – Change HTML text in the browser, and the change is reflected in the HTML editor.
  • Inspect Mode – Inspect elements in the browser and the HTML editor automatically scrolls to the corresponding code.
  • Sync F12 Changes – Change styles in F12 browser tools, and the changes are automatically updated in the corresponding style sheet files.
  • Find Unused CSS – Easily find unused CSS in your project.
  • CSS Sync on Save – Save a CSS or LESS document, and the styles are automatically reloaded in the browser without doing a full page refresh.
  • Best Practices – Analyzes your web pages for violations to best practices and gives you an easy way to fix them.

clip_image007

clip_image008

New HTML editor

In VS2013, a new HTML editor is released for Razor files and HTML files. Web Forms .aspx, .master and user control .ascx files are still using the legacy editor for various reasons. The new HTML editor provides a single unified HTML5-based schema. It has some improvement such as automatic brace completion, jQueryUI and AngularJS attribute IntelliSense, attribute IntelliSense grouping, etc. We make CSS class attribute IntelliSense work even if bundling and minification is used.

clip_image009

Van Kichline has more details in HTML Editing Features in Visual Studio 2013 blog.

Azure website tooling with Windows Azure SDK 2.2

With installation of Windows Azure SDK 2.2 , all your Windows Azure services are accessible under one Windows Azure node in Server Explorer. You can connect to Windows Azure just by entering your user name and password – you don’t have to download and import a subscription file. You can perform many management and configuration functions from Server Explorer, such as creating Web Sites, stopping and starting Web Sites, setting logging and tracing options, and more.

clip_image010

Scaffolding

ASP.NET Scaffolding is a code generation framework for ASP.NET Web applications. It makes it easy to add boilerplate code to your project that interacts with a data model. VS 2013 has completely rewritten ASP.NET Scaffolding. Among the new features are an option to generate asynchronous code, the ability to scaffold Web API controllers, and the ability to use scaffolding in any type of ASP.NET project (for example, you can scaffold MVC controllers and views in Web Forms projects). For more information, see ASP.NET Scaffolding Overview.

image

We removed Web Forms Scaffolding from this release because it's not ready yet. We’ll put the new bits in future release, possibly targeting update 1.

ASP.NET Framework Enhancements

ASP.NET MVC 5

MVC projects are now standard Web Applications and do not use their own project GUID. An MVC 5 project is created if the MVC checkbox is checked in the One ASP.NET new project dialog. To get started, see Getting Started with ASP.NET MVC 5.

MVC 5 includes a variety of new features including:

· Attribute routing

· Authentication filters

· Filter overrides

For details on ASP.NET MVC 5 features, see the release notes or refer to the ASP.NET MVC 5 documentation on asp.net.

ASP.NET Web API 2

ASP.NET Web API 2 includes a variety of new features including:

  • Attribute routing
  • OAuth 2.0
  • OData improvements
  • Reuse existing EDM
  • Request batching
  • Improved unit testability
  • CORS
  • Support for portable libraries
  • OWIN integration
  • IHttpActionResult
  • HttpRequestContext
  • Authentication filters
  • Filter overrides

For details on ASP.NET Web API 2 features, see the release notes or refer to the ASP.NET Web API 2 documentation here.

ASP.NET SignalR

SignalR 2.0.0 is included with VS2013. It includes support for MonoTouch (enables you to develop iPhone apps using C# and .NET) and MonoDroid (enables you to develop Android apps using C# and .NET), portable .NET client, and the self-hosting package Microsoft.AspNet.SignalR.SelfHost, and it is backwards compatible for servers. For more information, including notes about how to upgrade from version 1.x, see the SignalR documentation on asp.net.

Entity Framework

Entity Framework 6.0.0 is included with VS2013. For more information, see Entity Framework Version History .

Microsoft OWIN Components

The Microsoft OWIN components (also known as the Katana project) integrates support for the Open Web Interface for .NET (OWIN), deep into ASP.NET. OWIN defines a standard interface between .NET web servers and web applications. Any OWIN-based application or middleware can run on any OWIN capable host, including ASP.NET on IIS.

You host OWIN-based middleware and frameworks in ASP.NET using the Microsoft.Owin.Host.SystemWeb NuGet package. The Microsoft.Owin.Host.SystemWeb package has been enhanced to enable an OWIN middleware developer to provide hints to the SystemWeb server if the middleware needs to be called during a specific ASP.NET pipeline stage (for example, during the authentication stage). The Microsoft OWIN Components also includes an HttpListener-based server, a self-host API and an OwinHost executable for running OWIN applications without having to create a custom host. With the OwinHost 2.0.0 NuGet package, VS2013 can now easily convert an IIS Express based WebAPI or SignalR project to a project that is run from OwinHost.exe.

image

ASP.NET authentication is now based on OWIN middleware that can be used on any OWIN-based host. Microsoft OWIN Components includes a rich set of middleware components for authentication including support for cookie-based authentication, logins using external identity providers (like Microsoft Accounts, Facebook, Google, Twitter), and logins using organizational accounts from your on-premises Active Directory or Windows Azure Active Directory. Also included is support for OAuth 2.0, JWT and CORS. For more information see An Overview of Project Katana.

ASP.NET Identity

ASP.NET Identity is the new membership system for building ASP.NET applications. ASP.NET Identity makes it easy to integrate user profile data with application data. With ASP.NET Identity you control the persistence model of your application. For example, you can store your user data in a SQL Server database or another data store, including NoSQL data stores such as Windows Azure Storage Tables. For the default SQL Server data store, ASP.NET Identity uses Entity Framework Code First for all data access,. You can use Migrations to modify the membership tables and to deploy the database, and you can put your own tables and the membership tables in the same DbContext, making it easy to write code that does joins between membership and application tables.

For information about using ASP.NET Identity with Individual User Accounts authentication, see Creating ASP.NET Web Projects in Visual Studio 2013 - Individual User Accounts.

NuGet

NuGet 2.7 is included with VS2013. See NuGet 2.7 Release Notes for more details.

Summary

Today’s Visual Studio 2013 RTW release has a lot of useful features for developers using ASP.NET. Read the release notes to learn even more, and install it today!

Please use Connect to submit bugs, ASP.NET UserVoice to submit and vote for suggestions, and the ASP.NET Forums for Q&A. The send-a-smile tool in Visual Studio can help you send feedback as well.

image

Leave a Comment
  • Please add 4 and 1 and type the answer here:
  • Post
  • I love the article but the link to the ASP.NET site has a wrong URL now its www.asp.net/ and it sends to http://www.asp.net/%C2%A0.

    But the rest information are awesome XD

  • Nice stuff coming up! Thx

  • Congratulations and thanks for the hard work.

    Such a great time to be a .NET developer.

  • @Goracyi, thanks!  Fixed the link.

  • Great Article

  • Is there any more documentation on ASP Identity? I've read that there are some major changes between RC and RTW, documentation is sparse, and there is VERY little out there on any sort of upgrade path / transformation from previous versions of the SQL Provider.

    I'm sure there are a lot of people in the same boat that used older versions and have 100K users and existing data in GUIDs that they need to worry about. The lack of clear documentation, not to mention all of the tutorials that show everything as FILE > NEW and presume this is our first user-driven website, is disappointing.

  • Congrats on hard the hard work

  • Good features.

  • The additions to Web API 2 including Request Batching and CORS will be underappreciated, but not by me!  Thank you.

  • Thank you! I'm really enjoying the new UX in VS2013.

    Like others have mentioned, I'd greatly appreciate more guidance on using the new ASP.NET Identity membership system. I'm having a lot of difficulty integrating the IdentityDbContext with other DbContexts to create a comprehensive model and database for my applications. If the membership system always stood on its own, there wouldn't be an issue but the User ID typically gets used throughout other models and tables (think of a blog, for example, where some authenticated users are authorized to create blog posts whereas others are only authorized to leave comments - all users, though, need to have their User ID stored with blogs and/or comments). What are the recommended ways to combine these EF Code First models?

    Also, I thought perhaps something had happened on the SQL Server side of the world that vastly improved the performance and storage considerations of using GUIDs as primary keys but, alas, every resource I found panned their use. It's a little disconcerting and quite puzzling that you chose to use String/nvarchar(128) as the primary key in the ASP.NET Identity system. I really like the overall design of the new membership system minus that one aspect.

  • What about Web Pages (razor)? won't it get anything new on visual studio 2013?

  • Proud to be a .Net developer with new news like this!

  • @artificer, please check blogs.msdn.com/.../html-editing-features-in-visual-studio-2013-rc.aspx for razor related features and update.

  • Congrates to all the team for creating agin such great work.The developers will apply it soon.

     

  • @Robert, thank you for your comments. It prompted me to write a blog post to show how you can mis EF models and add authentication and authorization concerns. blogs.msdn.com/.../building-a-simple-todo-application-with-asp-net-identity-and-associating-users-with-todoes.aspx

    As for GUID vs strings, strings allows us more flexibility when it comes to persisting across different storage systems. Having said this you can override the string types and use GUIDs if you want to.

    @Aaron, we are working on publishing the migration doc for SQL membership providers. It will be posted hopefully this week on asp.net/identity where all the documentation for ASP.NET Identity will go.

Page 1 of 2 (19 items) 12