Tag: ASP.Net

Build Windows – Day 2

Day 2 got off to a great start with a great Keynote.  Jason Zander and Scott Guthrie showed some of the great new features coming in Visual Studio 11 / .Net 4.5.  We also got our first peek at some of the work being done in Windows Server 8.  (If you don’t know PowerShell I would highly recommend learning!)  Hopefully later today the video will become available on Channel 9 and I’ll update this post with a link.

Sessions

This is just a brief overview of the sessions I attended and the topics covered.  I’ll cover most of the details in depth in future posts so check back over the next couple of weeks.

What’s new in Visual Studio 11 – Jason Zander (TOOL-820F)

I started out the break out sessions with “What’s new in Visual Studio 11”.  Lots of cool new features!  First off, all the power pack tools are built in out of the box.  There are a lot of enhancements to the UI, with a focus on streamlining tasks and reducing clutter.  For example the find dialog has been replaced with an floating drop down in the editor.

The XAML editor from Expression Blend now replaces the old XAML editor.

The XML/XAML/HTML editor now has tag matching.  If you change a beginning

tag to a tag the matching

tag automatically updates to a </span> etc.

The CSS Editor now has a color picker that displays in-line as you are typing your CSS.  The picker is also smart enough to display the colors you have already used in your style sheet as the first options.

Using Windows Server 8 for Building private and public IaaS clouds – Jeff Woolsey, Sandeep Singhal, Yingal Edery (SAC-429T)

Lots of cool new stuff coming in Windows Server 8,  Especially in Hyper-V.   During the session the demonstrated the new live migration by moving a virtual machine running on one host (using local storage, not shared storage, the vhd was on the host machine’s physical disks) to another host while it was running.  The whole process took just a couple minutes and the virtual machine continued running the whole time!

 ASP.Net 4.5 loves HTML , CSS3 & JavaScript – Matt Osborn (TOOL-76T)

Matt gave a great presentation on HTML 5 in ASP.net 4.5 and Visual Studio 11.  He showed off a number of enhancements in the IDE like:

  • Auto Tag matching
  • CSS Color Picker
  • Automatic DocType detection
  • Intellisense for Character Set Meta Tags
  • CSS Folding and Formatting

We looked at the new Minification feature that is available to automatically compress and combine your CSS style sheets and JavaScript files.  (I believe This is now available as a NuGet package for Asp.Net 4.0 as well).

He also talked a bit about what we can do to use HTML 5 in ASP.net 4.0 today using Modernizr and graceful degradation.

Create rich, data-driven Web apps with ASP.Net 4.5 Web Forms – Damian Edwards (TOOL-906T)

In this session we went through building an application using ASP.Net 4.5 Web Forms and Entity Framework 4.1 (aka. Magic Unicorn Edition 🙂 ) .    Web Forms now has ModelBinder support just like MVC, Strong Typing in bound controls, Data Annotations can now be tied to a validation summary to provided validation feedback, and much more.

Today’s Schedule

I am looking forward to attending these sessions today:

  • Future Directions for C# and Visual Basic – Anders Hejlsberg
  • Creating immersive data experiences with Entity Framework – David Annsley-DeWinter/Jeff Derstadt
  • Building IIS and ASP.Net apps with the power of async –  Damian Edwards / Phil Haack
  • Building high performance Metro style apps using HTML 5 – Mathias Jourdain

Deploying ASP.Net MVC3 to Windows Azure

So the first question is can I run an ASP.Net MVC3 WebRole on Windows Azure?   The short answer is yes.  The long answer is, well long.  First off the tooling in Visual Studio 2010  does not directly support creating an ASP.Net MVC3 Webrole (pre SP1 at least, I haven’t beenable to install the SP yet so I can’t comment on the support with that installed, but I hear it will get better), so you have to do it manually.
To get things set up was pretty straight forward, just create your new ASP.Net MVC3 web application,
New ASP.Net MVC3 Application
and then add a new Windows Azure Project to the solution.
New Windows Azure Project
Now you will have to wire up the web role in your Azure Project.  To do this right-click on the Roles folder under your Azure Project and select Add | Web Role Project In Solution and select your project.
Assuming that you have done some work in your ASP.Net MVC3 Project and it is working and ready to deploy there is one more item you’ll need to address.   The Window Azure Hosted Services will not by default have all the assemblies you need to run your site.  To get around this you have a couple of options.  The way I did it was to make sure I had references to these assemblies (you may not since MVC apparently dynamically loads some of them at run time), and then for each one I went to properties and set CopyLocal to True.
Here is the list of assemblies I had to add.
  • System.Web.Mvc
  • Microsoft.Web.Infrastructure
  • System.Web.Razor
  • System.Web.WebPages
  • System.Web.WebPages.Razor
  • System.Web.Helpers
  • System.Web.WebPages.Deployment

Your list may be slightly different.  If you miss one you will get a “Yellow Screen of Death” .

Error Sample

Just add that assembly to your list and try again…

Good Luck!

Microsoft Releases ASP.NET MVC 3.0, IIS Express, SQL Server Compact Edition 4.0, WebMatrix and more…

About a week ago (January 13th, 2011) Microsoft released a slew of developer tools to the web.

IIS Express 7.5

This is the item I am most excited about.  IIS Express is a free version of IIS 7.5 that can be used by developers when building web site.  It’s somewhere between Cassini (the ASP.Net development server) and a full blown IIS 7.5 install.  It provides support for SSL, URL Rewriting, and other IIS 7.x modules, while remaining under a 5mb download and running under non-administrator accounts.  It runs on Windows XP and higher and will run side by side with a full IIS install or Cassini.

Visual Studio 2010 SP1 (currently in Beta) will add support in Visual Studio for setting IIS Express as your default development server.

You can download IIS Express 7.5 and run it without SP1 for Visual Studio if you wish, but you will need to manually start the server.

Related Blog Posts:

Scott Guthrie: Introducing IIS Express

Scott Guthrie: VS 2010 SP1 (Beta) and IIS Express

ASP.NET MVC 3.0

Asp.Net MVC 3.0 is a very large release including:

  • The new ‘Razor’ View Engine which minimizes the number of characters used in you mark-up when data binding.
  • Improved JavaScript support.
  • Improved Validation.
  • Partial page output caching.
  • Better support for Dependency Injection and IOC Containers.

Get your hands dirty by downloading ASP.NET MVC 3.0 and trying out some demos on http://www.asp.net/mvc/.

NuGet

Nuget is a free, open source package manager that makes it easy for .NET developers to include open source libraries in any type of project from ASP.Net Web Forms to WPF.

Get the installer @ nuget.org and get started using all that open source goodness like NUnit, NHibernate, Castle.Windsor, and more.

Get more info:

Scott Hanselman’s Blog

Scott Guthrie’s Blog