.NET Blog

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

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

Announcing release of ASP.NET and Web Tools for Visual Studio 2013 RC I’m excited to show the new features of the ASP.NET and Web Tools for Visual Studio 2013 RC. Click here to download and install the Visual Studio 2013 RC today. Please check http://www.asp.net/vnext for release notes, documentation, and tutorials. This blog includes ...

Web Publishing a simpler way to exclude files/folders from being published

I’ve written a few blog posts on how to exclude files from publishing/packaging. In each of these posts you’d have to be familiar with MSBuild and the Web Publish process. I’ve been looking for a much simpler way to exclude files/folder from publishing. When using git you can easily exclude files and folders using a .gitignore file. ...

Install MVC4 HotTowel SPA NuGetNuGet package in One ASP.NET Web API Project in VS2013 Preview

I was trying to install MVC4 HotTowel SPA package (MVC4 and Razor v2) on a VS2013 Preview One ASP.NET Web API Project (MVC5 and Razor V3). I blindly let the NuGetNuGet package overwrite all my files including the Viewsweb.config file, which caused some compatibility problems. This is what I did: 1. Create a Web API One ASP.NET project (...

“Enable Edit and Continue” debugging option is now on by default for new web applications in VS2013 preview

In VS2010 and VS2012, the edit and continue option is disabled by default when creating a new web application project. In VS2013 preview, we turned it on by default. You can find this option on the Web tab in the web project’s properties window.   (image) With “Enable Edit and Continue” on, the VS debugger starts your...

How does VS determine which version of Razor engine to use when editing razor webpage files

In VS2013 Preview, we released new Razor V3 runtime and design time Engine to support MVC5 and Razor V3 website’s runtime and design time behavior. Unlike Razor V2 runtime and design time, VS2013 did not GAC these binaries. Instead, the binaries are installed in the project bin folder when corresponding NuGet package is installed, and in...

Introducing $select and $expand support in Web API OData

Last week Microsoft released the preview of Visual Studio 2013, and along with it came the ASP.NET and Web Tools for Visual Studio 2013 Preview. In this new release, we are expanding the OData support in Web API to include support for $select and $expand, two of the most popular OData query operators. In this blog post...

Understanding OWIN Forms authentication in MVC 5

Overview The new security feature design for MVC 5 is based on OWIN authentication middleware. The benefit for it is that security feature can be shared by other components that can be hosted on OWIN. Since the Katana team did a great effort to support the OWIN integrated pipeline in ASP.NET, it can also secure apps hosted on IIS, including ...

Manage CORS policy dynamically

Brief We introduced CORS support in ASP.NET Web API a few months ago. Out of the box it supports configuring CORS policy by attributes. It is a very intuitive and powerful way but lacks flexibility at runtime. Imaging your service allows a 3rd party to consume your service. You need the capability of updating the allowing origins list without...

Fix SPA VB project creating issue for ASP.NET and Web Tools Preview Refresh for Visual Studio 2013 Preview

Issue Unfortunately after installing ASP.NET and Web Tools Preview Refresh for Visual Studio 2013 Preview, creating SPA VB template will fail. (image) This post describes how to fix this issue. Option 1: Fix script I authored these two scripts (one for x86 and x64) to fix the issue. Download here Note: Option 2: Manually fix ...

Make VS2012 MVC4 VSIX template to work for Visual Studio 2013 preview

Visual Studio 2012.2 supports customized MVC4 template, you can get a walkthrough here: http://blogs.msdn.com/b/yjhong/archive/2012/12/13/custom-mvc-4-template-walkthrough.aspx or http://www.asp.net/mvc/overview/getting-started/custom-mvc-templates. But the created template VSIX file cannot be uploaded to VS Gallery at the time. Starting ...