Scott Hanselman

UPDATED for 2015: How to install the nodejs Ghost blog software on Azure Web Apps (and the Deploy to Azure Button)

April 20, '15 Comments [9] Posted in Blogging | nodejs | Open Source
Sponsored By

What? Didn't I blog about this before? Yes, in fact, in 2013 I did an article showing how to get Ghost - a lovely nodejs-based blogging app - running on Azure.  The instructions involved making some changes to Ghost itself to make it friendlier to Azure and doing a git deploy. Since this post both Ghost AND Azure have become friendlier. ;)

Fast forward two years and the instructions have changed! In fact, they've gotten WAY easier. You can still theoretically follow most of my old instructions, but these new ones are WAY better, so just do it this way.

STEP 1

There's a "Deploy to Azure" button up at http://deploy.azure.com that you can get an put in YOUR GitHub project's Readme.md so folks can easily and quickly deploy your app as well!

Here's what you do. Head over to the GitHub repository for Ghost Azure. Click Deploy to Azure. That will automatically install Ghost for you in Azure.

The Deploy to Azure Button

The Deploy.Azure.com website will look at the repository from the HTTP Referer header. You'll end up with a nice form like this.

DO make sure to double check your settings, the Site Location is alphabetical right now, and you may not want your blog in Brazil. ;)

image

Hit Next, then check the summary that will warn you what's getting created, then hit Deploy. Boom. Azure will actually run through the template and setup Ghost (or whatever app you wanted) automatically.

  • Note it's setting it up from Source Control as well, although you can certainly change this. For example, you might want to Fork it yourself, and then Deploy.
  • However, as this is set up today, you won't get updates until you go to Deployments within the Azure Portal and click Sync. You decide if you want the app to update when new code is committed.

After it's created, you can manage your site in the Azure Portal. I made a little free one for this example, as can you if you like.

Ghost in the Azure Portal

And it works just great!

Ghost running on Azure

It's not super obvious what to do next. You'll need click the little chevron there, or visit something like /admin, and you'll get redirected to the Ghost setup process online.

image

Now you can start your first post!

My first post in Ghost

What's going on here?

Felix Rieseberg added a few files to Ghost and has the fork up here on GitHub. The most interesting one is the AzureDeploy.json. This is an Azure Resource Manager template. Here's another simple example from Elliot Hamai for an ASP.NET MVP app. This file tells Azure (and the Deploy to Azure button) what kinds of things it needs to create and actually gives the system enough information to build a whole form for you!

Maybe this is the perfect time for you to start your own blog! Perhaps you've been putting it off. Go check out my FREE two-hour documentary movie with Rob Conery called Get Involved in Tech! We will get you ready to jump into the world of Social Software Development.

Here's a video of Elliot and I talking about the Deploy to Azure button on Azure Friday. Here's Elliot's blog announcing Deploy to Azure and explaining more.

Remember that Ghost is open source and you can learn more at https://ghost.org!

DON'T WANT TO SIGN UP FOR AZURE? You can try Azure out for an hour without signing up for anything. Check out http://try.azurewebsites.net. You can make a PHP, Java, nodejs, Python, ASP.NET web app, or even setup Ghost itself. You can also try out Visual Studio online, which is basically a complete IDE in your browser written entirely in JavaScript.


Sponsor: Big thanks to our friends at Raygun for sponsoring the feed this week. I use Raygun myself and I encourage you to explore their stuff, it's really something special. Get full stack error reporting with Raygun! Detect and diagnose problems across your entire application. Raygun supports every major programming language and platform - Try Raygun FREE!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

IE10 and IE11 and Windows 8.1 and __doPostBack

October 19, '13 Comments [50] Posted in ASP.NET | Blogging
Sponsored By

A while back there was a bug in the old browser definition files that shipped with .NET 2 and .NET 4. Fast forward to today and these older ASP.NET’s will mis-detect IE10 and IE11. If you have this, you'll see __doPostBack JavaScript errors in your sites when IE10 or IE11 hit them.

However, I'm still getting email from folks who are seeing this, which means they've got very unpatched installations.

Aside: If you don't have this two year old patch, be sure to check out what other updates your server is missing. Again, rollups like .NET 4.5 and "hotfix rollups" get you the latest in one swoop.

Here’s all the internal details for this fix across every combo of framework and OS if you can’t get .NET 4.5. You may want to run "aspnet_regbrowsers -i" after installing the fix if you're having trouble.

  • 2836939 .NET 4 - Win7SP1/Win2K3SP2/Win2K8R2SP1/Win2K8SP2/VistaSP2/WinXPSP3
  • 2836940 .NET 3.5 SP1 - Win2K3SP2/Win2K8SP2/VistaSP2/WinXPSP3
  • 2836941 .NET 2.0 SP2 - Win2K3SP2/WinXPSP3
  • 2836942 .NET 3.5 SP1 - Win7SP1/Win2K8R2SP1
  • 2836943 .NET 2.0 SP2 - Win7SP1/Win2K8R2SP1
  • 2836945 .NET 2.0 SP2 - Win2K8SP2/VistaSP2
  • 2836946 .NET 2.0 SP2 - Win8RTM/WinRTRTM/Win2K12RTM
  • 2836947 .NET 3.5 SP1 - Win8RTM/WinRTRTM/Win2K12RTM

You really shouldn’t be "sniffing" browsers, you should check for the existence of features in your browser. There have been a number "mobile browser" files, including one I used 4 years ago.

If you are using a custom browser definition file (and perhaps forgotten about it) you may STILL see a problem with IE10 or IE11 because you've got your own overriding custom browser sniffing regexes in there. Either remove the need for a browser definition file (ideal) or open up your custom file and remote the IE portion.

TL;DR Version

  • DO - Keep your Web Servers patched.
  • DO - Upgrade to ASP.NET 4.5 if you can.
  • DON'T - Use old Custom Browser Definition Files from years ago and expect them to work

Hope this helps.


Sponsor: Thanks to Red Gate for sponsoring the feed this week! Check out a simpler way to deploy with Red Gate’s Deployment Manager. It can deploy your .NET apps, services, and databases in a single, repeatable process. Get your free Starter edition now.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Add Social Sharing Links to your Blog without widget JavaScript

August 5, '13 Comments [13] Posted in Blogging
Sponsored By

This sharing button thing is out of controlI'm always trying to tidy up my blog layout and remove 'noise' but every time I try to remove those social sharing buttons for Twitter and Facebook I get a barrage of email asking me to put them back. Personally, I use bookmarklets in my browser for tweeting links, rather than relying on AddThis or ShareThis or any of the other garish sharing JavaScripts.

This sharing button thing is out of control. Links work too, folks. It's the web. Let's not have our blogs turn into Vegas Billboards.*

Twitter, Facebook and Google+ all offer JavaScript that they'd LOVE for you to add to your site. Tracking is one of the reasons that they'd love you to add these. That may or may not be a strong reason not to add their JavaScript, but a concrete reason not to is speed.

When you add three services' JavaScript you're adding three DNS lookups, three (or 20) HTTP requests for their JavaScript and images, and on and on. That JavaScript has to execute as well, of course, but the value it provides isn't justified over the speed and hassle involved in my opinion.

I wanted to add social sharing links without adding JavaScript. Fortunately all these services support sharing via simply visiting a URL. Stated differently, you can share via an HTTP GET.

Below, I'm adding "YOURURLHERE" in the places you'll want the URL for your blog post. You should change these templates for your own blog engineer. WordPress, BlogSpot, DasBlog, etc all have different macro formats. Your mileage may vary.

NOTE: Make sure you check that you have the right number of quotes and ampersands when adding these to your blog template.

Twitter

Note that twitter's sharing format includes the URL, the Title and the "via" which is your twitter name.

<a href="https://twitter.com/intent/tweet?url=YOURURLHERE&text=YOURPOSTTITLEHERE&via=YOURTWITTERNAMEHERE">Twitter</a>

Facebook

<a href="https://facebook.com/sharer.php?u=YOURURLHERE">Facebook</a>

Google+

<a href="https://plus.google.com/share?url=YOURURLHERE">Google+</a>

You can share THIS post by clicking the links just below here on the same line as the Comments link.

Let me know about other social sites that support this kind of sharing in the comments, and I'll add your tips to this post.

* Yes, I know I have ads on this blog. It's taco money and it pays for the gadgets I review. It's hardly Vegas.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Video: Effectively Managing Your Personal Brand Online

February 9, '13 Comments [9] Posted in Blogging | Speaking
Sponsored By

This blog, my twitter, my YouTube are all part of my online presence. While my day job is ensuring that Microsoft's web developer tools work well across many cross cutting concerns, my passion remains teaching.

When I went to work for Microsoft 5 years ago I made it clear that the blog, it's content, and my online voice would remain mine. I also told them I would do 'side work' in social media. Often I blog about the things I'm working on, but I also blog about family, diabetes, gardening, culture, diversity, languages, gadgets and lots more.

One of the things I enjoy doing besides programming and teaching, is helping folks in other industries manage their personal brands and use social media effectively. I've spoken at conferences and to many different blogging special interests from interior designers to bloggers of color.

The things I've learned - largely by making many mistakes - in the last 10+ years of blogging apply not just to the technical world, but to anyone with an online presence.

Last year at Blogging While Brown I presented the technical keynote along with my very close friends Luvvie Ajayi and Adria Richards. You may know Luvvie from our podcast Ratchet And The Geek. Adria works for SendGrid and you may have seen Adria on Channel 9 with me at the BUILD Conference this year.

The audience was filled with bloggers of all interests. Tech, Culture, Social Justice, Entertainment, Cupcakes (yes!), Yoga, Green Lifestyles and hundreds more. Luvvie, Adria and I have three very different online styles but each is effective in its own way. We combined what we learned into what we think is an edutaining and useful talk.

Together we discussed how to effectively present a clear Voice online, how your Medium affects your Message. We explore different ways to Reach and audience, but then how to reach them in an authentic way. Then we cover consistent Visuals and what Results look like.

The keynote was split into three segments. You can jump between them directly with these links, Luvvie starting at 2min in, Adria around 14 min and me about 31 min, or watch the whole thing as it was intended.

I hope you enjoy it. We had a wonderful time creating and presenting it.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Your words are wasted

August 19, '12 Comments [77] Posted in Blogging
Sponsored By

Photo by KrisOlin used under CC - http://www.flickr.com/photos/krisolin/6861197374It needs to be said again, perhaps this time more strongly. Your Blog is The Engine of Community. Dammit.

Blog More

You are not blogging enough. You are pouring your words into increasingly closed and often walled gardens. You are giving control - and sometimes ownership - of your content to social media companies that will SURELY fail. These companies are profoundly overvalued, don't care about permalinks, don't make your content portable, and have terms of service that are so complex and obtuse that there are entire websites dedicate to explaining them.

I've presented at a number of "town hall" style meetings and often presented (for YEARS now) talks on "Social Media for Developers" where I've said "Every developer should have a blog." Put yourself out there and make it findable. And still you tweet giving all your life's precious remaining keystrokes to a company and a service that doesn't love or care about you - to a service that can't even find a tweet you wrote a month ago.

Where are people writing?

My friend Jon Udell is asking "Where have all the bloggers gone?" and watched both he and his wife's "Blog's Heartbeat" reduce to an almost comatose level. Tim Bray notices this pattern as well.

Now more companies and consortiums are popping up claiming to be "reimagining writing" or "rethinking publishing" or take the concept of a simple "draft post" and, according to Svbtle "[allow] ideas to start abstractly, to ruminate for a while, and then, as I work on them, to become more and more concrete until they’re ready to be published as articles." So, reinventing drafts? Regardless, Svbtle and it's new design has since attracted a who's who of Silicon Valley thinkers and is now on its way to becoming the digirati's Economist, except with bylines.

Here's the thing though, it's still RSS. It's just a blog.

Own Your Words

I've been blogging here for over 10 years. On my domain, running my software pushing out HTML when you visit the site on any device and RSS or ATOM when you look at it with Google Reader (which 97% of you do.) I control this domain, this software and this content. The feed is full content and the space is mine. Tim nails it so I'll make this super clear. If you decide to use a service where you don't control your content, you're renting.

Own your space on the Web, and pay for it. Extra effort, but otherwise you’re a sharecropper. - Tim Bray

In a time where we are all gnashing our teeth about Twitter's API changes that may lock out many 3rd party developers, Google Plus's lack of content portability or lack of respect for the permalink, as well as the rise of country club social networks pay-for social networks like http://app.net we find ourselves asking questions like:

  • Why doesn't someone make a free or cheap social network for the people?
  • Why can't I control my content?
  • Why can't I export everything I've written?
  • Who owns what I type?
  • Why isn't there an open API for my content?
  • Why can't I search posts over a month old?
  • Why can't I have this or that username?
  • Why am I not verified?

All these questions are asked about social networks we don't control and of companies who don't have our best interests at heart. We are asking these questions in 2012? Read those bullets again. These were solved problems in 1999.

You want control? Buy a domain and blog there.


Sponsored Ad: DevExpress Webinar: ROI for 3rd party tools. Is it more cost effective to build or purchase developer tools? In this webinar Jeffrey Hammond, Forrester Research, will walk you through an ROI calculation model and help you consider how you might evaluate your future tools investments. Register Today!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web
Page 1 of 5 in the Blogging category Next Page

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.