.NET Blog

Free. Cross-platform. Open source. A developer platform for building all your apps.

Featured posts

Join the .NET & C# Teams at Microsoft Build 2025
Apr 15, 2025
Post comments count 4
Post likes count 13

Join the .NET & C# Teams at Microsoft Build 2025

.NET Team
.NET Team

The countdown to Microsoft Build 2025 is on! Join us May 19-22 either in-person in Seattle or online and explore an exciting lineup of .NET and C# content, incl...

.NETASP.NETASP.NET Core

Latest posts

“Invoke the method with await”… ugh!
Mar 13, 2013
Post comments count 0
Post likes count 2

“Invoke the method with await”… ugh!

Stephen Toub - MSFT
Stephen Toub - MSFT

I can be a bit sensitive when it comes to language and how concepts are conveyed.  I think it’s important to be accurate, even if not precise, when describing what something is or how to use it, as otherwise the folks to whom you’re communicating can easily form the wrong mental model for that thing.  Having a good mental model for something is important in then being able to reason about the thing in question and to correctly infer other uses and behaviors.That’s why I frequently cringe when I hear someone say something like “invoke the method using 'await'”.  The com...

Deploy a Secure ASP.NET MVC application with OAuth, Membership and SQL Database
Mar 12, 2013
Post comments count 0
Post likes count 0

Deploy a Secure ASP.NET MVC application with OAuth, Membership and SQL Database

Rick_Anderson
Rick_Anderson

I’ve published a tutorial shows you how to build a secure ASP.NET MVC 4 web application that enables users to log in with credentials from Facebook, Yahoo, and Google and deploy the application to Windows Azure. This tutorial assumes that you have no prior experience using Windows Azure. On completing this tutorial, you'll have a secure data-driven web application up and running in the cloud and using a cloud database. You'll learn: You'll build a simple contact list web application that is built on ASP.NET MVC 4 and uses the ADO.NET Entity Framework for database access. The following...

ASP.NET Web API: Using Namespaces to Version Web APIs
Mar 7, 2013
Post comments count 0
Post likes count 0

ASP.NET Web API: Using Namespaces to Version Web APIs

Mike Wasson [MSFT]
Mike Wasson [MSFT]

In this post, I’ll show how to extend the routing logic in ASP.NET Web API, by creating a custom controller selector. Suppose that you want to version your web API by defining URIs like the following: /api/v1/products/ /api/v2/products/ You might try to make this work by creating two different “Products” controllers, and placing them in separate namespaces: The problem with this approach is that Web API finds controllers by class name, ignoring the namespace. So there’s no way to make this work using the default routing logic. Fortunately, Web API makes it easy to change the default behav...

Visual Studio Web Deployment Tutorial Series Updated for Windows Azure and LocalDB
Mar 6, 2013
Post comments count 0
Post likes count 0

Visual Studio Web Deployment Tutorial Series Updated for Windows Azure and LocalDB

Tom Dykstra - MSFT
Tom Dykstra - MSFT

This week we published an updated version of the popular 12-part tutorial series that shows how to deploy an ASP.NET web application with SQL Server databases. Here are links to the new tutorials, with notes about what’s in them and what’s new: Feedback is welcome; you can post comments here or on the tutorials themselves.-- Tom Dy...

Disabling Knockout Intellisense
Mar 4, 2013
Post comments count 0
Post likes count 0

Disabling Knockout Intellisense

VKichline
VKichline

Update 4/4/2013: This problem is fixed in Visual Studio 2012 Update 2 (VS2012.2). If the internal JavaScript engine could not figure out the IntelliSense in one second, VS will time out instead of keep evaluating (which in some cases can slow down VS significantly).  If it happens, some KnockoutJS IntelliSense will not be shown in the editor.  There are some workarounds you can do in order to show the knockout IntelliSense in time for such cases, such as using JavaScript XML documentation comments to speed up the IntelliSense evaluation.  For example, the following green comment will bypass the JQueryUI autocompl...

Introducing Package Statistics
Feb 26, 2013
Post comments count 0
Post likes count 0

Introducing Package Statistics

Jeff Handley
Jeff Handley

We have introduced a new feature on http://nuget.org where you can see download statistics for packages. With this initial drop, we hope to whet your appetite and collect your input on further statistics features; it's a mere fraction of what we can imagine. Statistics Tab At the top of the site, a new 'Statistics' tab is displayed. This tab takes you to http://nuget.org/stats, which shows the two high-level statistics reports we have at the moment. While we expect this page will expand with more reports, the first two we've introduced are "Downloaded Packages (Last 6 Weeks)" and "Downloaded Package Versions...

Translating OData queries to HQL
Feb 25, 2013
Post comments count 0
Post likes count 0

Translating OData queries to HQL

raghuramn
raghuramn

AspNet Web API OData makes it really simple to expose your IQueryable backend to be queried using the OData query syntax. Check out some samples here. If you are building using Entity Framework as your ORM (object-relational mapping) to talk to your database or just store all your data in-memory(Linq2Objects), you are in a good shape as you have an existing IQueryable. If you are talking to your own custom data source, you might not be lucky enough to have a LINQ provider or have a provider that has an incomplete implementation. If you are in this mess and are about to undertake the herculean task of implementing...

MVC Single Page Application Template for ASP.NET and Web Tools 2012.2
Feb 21, 2013
Post comments count 0
Post likes count 0

MVC Single Page Application Template for ASP.NET and Web Tools 2012.2

Xinyang Qiu
Xinyang Qiu

With the final release of ASP.NET and Web Tools 2012.2, we refreshed single page application page on asp.net .  It talks about KnockoutJS Template and introduced 4 community created SPA templates that you can install as MVC templates. There are four improvements for the MVC SPA template RTM release over the RC release that worth a note. Antiforgery support for Web API calls The ValidateAntiForgeryToken filter only works on MVC calls. Web API doesn't have a default Antiforgery filter yet. We implemented attribute “ValidateHttpAntiForgeryToken” inside Filters\ValidateHttpAntiForgeryTokenAttribute.cs to supp...

Pre-release of ASP.NET Scaffolding with a Web Forms scaffold generator
Feb 20, 2013
Post comments count 0
Post likes count 0

Pre-release of ASP.NET Scaffolding with a Web Forms scaffold generator

Anton Babadjanov
Anton Babadjanov

Today we are sharing a pre-release build of a new code generation framework known as ASP.NET Scaffolding, as well as a scaffold generator (code generator) for Web Forms. The Web Forms scaffold generator can automatically build Create-Read-Update-Delete (CRUD) views based on a model. Introduction Many programming tasks involve writing standard “boilerplate” code. Templates can help avoid having to hand-write all of this code, but only to a degree because they are static. MVC3 introduced the concept of scaffolding - generating code dynamically based on existing artifacts in a project. We are now extending this co...