Introducing IIS Express

Original author: Scott Gu
  • Transfer
Today, developers create and test ASP.NET sites and applications using one of two web servers:
  • ASP.NET Development Server, which is built into Visual Studio
  • IIS Web Server, which is built into Windows.
Each has its own advantages and disadvantages, many developers have told us more than once - “I would very much like to use ASP.NET Development Server with ease, but at the same time have all the power and capabilities of IIS on board.” Today, I am pleased to present you the free version of IIS Express, which combines the best qualities of both web servers and makes it even easier to develop and run ASP.NET sites and applications.

IIS Express will work with VS 2010 and Visual Web Developer 2010 Express, run on Windows XP and higher, do not require administrator rights and make changes to the application code. Allows you to work with all types of ASP.NET applications and develop using all the power of IIS 7.x.

How things are today


Before getting into the details of IIS Express, let's quickly go over the ASP.NET Development Server and IIS.

ASP.NET Development Server


The ASP.NET Development Server (also known as “Cassini”) built into Visual Studio has the advantages of an easy and quick start. It does not listen to remote ports (which makes it easier to work in a corporate environment in terms of security), it works even when you do not have administrator rights, it does not require separate installation on the machine. The disadvantage is the incomplete set of web server capabilities. For example, there is no support for SSL, URL Rewriting Rules (which I wrote about recently ), custom security settings, and other features of IIS 7.

image



IIS web server


IIS is an alternative way to run and test applications with Visual Studio. You can configure any web project in Visual Studio to use IIS by right-clicking on the project, going to properties and then selecting the “Web” tab: Using IIS, as a development server, you get all the features of a web server (SSL, URL Rewrite Rules etc.). IIS is a full-fledged web server, which means that you see exactly how your application will work on a public server.

image



But there are also flaws. Many companies prohibit the use of full-fledged web servers on the machines of developers. IIS also requires administrator rights to install and debug projects. Different versions of Windows support different versions of IIS. For example, if you have Windows XP, then you will have IIS 5.1, which does not support all the new features of IIS 7.x. When configuring a web project in VS to use IIS, you will have to reinstall the missing components and go through additional configuration steps.

IIS Express - all the best


We were working on the new IIS 7.x feature, which is optimized for developer scripts, which we called “IIS Express”. We think it combines the ease of use of ASP.NET Web Server with the full power of IIS. Here is a list of features:
  • It is lighter and easier to install (less than 10Mb to download and super-fast installation)
  • Does not require administrator rights to run / debug applications from Visual Studio
  • Provides a complete set of web server features, including SSL, URL Rewrite, support for media and other IIS 7.x modules
  • Supports the same web.config extension model as IIS 7.x
  • It can be installed next to IIS and ASP.NET Development Server, it does not conflict absolutely
  • Runs on Windows XP and higher, provides all the benefits of IIS 7.x on all OS platforms

On IIS Express (as well as on ASP.NET Development Server), you can quickly launch any site from a directory on disk. It does not require any registration or configuration steps. All this allows any web developer to work simply and tastefully.

Integration with VS 2010


We took care of the simple integration of IIS Express in Visual Studio 2010. You can use it instead of ASP.NET Web Server, as the default web server for ASP.NET projects. As with ASP.NET Development Server, you do not need to register a site or virtual directory for IIS Express. It uses the same operating model as ASP.NET Web Server today, but only provides more features.

When I press F5 to start an ASP.NET project, Visual Studio will automatically launch IIS Express and use it to start / debug applications (no additional settings are required). As with ASP.NET Web Server, IIS Express will appear in the taskbar tray:

image

By right-clicking on the icon and selecting “Exit”, you can easily turn off IIS Express. You can also see a list of all running sites, as well as their location on disk and the .NET version: Two cool features:

image


  1. The launched “Test Site”, like IIS Express itself, lives in the c: \ users \ [username] directory. This allows not being an administrator to use IIS Express, sites and other scenarios that are not possible with the full version of IIS (including the ability to run IIS Express, both in a corporate environment with limited security settings and in school workstations with limited access).
  2. The launched “Test Site” supports HTTP and HTTPS access methods. IIS Express automatically installs a self-signed certificate and includes URL ACLs and SSL certificates for ports, so developers (working with non-administrator privileges) can use SSL without requiring an increase in privileges for additional installation or configuration. This allows you to configure secure pages directly in applications (like login forms) on SSL and test during development, as on a real web server.

IIS 7.x Feature Set


Today, IIS Express is as easy to use as ASP.NET Web Server. But, given the fact that IIS Express is based on IIS 7x, you have a fully functional web server in your hands. You can run your applications as if on a real external web server. In addition to situations like with SSL, you can use modules such as: URL Rewrite, Media Extensions, Dynamic Compression, Advanced Logging, Custom Security and so on.

In addition, IIS Express supports classic ASP and other types of files and extensions that IIS supports, all of which make it ideal for sites that combine different technologies.

Conclusion


We think IIS Express will make it much easier to create, run and test web applications. It works with all versions of ASP.NET and supports all types of ASP.NET applications (including Web Forms and MVC). What's even better - you do not need to change anything in the code . You can use it for your projects today.

Public beta release of IIS Express coming soon. You can right-click on any folder and launch the website located in this directory in IIS Express. Later this year, we will release the Atch for VS 2010 and Visual Web Developer 2010 Express, which will allow IIS Express to be used by default instead of the built-in ASP.NET Developer Server. Future versions of Visual Studio will be equipped with this functionality by default.

Also popular now: