KML_FLASHEMBED_PROCESS_SCRIPT_CALLS
 

The Easiest Way to Build, Publish & Host Websites – Microsoft WebMatrix & GoGrid

August 24th, 2010 by - 17,862 views

Recently, Microsoft announced WebMatrix, a free Web development suite of software and tools that bring together a Web Server, a database and programming frameworks all within a single, integrated solution. WebMatrix allows you to code, test and deploy ASP.NET and PHP applications, all within the same environment. What does this have to do with GoGrid you might ask? Well it’s pretty simple actually, once you have developed your application locally on your PC’s desktop, you will need an easy way to copy it over and show to the world. GoGrid has worked with Microsoft to create a seamless publishing and hosting experience practically effortless.

To make it easy for new GoGrid users, we are offering a $150 GoGrid service credit for you to get started with Microsoft WebMatrix and GoGrid. To get going, simply sign-up here.

GG_WebMatrix_stack_sm

About WebMatrix (and a bit of GoGrid)

Microsoft does a clear job outlining the features of WebMatrix, specifically:

  • Small, but complete package – simply download and install WebMatrix for free on your desktop. From there, you can immediately start to use the built-in webserver, database and programming framework to jump-start your web-development. And, you can quickly get started on the hosting side of things as well by deploying a GoGrid server that is ready to automatically connect to WebMatrix.
  • Grows with you – you start simple and then grow as your application and development grows, much like that of Cloud Computing. As your coding expands, you can easily integrate Visual Studio into your work environment. Similarly, you can update the built-in database from SQL Server Compact to a full-blown Microsoft SQL Server.
  • Start > Open Source – if you aren’t ready to start from scratch, WebMatrix includes a variety of popular and free open source applications like WordPress, Joomla!, Umbraco and DotNetNuke. Just choose your software package from the library and WebMatrix will download and install the software. And you can tweak each environment using the built-in code editor.
  • Database made simple – don’t let data-driven websites scare you either. If your web application needs to serve data like a online catalog or CMS, WebMatrix has you covered by providing a small, embedded database (SQL Server Compact). But the really nice thing is, once you are done doing all of the development on your Desktop, you can publish your database quickly and easily to your GoGrid production environment.
  • Elegant interface, simple experience – WebMatrix has editors galore! It includes a rich code editor and database editor, but also has easy management consoles for SEO, web server management and FTP publishing as well. Couple this management with the ease of use of the GoGrid portal and you can’t go wrong.
  • Simple to code – at GoGrid, we have always believed in adhering to industry standards when it comes to hosting and managing infrastructure. WebMatrix follows a similar suit by sticking to HTML, CSS & JavaScript standards. Your code is easy to read and by using the software suite, you can do some learning in the process as you create your next web application.
  • More than “Hello, World” – WebMatrix has a variety of built-in code helpers that make development even easier by simply tagging your HTML.
  • Desktop or server, it’s all the same – moving from a desktop development environment to a full-fledged production environment is practically effortless since the Desktop version is built with the same frameworks, web server and database engine as production servers.
  • Tightly knit, fully integrated – WebMatrix also acts as the “traffic cop” because of its integration with IIS Developer Express and other Web server components that run your site. You can monitor things in real-time and if an issue pops up, it helps you to track down and resolve that issue.
  • Optimized for search – you no longer need to pay a 3rd party to ensure that your website or application is SEO optimized. Built in guides assist you in optimizing your site to the fullest.
  • Site publication – once you are ready to move your web site or application to a robust production environment, WebMatrix can help in that selection process. But you may not even need that since GoGrid has partnered with Microsoft to provide a full production-ready environment within the GoGrid cloud. And, we are giving new GoGrid users a $150 service credit to make that on-ramp even faster!

Now that you know a bit about what Microsoft WebMatrix (and GoGrid) can do for you, let’s learn a bit more about it.

Getting Started with WebMatrix & GoGrid

There are two components to setting up the WebMatrix and GoGrid environments: Desktop and Server. The Desktop environment is the one where you do all of your coding and development, all within the WebMatrix development suite. The Server environment on GoGrid is where you will host the product of your labors.

Starting with the Desktop side, you will need to download the WebMatrix installer which is located at: http://www.microsoft.com/web/webmatrix/.

Installing the Desktop version of WebMatrix

Initiating the installer. Do note that depending on your choices, the installation process could be a bit longer:

Web_Platform_installer_1

The Installer confirms your selections:

Web_Platform_installer_2

Be sure to set up a secure password for SQL Server Express (you will be prompted to change it if it isn’t very secure):

Web_Platform_installer_3

Go grab a cup of coffee while the components are downloaded and installed:

Web_Platform_installer_4

Once the installation is complete, you will receive a confirmation screen:

Web_Platform_installer_5

Installing an Application (e.g., WordPress) via WebMatrix Locally

Once your installation of WebMatrix is complete, you can either start coding on your own, or install a pre-configured Open Source application. In this case, I chose to install WordPress. There are other items that you can install as well, including:

  • DotNetNuke Community Edition
  • nopCommerce
  • Gallery
  • WordPress
  • Umbraco CMS
  • mojoPortal
  • ResourceBlender.NET
  • Kentico CMS for ASP.NET
  • BlogEngine.NET
  • Acquia Drupal
  • ScrewTurn Wiki 3.0
  • Gallery Server Pro
  • nService
  • Moodle
  • Sitefinity Community Edition
  • DasBlog
  • SugarCRM
  • Subtext
  • SilverStripe CMS
  • Joomla!
  • Mayando
  • AtomSite
  • My Web Pages Starter Kit
  • phpBB
  • KoobooCMS

Web_Platform_installer_6

You choose which Web Server you want to use. I chose Microsoft WebMatrix.

Web_Platform_installer_7

The Installer confirms your installation choices:

Web_Platform_installer_8

Since WordPress uses MySQL, you need to configure a secure password for it:

Web_Platform_installer_9

Time for another cup of coffee while the installer runs:

Web_Platform_installer_10

Once you have completed the installation, you can begin configuring your WordPress (or other application) install on your local machine. Just launch WebMatrix from your Start menu:

WebMatrix_quickstart

I clicked on My Sites:

WebMatrix_mySites

The WebMatrix management console has everything you need right at your fingertips:

WebMatrix_wordpress

You can edit files using the built-in code editor that is complete with context-color-coding:

WebMatrix_code_editor

Similarly, you can manage your database (in this case, MySQL) through the database console:

WebMatrix_db_manager

Creating a GoGrid Server Ready for WebMatrix Publishing

The beauty of the WebMatrix install is being able to develop locally on your Desktop and then publish your final site to a production server on GoGrid. Before you can do the publishing, you need to set up a GoGrid server running WebMatrix. Be sure to take advantage of our $150 GoGrid Service Credit by signing up here.

Once you log into the GoGrid Portal, click the Add button and then select Cloud Server. Within the Image Selection widget, choose the “WebMatrixServer2″ image:

GG3_webmatrix_image2

After that, configure your server and click Save:

GG3_WebMatrixServer_details

Within a few minutes, you will have your production environment ready to go. At that point, you need to use a Remote Desktop Connection to remotely manage your server. Remember that the Administrator password is within the Support > Passwords section of the GoGrid portal.

Getting Your GoGrid /WebMatrix Server Environment Ready

Once you connect to your server running on GoGrid using a Remote Desktop Connection (RDC), you will see two files on the desktop, a Getting Started document and a link to Microsoft WebMatrix.

To quickly summarize, here are the high-level steps you need to complete on the GoGrid Server:

  1. Run the Certificate Preparation script
  2. Change the Default Application Pool
  3. (Recommended) Change your MySQL or SQL Server password from the default one listed in this blog post

GG3_WebMatrix_help_desktop

1) Certificate Preparation Script

Before you configure your publishing environment, you need to run a Certificate Preparation script on the server. It is located at: C:/certprep/CertPrep.exe. Simply double-click the application and it will run quickly. You will see a DOS prompt pop up briefly and then automatically close.

WebMatrix_certprep

2) Change Default Application Pool

In order for the publishing to work properly, you do need to change the Default Application Pool from version 2 to version 4. To do this, go into your IIS manager on the server, select Application Pools, select “DefaultAppPool” (which will probably say “v2.0″) and make the change (to “v4.0″) as shown below:

Webmatrix_defaultAppPool

Original Setting:

WebMatrix_DefaultAppPool_v2

Updated Setting (Note: it might show a different version – just choose the v.4.0.xxxxx one):

WebMatrix_DefaultAppPool_v4

3) Change Default Database Password

While this is not a required step, it is a recommended one. You might want to change the default password on your MySQL or SQL Server database from the default one that the server starts with. Just use the appropriate method for the database that you are using.

Editing & Publishing from Local Environment to GoGrid

Now, we will dive into the publishing to your GoGrid server. For a test, I made some edits to my WordPress theme locally. I wanted to see how it could be pushed over to WebMatrix running on the GoGrid Server instance. Here is the minor code change:

WebMatrix_code_added_locally

And how it appears in the local version of my WordPress blog:

WebMatrix_wp_code_added_local

The Getting Started guide which resides on the GoGrid WebMatrix Image will tell you how to configure your local development environment for publishing, specifically:

  1. Click Start and Microsoft WebMatrix Beta.
  2. Click Site from Gallery or create your own website
  3. Click Publish
  4. Enter the following information in the Publish Settings dialog:

Protocol: Web Deploy
Server: http://IP address e.g. “http://111.222.33.44″
Username: Administrator
Password: password of local Administrator account (you can get this from the GoGrid portal)
Site Name: Default Web Site
Destination URL: http://IP address

If your application needs a database connection, use the following formats in the Publish Settings:

SQL: Data Source=.\SQLEXPRESS; Initial Catalog=gogrid_db;User Id=sa;Password= $trongPassw0rd;
MySQL: Server=localhost;Database=gogrid_db;Uid=root;Pwd=$trongPassw0rd;

Note: If you changed the default password on your server, be sure to change it in the appropriate string above.

Within WebMatrix locally, click on the Configure button under Publish:

WebMatrix_publish_config

You will see the Publishing Settings:

WebMatrix_web_deploy

Fill in the Publishing Settings as per the list in the Getting Started guide (as mentioned above):

WebMatrix_web_deploy_config

Once you enter in all of the information, be sure to push the “Validate Connection” button. Assuming you have no validation issues, you can proceed with the publishing of your code/site. Clicking “Publish” will show you a confirmation screen of the files that will be published. If you want to include your database, be sure to check off that box:

WebMatrix_publish_preview

Click “Continue” to publish your site/code (and database). WebMatrix will start publishing your content. You will see a status bar at the bottom showing the progress:

WebMatrix_publish_uploading

Clicking on “More Details” can show you what is happening:

WebMatrix_uploading_details

Once you publish the site (using the Publish button) and send over the database, you may also need to change which Default Document loads first. By default, it is Default.htm. In order to have the WordPress default document show up, you should move Index.php to the top of the list within your IIS manager. Once you do that, the WordPress blog (in this case) will load, complete with the changes you had made locally:

WebMatrix_published_WP_blog

Now, any changes that you do locally on WebMatrix can be published to your GoGrid Server.

Summing It Up

Obviously, you don’t need to use one of the pre-packaged webapps that are available. You can just as easily create your own custom code and publish it the same way as I have outlined above. Regardless, using the GoGrid/WebMatrix combo does fulfill a variety of end-to-end development, testing and publishing scenarios. And with the $150 GoGrid service credit, you can test out this environment to see if it meets your needs.

Let me know how it goes or if you have any questions!

The following two tabs change content below.

Michael Sheehan

Michael Sheehan, formerly the Technology Evangelist for GoGrid, is a recognized technology, social media, and cloud computing pundit and blogger who writes regularly about technology news and trends.

Leave a reply