Develop Locally & Publish into the Cloud with Microsoft WebMatrix & GoGrid Cloud Computing

GG_WebMatrix_stack_sm_thumb1

DISCLOSURE: I work at a Cloud Computing Infrastructure Service Provider (GoGrid) where I get to evaluate and talk about various solutions coming from our company as well as from our partners. I normally don’t cross-post articles, unless I feel that they are relevant and can provide a service to multiple audiences. Over the past few weeks, I have been evaluating a solution from Microsoft (a GoGrid Partner) called WebMatrix and I wrote a “How To” article on the GoGrid blog on how to develop web applications on your local computer and then push your applications and code to a GoGrid Cloud Server. HighTechDad.com is actually running on GoGrid and since I frequently write How To articles and do reviews on HighTechDad, I thought that my readers might find this new solution from Microsoft (and GoGrid) something of interest. Below is the entire blog post that appeared on the GoGrid blog. I hope you find it useful and helpful!

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!

HTD says: Did you find this solution helpful? Do you have questions about GoGrid? Please let me know!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Other articles of interest

Global Product Review Disclosure

Disclosure: This is a global disclosure for product review articles on HighTechDad. It does not apply to Automobile reviews and there are other exceptions. Therefore, it may or may not be applicable to this particular article. I may have a material connection because I may have received a sample of a product for consideration in preparing to review the product and write this or other content. I was/am not expected to return the item after my review period. All opinions within this and other articles are my own and are typically not subject to the editorial review from any 3rd party. Also, some of the links in the post above may be “affiliate” or “advertising” links. These may be automatically created or placed by me manually. This means if you click on the link and purchase the item (sometimes but not necessarily the product or service being reviewed), I will receive a small affiliate or advertising commission. More information can be found on my About page.

About HighTechDad

Michael Sheehan (“HighTechDad”) is an avid technologist, writer, journalist, content marketer, blogger, tech influencer, social media pundit, loving husband and father of 3 beautiful girls living in the San Francisco Bay Area. This site covers technology, consumer electronics, Parent Tech, SmartHomes, cloud computing, gadgets, software, hardware, parenting “hacks,” and other tips & tricks.

Recent Articles

Explore Categories