.NET Blog

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

Featured posts

Announcing .NET 9
Nov 12, 2024
29
39

Announcing .NET 9

.NET Team
.NET Team

Announcing the release of .NET 9, the most productive, modern, secure, intelligent, and performant release of .NET yet. With updates across ASP.NET Core, C#, .N...

.NETASP.NET CoreC#

Latest posts

ASP.NET MVC Facebook Birthday App
Mar 25, 2013
0
0

ASP.NET MVC Facebook Birthday App

Rick_Anderson
Rick_Anderson

Tom Dykstra and I have published a really cool tutorial on creating a MVC FB birthday app. You can test the app out by clicking on the FB link below:https://apps.facebook.com/birthdayapp-mvc/The image below shows the birthday app.Yao Huang Lin  is the principal developer for the ASP.NET MVC Facebook library and templates and he also wrote the sample used in this tutorial (so you can be sure it’s using best practices.)The tutorial shows you how to: As always, we appreciate feedback. Follow me ( @RickAndMSFT )   on twitter where I have a no spam guarantee of quality tweets.

Deploy a Secure ASP.NET MVC application with OAuth, Membership and SQL Database
Mar 12, 2013
0
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
0
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
0
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
0
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...

Translating OData queries to HQL
Feb 25, 2013
0
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
0
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
0
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...

A Message Flow in ASP.NET Web API OData
Feb 19, 2013
0
0

A Message Flow in ASP.NET Web API OData

Hongmei Ge
Hongmei Ge

One of the biggest benefits that you have with ASP.NET Web API is that it gives 100% transparency of the source code because it is open source. You can easily enlist in the code repository and add the symbol path based on instructions at the CodePlex site, then off you go, you can debug the Web API code as if you were the original code author. Now if you are like me, who like to put a few breakpoints in the source code before hitting F5, you will need to understand the OData stack a little better. If everything goes expected, you might not need those breakpoints. But if anything goes wrong, such as getting a 500...