.NET Blog

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

Latest posts

Jul 11, 2013
Post comments count 0
Post likes count 0

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

Xinyang Qiu

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.   With “Enable Edit and Continue” on, the VS debugger starts your web application in IIS Express. When you stop debugging, IIS Express is closed too. With this behavior, you will see the IIS Express system tray shows up during debugging and gone after debugging. This behavior is the same as in VS2012 when the Enable Edit and Continue option is tu...

Jul 10, 2013
Post comments count 0
Post likes count 0

HttpClient 2.2 is now RC

Immo Landwerth

Today we are happy to announce the next step in providing a portable HttpClient with automatic decompression: we just pushed the RC version to NuGet. From Beta to RTM We haven’t changed much since the beta we shipped three weeks ago – simply because we didn’t have to. In general we follow these steps when shipping functionality via NuGet: For HttpClient 2.2 we’ve changed the following since the beta: Summary Today we’ve shipped the RC for HttpClient 2.2, which updates HttpClient by adding support for automatic decompression. It's supported on .NET 4.0, Windows Pho...

Jul 10, 2013
Post comments count 0
Post likes count 0

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

Xinyang Qiu

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 “%ProgramFiles (x86)%\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\Web\Razor\v3.0” to support design time. As in VS2012 to determine which razor v1/v2 design time dlls to load, VS 2013 preview first use web.config file key <add key="web...

Jul 5, 2013
Post comments count 0
Post likes count 0

Introducing $select and $expand support in Web API OData

Javier Calvarro Nelson

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 we’ll cover the following topics: What are $select and $expand The $select operator allows a client to pick a subset of the properties of an entity to be retrieved when querying a feed or a single entity. The $expand operator allows a client to retri...

Jul 3, 2013
Post comments count 0
Post likes count 0

Understanding OWIN Forms authentication in MVC 5

Hongye Sun - MSFT

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 ASP.NET MVC, Web API, Web Form. Forms authentication uses an application ticket that represents user's identity and keeps it inside user agent's cookie. When user first accesses a resource requiring authorization, it will redirect user to login page. After the user provides ...

Jul 2, 2013
Post comments count 0
Post likes count 0

Manage CORS policy dynamically

Xueyuan Dai

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 compiling and deploying your service each time the list changes. In following this article, I show you two examples of dynamically managing your CORS policy. Prerequisites Set up the test environment CORS Service Create a WebAPI project. It co...

Jul 2, 2013
Post comments count 0
Post likes count 0

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

Xueyuan Dai

Issue Unfortunately after installing ASP.NET and Web Tools Preview Refresh for Visual Studio 2013 Preview, creating SPA VB template will fail. 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 If for some reason you can’t run the scripts, you can fix the issue by altering template files.  

Jun 29, 2013
Post comments count 0
Post likes count 0

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

Xinyang Qiu

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 6/26/2013, you can upload the MVC4 template VSIX files to VS Gallery now.The VS2012.2 created VSIX may not install or work for Visual Studio 2013 preview, however. We need to fix a few thing in the following steps.1. Change source.extension.vsixmanifest file InstallationTarg...

Jun 28, 2013
Post comments count 0
Post likes count 0

Browser Link feature in Visual Studio Preview 2013

Reshmi Mangalore

Browser Link is just a channel between your Visual Studio IDE and any open browser. This will allow dynamic data exchange between your web application and Visual Studio. This feature is enabled by default in Visual Studio 2013 Preview. When Browser Link is enabled we register an HTTPModule with ASP.NET, which will then inject a <script> reference to every page request from the server. It is this JavaScript that does the magic of connecting the browser to Visual Studio. For Preview, we have a feature called the “Refresh Linked Browsers” that makes use of this channel between browsers and IDE. Because the b...