Web Hosting Server Software


It's all very well being able to view our sites and see that they work, but if they are intended for others to view, such as our Cornflakes at Midnight site, we usually want to put them online so that they're visible just like any other website, rather than having them confined to just those who can peer over your shoulder at your screen. To allow us to do this in a live environment, we usually need two main things:

  • Web server software – The software that takes the requests for pages such as www.mySite.com, processes the ASPX file for the page, and returns the result to the end user.

  • A database management system – This is only necessary if our application makes use of a database, and could be a product such as MSDE, SQL Server, Oracle, or MySql.

Once we've configured our live environment – the database software, the web server software, and any other programs required – we need to transfer the application we've developed and move it to this environment from wherever it was created – usually our local machine. We'll come back to that in a while; for now let's take a look at server software, starting with web-servers.

Dedicated Web Server Software

One of the main limitations with the environment that Web Matrix gives us is the ability to host pages. The built-in web server that is started when the Start button is clicked on the toolbar only allows the web pages developed to be viewed on your local machine. If your computer is on a network, no users on other machines could view it, let alone people across the Internet. That's not to say that the web server included with Web Matrix isn't useful; when developing, it provides us with most of the features we need to view and test our websites. Obviously, if a site is to be made visible to other people once completed, we need to find an alternative.

Thankfully, Microsoft is a step ahead of the game on this one, and included with all versions of Windows 2000, the Professional edition of Windows XP, and Windows .NET Server (all editions), is IIS (or Internet Information Services). IIS has been Microsoft's software platform for hosting web applications since the mid-90s, originally catering for classic ASP applications, and now providing us with a means of publishing our ASP.NET websites.

The version that is included with Professional (desktop) editions of Windows is very similar to the version that comes with Server editions. The main differences are the inability in the former to create more than one website at once (multiple applications can be hosted within a single site though), and the limit of five simultaneous requests to the site. For individual or group development, and testing purposes, the Professional edition is great. In a live environment, an installation of Windows 2000 Server or the soon to be released .NET Server really is necessary for sites to be hosted.

One further difference between IIS and the web server included with Web Matrix is the ability of the former to make use of security features, such as SSL (Secure Sockets Layer). SSL allows us to secure our applications by encrypting the data sent between the web server and the web browser. If ever you've been to a website where Internet Explorer shows a padlock in the status bar, you'll have been making use of SSL certificates, possibly without knowing it. These certificates can be bought from companies such as VeriSign (www.verisign.com), and installed on a web-server, allowing data such as credit card details to be transferred securely.

The screenshot below shows us just some of the options provided by the Internet Services Manager tool that comes with IIS (more information on IIS can be found in Appendix A):

click to expand

When compared with the dialog that is shown by clicking on the system-tray icon for Web Matrix's server, this should make it clear just how much can be configured with a full-blown web server:

click to expand

If you are running one of the versions of Windows that was listed above that includes IIS, then you can refer to Appendix A of this book for details on how to set it up to host your web applications. If not, then unfortunately there are (at time of writing) few other pieces of Web server software available that provide a good platform for hosting ASP.NET applications.

Alternative Database Servers

When we've been working with the Data Explorer in Web Matrix, we've always been connecting to the database server that we installed at the start of the book – the freely available MSDE. This is by no means the only database product available, though. Microsoft itself has several other offerings, including Access, FoxPro, and SQL Server. Other companies produce yet more products, such as Oracle, Informix, and MySQL. While each of these performs a very similar function – storing and allowing the retrieval of data in tables, very similarly to MSDE – each has its own benefits and drawbacks. For instance, MySQL is free and supported on operating systems other than Windows, while Oracle is widely accepted as being the most suitable for enterprise level usage (where whole corporations are relying on the one database).

Like the other options, MSDE has its own list of pluses and minuses. It its favor, it's free, it's widely available, it integrates exceptionally well with tools such as Web Matrix, and it provides a wealth of features. As Microsoft already has its own enterprise level database software in SQL Server that sells for a few thousand US dollars, it obviously didn't want MSDE to detract from its sales. In order to stop this from being the case, it's added limitations to the operation of MSDE. The most important three of these are:

  • Restricted number of connections – MSDE has been optimized for up to 5 simultaneous users, with performance dropping off if there are more. In a large system, this will cause a drop in performance, potentially making it unsuitable for applications that have hundreds of users at once.

  • Maximum database size –MSDE only allows databases of up to 2GBs in size. All but the largest database will fit within this. For instance, our CAM database is only around 1MB in size.

  • No management utility – Included with SQL Server is a tool called Enterprise Manager. This allows for the database to be backed up, data to be imported into it, security settings to be altered, as well as providing a more advanced way of doing all of the database operations we carried out within Web Matrix. A sample of the interface (and multitude of options) that SQL Server provides is shown in the screenshot overleaf:

    click to expand

Besides being a very capable database server, MSDE has one other feature that puts it head and shoulders above other budget Microsoft database products, if not those of other companies – it is directly compatible with SQL Server. This means that you can develop applications using MSDE, and move them to SQL Server at a later date if there ever becomes any need to do so, because MSDE stands for Microsoft SQL Server Desktop Engine. It is essentially just the database server portion of SQL Server, with the limitations we listed above, as well as licensing restrictions.

Note

The license with MSDE restricts how you are allowed to use it. While it's great for testing applications, if you want to let your clients access the database, you need to consider client-access licenses. For more information, you may want to check out the following page: http://www.microsoft.com/sql/howtobuy/msdeuse.asp

Another major benefit of using MSDE and SQL Server is their integration with Web Matrix, as mentioned above. As a result of this, when we were developing our Cornflakes at Midnight site, we didn't have to leave the development environment in order to create our database, create stored procedures on it, and so on. These two products are the only ones that can be managed in this manner from within Web Matrix – other third-party tools would have to be run to achieve the same effect with alternative database server software

So, when upgrading from MSDE as a site becomes more popular, or needs to use some advanced features, SQL Server is the natural choice. Not only is it a very competent product, it is also directly compatible with MSDE itself, and is catered for by the development environment too. If this migration is ever performed, the Enterprise Manager tool can be used to connect to your existing database, and move it across to SQL Server. The only change that will have to be made to the application is usually the connection string specifying what to use as the database server.

One other point to note about database servers that we've not seen yet is their location. So far, we've always had our database running from the same machine as the web server. In a real-world application, the database server software is regularly running on a separate machine. One of the main reasons for this is that it allows the machine to be optimized with a specific hardware configuration that can provide the best possible performance. Since this hardware can be very expensive, it is more economical, in some cases, to put all the databases on one machine. Additionally, security settings can be applied so that the database server is only accessible from the web servers, and only for certain functions making it more difficult to gain unauthorized access to any sensitive information stored on it (such as credit card numbers).

Important

When talking about databases, the terms database, server and database server regularly get confused with one another. Technically speaking, a database is a store of information (such as pubs) that is provided by database management systems (DBMS). This management system is also know as a database server, but this term regularly implies the hardware that it is running on, as well as the software itself. The server—the machine that hosts the DBS, is often a separate machine from that hosting websites, for reasons discussed above.

Due to the usefulness of Enterprise Manager and other such tools, there have been attempts at creating free versions of software that perform a similar function. Possibly the best known application that is available for maintaining MSDE in this manner is the ASP Enterprise Manager, which provides a web interface to management, and is available from www.aspenterprisemanager.com.




Beginning Dynamic Websites with ASP. NET Web Matrix
Beginning Dynamic Websites: with ASP.NET Web Matrix (Programmer to Programmer)
ISBN: 0764543741
EAN: 2147483647
Year: 2003
Pages: 141

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net