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.
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.
- 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:
The Installer confirms your selections:
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):
Go grab a cup of coffee while the components are downloaded and installed:
Once the installation is complete, you will receive a confirmation screen:
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
- Umbraco CMS
- Kentico CMS for ASP.NET
- Acquia Drupal
- ScrewTurn Wiki 3.0
- Gallery Server Pro
- Sitefinity Community Edition
- SilverStripe CMS
- My Web Pages Starter Kit
You choose which Web Server you want to use. I chose Microsoft WebMatrix.
The Installer confirms your installation choices:
Since WordPress uses MySQL, you need to configure a secure password for it:
Time for another cup of coffee while the installer runs:
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:
I clicked on My Sites:
The WebMatrix management console has everything you need right at your fingertips:
You can edit files using the built-in code editor that is complete with context-color-coding:
Similarly, you can manage your database (in this case, MySQL) through the database console:
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:
After that, configure your server and click Save:
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:
- Run the Certificate Preparation script
- Change the Default Application Pool
- (Recommended) Change your MySQL or SQL Server password from the default one listed in this blog post
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.
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:
Updated Setting (Note: it might show a different version – just choose the v.4.0.xxxxx one):
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:
And how it appears in the local version of my WordPress blog:
The Getting Started guide which resides on the GoGrid WebMatrix Image will tell you how to configure your local development environment for publishing, specifically:
- Click Start and Microsoft WebMatrix Beta.
- Click Site from Gallery or create your own website
- Click Publish
- Enter the following information in the Publish Settings dialog:
Protocol: Web Deploy
Server: http://IP address e.g. “http://22.214.171.124″
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;
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:
You will see the Publishing Settings:
Fill in the Publishing Settings as per the list in the Getting Started guide (as mentioned above):
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:
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:
Clicking on “More Details” can show you what is happening:
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:
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!
Latest posts by Michael Sheehan (see all)
- Get Your Game On in the Cloud - June 11, 2013
- How Software Defined Networking Delivers Next-Generation Success - June 5, 2013
- James Gosling to Speak on Innovation at GoGrid Cloud Meetup on 5/22 - May 16, 2013