.NET Blog
Free. Cross-platform. Open source. A developer platform for building all your apps.
Latest posts
Dual Mode Sockets – Never create an IPv4 Socket again
The Problem:If you’ve worked with network programing in recent years you’ve probably had to grapple with the IPv4 vs. IPv6 issue at some point. In short, IPv6 is a great new technology for the future of networking, but most applications will still have to support IPv4 for several years during the transition. Working at the socket layer developers most commonly address this by creating both an IPv4 and IPv6 socket and then juggling them back and forth as needed. Some existing System.Net APIs do this for you, such as: These APIs were a helpful mitigation but they only covered a subs...
C# is the “Language of the Year”
It’s a great way to start a new year: the PYPL index has named C# the language of the year. This index focuses on the leading indicator of learning a language. It’s nice to see that there’s been increased interest in C# over the past year. In the spirit of learning something new, here’s what we suggest you check out if you’re looking to learn a new C# trick. What new C# skill would you recommend everyone learn? Share your thoughts in the comments.
A quick tutorial on the Update-Package command
Among the supported commands in NuGet's Package Manager Console, Update-Package is arguably the most powerful in terms of its supported parameters and switches. The primary purpose of the command is to update package(s) in your projects to a higher (possibly latest) version. However, the provided parameters allow you to twist this behavior in many different ways. In this post, I'm going to give a quick tutorial on what possible ways you can invoke the command. In total, the Update-Package command offers eight parameters (in addition to the built-in PowerShell parameters): Although the type of the -Version par...
New Tutorial Series and Sample Application for ASP.NET MVC 4 with Windows Azure Tables, Blobs, and Queues
On December 19 we published a new tutorial series and accompanying sample application that shows how to work with Windows Azure Storage tables, queues, and blobs in a multi-tier application that uses ASP.NET MVC 4 and ASP.NET Web API. The sample application is an email service that runs in a Windows Azure Cloud Service. The front-end is a web role that manages mailing lists, subscribers, and messages. The back-end is a pair of worker roles that handle scheduling and sending emails. There are five tutorials: one provides an overview of the application, one shows how to download and run the completed applicat...
MVC Single Page Application Template Update for ASP.NET and Web Tools 2012.2 RC
We added a C# MVC Single Page Application (SPA) template in ASP.NET Fall 2012 Update BUILD Preview. John Papa had written a detailed blog about the preview version. With help of John Papa’s detailed feedback and sample code, we’ve rewritten and reorganized the JavaScript code to make it more structured in RC. We really appreciate the help from John Papa. He just wrote another blog about SPA template in RC version. The major improvement for the MVC Single Page Template RC release includes the following: 1. Added VB MVC SPA template for .net framework 4.5 and 4.0. 2. Added WebAPI HelpPage support 3. Moved all t...
‘Paste JSON As Classes’ in ASP.NET and Web Tools 2012.2 RC
‘Paste JSON As Classes’ is a cool feature in ASP.NET and Web Tools 2012.2 RC. This feature will help you generate strongly typed classes in C# or VB.NET from valid JSON text. With ASP.NET and Web Tools 2012.2 RC installed, you will see new menu option like below for C# and VB.NET Website and Web Application projects only. This new menu option will be enabled for .cs and .vb file extensions inside these projects: JSON to C#/VB.NET class conversion To use this feature, just copy sample JSON text and “Paste JSON As Classes” inside .vb or .cs file. This feature uses Newtonsoft JSON parser to parse JSON t...
SignalR: Building real time web applications
Note: This sample is targeting SignalR 1.0.1 SignalR offers a simple and clean API to write real time web applications where the server needs to continuously push data to clients. Common applications are chat, news feed, notifications, multiplayer games. In this sample, I demonstrate powerful features like: Server Server derives the Hub class, and it handles incoming requests in two ways: Server is also pushing data to clients in two ways using the BackgroundThread class: As you can see, dynamic methods define the events that need to be handled on t...
Downloading the .NET Framework and Visual Studio Express Editions and SDKs
Update: An updated version of this content is available: Get the latest .NET Bits. We see a lot of daily traffic through the .NET blog and the .NET dev center on MSDN. It is clear from the web traffic data that a key task for many of you is downloading more .NET software, to expand your options and experience developing .NET apps. The number one download for .NET is the .NET Framework –the latest version being the .NET Framework 4.5. However, we also see a lot of activity downloading Visual Studio and the many SDKs that you can install to expand its capabilities. The purpose of this post is to direct you to th...
C# memory model articles
Igor Ostrovsky is one of the minds behind the parallel programming support in the .NET Framework. Igor's recently written a great set of articles for MSDN Magazine to cover "The C# Memory Model in Theory and Practice". Part 1 is available now in the December 2012 issue, and it's a great read.