WebMatrix 2 Beta - Remote Site Editing

Remote site editing is integrated in to WebMatrix 2.  This allows for users to quickly edit content from both the original computer where they published from or a completely different computer.

Life After Publishing

Once you’ve published a site, you can continue to edit and build on your site.  In this example, I’ve just published my customized Personal Site that I built from one of the ASP.NET WebPages templates in WebMatrix 2.
image

I just don’t really like the hover background color scheme.  So instead of editing locally I can quickly edit remotely and then pull down the changes.

First, I have to open the remote view:
image

The Remote View gives me the remote file list.  I can open any file from the remote site and get a similar editor experience to that of a local site.
For now, I just want to edit the Site.css and change the hover background color:

image

You’ll get a limited set of Intellisense when editing remote files.  HTML, CSS and other static page types will have fully supported Intellisense.  As you can see above, the CSS color picker helped me quickly change the hover background.

When you run the remote site, WebMatrix will save the remote file:
image

Keeping Files and Databases In Sync

After you’ve made remote changes or if your site has been collecting a lot of user generated content, you can bring down the changes to your development machine.

From the same site, go back to the Remote tab and click Sync Remote to Local:
image

You’ll be prompted with the list of files that have changed and an option to select databases if you have previously published them.
image

Now your changes and user generated content is in sync locally. 

One important thing to remember, if you are pulling down database or file content, you will replace the existing content.  It is wise to backup both databases and file content prior to pulling back.

Other Tips and Tricks

Remote file editing works with both FTP and WebDeploy.  This means you should be able to use this with almost any web hosting provider around.  FTP pull back works with files, but not databases.  You should continue to use existing tools to manage remote databases if you’re using FTP publishing within WebMatrix 2.

You don’t have to have previously published your site with WebMatrix to use this feature.  Just download and install WebMatrix then connect to your remote site to get started.

If you want to see the results of this edit and an example of using this ASP.NET WebPages template just head over to the live version of this demo at: http://testerbob.beta.cytanium.com/

Try this whole workflow out with your own site using the free trial web hosting providers!

No Comments