image

We are having a blowout sale on TechBash tickets. Plus, the Kalahari has extended our room discount (while supplies last). You can now attend TechBash (tickets and hotel) for under $650! Here is the news you need…

TechBash is Sept 28-30 2016, Pocono Manor, PA

Here are 3 great reasons to register for TechBash 2016

1. The Content is really awesome!

The first and most important reason to attend a tech conference is learning. We’ve got you covered with some of the best and most knowledgeable speakers from across the country! At TechBash you will get the facts from experts. Learn about web, cloud, DevOps, design patterns, and tools. Want to learn about Microsoft tech like ASP.Net, Azure, C# or Visual Studio? At TechBash you will get expert knowledge and great perspective because we have speakers from inside and outside of Microsoft. Here are some names to get you interested:

From Microsoft: Amanda Lange, Chris Risner, Dave Voyles, David Giard, James Tramel, Jeffrey Fritz, Joel Cochran, Pete Brown, Stephen Bohlen

Microsoft MVPs: Chris Woodruff, Iris Classon, James Bender, Jesse Liberty, Jim Wooley, Joseph Guadagno, Ondrej Balas, Oren Novotny, Sam Basu, Steve Michelotti, Kevin Hazzard, and organizers Alvin Ashcraft, Andy Schwam, Brian Minisi, Devin Rader

But that’s not all: We’ve got other top speakers including Glenn Bock, Joe Kuemerle, Kendall Miller, Ashley Grant, Bradley Holt and more!

image

Click here to see our full schedule!

2. The Location is great (and close by to many of you)!

Our venue, the Kalahari Resort is really cool. It’s a new Resort, Conference Center, and 100,000 sq. ft. indoor waterpark! TechBash is located in the Pocono Mountains in PA. That means it’s not only a beautiful setting, but it’s also really close. If you are in the northeast US and tired of flying cross country for tech conferences, TechBash is for you. We are less than a 2-hour drive from New York City, Philadelphia, and northern NJ. And this location is still within reasonable driving distance of many other major cities in the northeast, including Boston, Pittsburgh, Baltimore and Washington, DC!

clip_image004[4]clip_image006[4]clip_image008[4]clip_image010[4]clip_image012[4]

3. The Price is Right!

This Labor Day we’re celebrating everyone who puts in a hard day’s work by offering you the best TechBash deal yet.

Our best price ever: Buy your ticket between August 31st and September 7th using the promo code TBLABORDAY and we’ll knock $100 off the normal registration price and you get our discounted Kalahari hotel room rate of $159 per night. This offer is for a limited by room availability at the Kalahari so don’t wait.

Now is the time to register!

Talk to your company, and let them know great advantages of attending TechBash. Tell your boss that about the content and the savings. Talk to your family, and think about combining the conference with a long weekend of water park fun! If you want any other information, contact me or check out our website www.techbash.com.

TechBash 2016 is a non-profit, community run event.

The other day I got an email from WordPress saying “Your site has updated to WordPress 4.1.1”. I probably should have paid attention to it. But I assumed everything was ok. Next time I’ll check.

Today I went to check something on my blog and found it down. 500 error! If you host a site at all, you know that panic feeling you get when that happens. My blog is hosted on Azure Web Sites which is pretty cool but still makes me nervous when there are problems because it’s not a regular server that I can just log into and poke around. Plus, I am no expert with php or WordPress. In the end I was able to figure out the problem without too much trouble. Here’s what I did…

I opened up FileZilla (my ftp client of choice), connected to my server and started poking around. On the Azure Portal you can easily find the ftp address and account name used to connect. Luckily I knew the password!

On the root there is a folder LogFiles. That seemed like a good place to start.

It contained a file named php_errors.log. Again, sounds promising!

I found a lot of errors since this had been going on for a few days! Here is what it said:

PHP Fatal error:  ‘break’ operator with non-constant operand is no longer supported in D:\home\site\wwwroot\wp-content\plugins\blogml-importer\XPath.class.php on line 3773

So it seemed pretty clear what the problem was. An installed plugin (blogml-importer) was crashing my blog! But I had no idea how to fix it. I searched the web for “wordpress plugin fatal error” and found a link with the info I needed.

To disable a plugin manually without access to the WordPress admin site, just ftp in, go to the plugins folder (wp-content/plugins/) and rename the blogml-importer folder. I did it and everything worked.

Lucky for me, blogml-importer is just a plugin I used to import my content when I moved from dasBlog to WordPress. So I don’t need that anymore anyway.

Crisis averted. If you are stuck, I hope this information helps you too.

I recently moved my blog to use WordPress hosted on Azure. So far the experience has been pretty good. However, I ran into a snag this weekend. I would have really been in trouble had I not read a recent blog post by John Papa about similar problems. Luckily, my situation was not quite as bad as John’s.

I was uploading a new post to my blog from Windows Live Writer and I got an error. I didn’t grab the details of the error but it was clear that Live Writer wasn’t able to post to my blog. I switched over and logged directly into my blog’s WordPress admin site. I did a quick test to see if I could save any data and of course, I could not. Having just read John’s post, my first instinct was that I was hitting the database limit of 20MB imposed by ClearDB as part of the free service (they have a partnership with Azure).

Still, I needed to figure out for sure what was causing the issue and resolve it. Mind you, at this point, my blog was still running and I think that unless someone tried to post a comment, no one aside from me would know there was a problem.

 

imageI opened my Azure Portal and quickly was able to find a good place to start. On the right side there is a collection of links for a variety of things. Towards the bottom there was a link for diagnostic logs. I opened the file and quickly found a bunch of messages similar to this:

WordPress database error: [INSERT,UPDATE command denied to user ‘xxxxxx’@’xxxxxx’ for table xxxxx]

That was the same message that I read about on John Papa’s blog so I was now pretty certain that I had reached the space limit. I wasn’t too keen on upgrading my ClearDB account just yet, that would mean that I’d have to pay for the service that I was hoping to use for free. Sorry ClearDB, no offense! Was there any way I could clear out some data and go below the 20MB threshold? I knew that I had a LOT of spam messages that had not been deleted so I tried to clear them through the WordPress UI. At first I was surprised that I could delete them but of course the error message doesn’t say anything about delete command being denied. I removed the spam but I still could not add any new content. Oh well, it was worth a shot. Maybe I was still over the 20MB limit?

I found another great post on CodeThug.com that explained how to connect to my database with MySql Workbench and figure out the size of my database. In order to connect, you’ll need your DB connection info. The credentials are NOT your Azure portal credentials. Again, Azure has a link (see the screenshot) that says “View connection strings”. You’ll find what you need right there. After checking, I found that I was only using 12.5 MB! Wow, that means I removed a LOT of spam. I’ll certainly need to be more vigilant about that in the future (maybe I’ll auto delete spam).

Next I logged in to ClearDB using the credentials from my Azure connection string. After adding some additional information, I completed the creation of my ClearDB account. I then created a help ticket explaining my situation (in short, I told them I was locked out but currently using far less than 20MB). ClearDB responded very quickly and enabled my account. I was back in action. Incidentally, ClearDB support informed me that the account locks when you hit 20MB and does not automatically enable itself when you delete data. In spite of the problem, I was pretty impressed with ClearDB’s rapid response. That makes me feel good about the fact that soon enough I will have to upgrade my account with them and pay them money. At least I know they have first class customer support.

I’d also like to echo a few points made by John Papa in his blog post. I’d really like to have had more information up front about this. I had no idea that my db was hosted on ClearDB and that there was a 20MB limit. I had no idea that I was near the 20 MB limit. If I had known that I was close, I could have easily removed the spam before getting locked out.

In the end, this wasn’t too tough to resolve but if I hadn’t had read about John’s issue just two weeks ago, I think this would have been a much more difficult situation.

I just finished a project migrating my blog to WordPress (from dasBlog). In addition, I moved from a traditional hosting environment to Azure. Oh, and after all this time, I’m finally changing my domain name and hosting “Schwammy Says” at www.schwammysays.net! I’ve been posting to my blog since March of 2007. So during this transition, I wanted to maintain all of my posts and not break any existing links to my content.

Here are the steps I followed, as best as I can remember…

Part 1: Set up WordPress on Azure

This part was really easy.

  • Create an account on azure
  • Install WordPressTechnically you are done at this point but there was some more to do.
  • Install plugins. Here is what I am using so far:
    • Askimet
    • All In One SEO Pack
    • BlogML Importer
    • Configure SMTP
    • Easy Contact Forms
    • Google XML Sitemaps
    • Redirection
  • Pick a theme
  • Configure settings
    • Tip: One setting I chose was to block search engines from my site. Of course I will change that once my content is fully loaded and I am ready to go.

At this point the blog is ready to use. If this was a new blog I would be all set. But I’ve got to get all of my existing content loaded up before I make my blog “live”.

  • I initially created my blog as schwammysays.azurewebsites.net. However I want it to just be www.schwammysays.net. That is possible with Azure, but not in the free website version. So I switched over to a shared instance on Azure. In that mode, I’ll be able to configure the domain the way I want. More on that later. The shared instance is not free but since I an MSDN subscriber, I get some free credits on Azure.

Part 2: Migration

  • Research: Mostly this was research on how to migrate from dasBlog to WordPress. I found some great resources including this one which I found very helpful:
  • Data: Copy all content from my current web server to my PC
  • Extract: I used dasBlogMLto extract all of my content into the BlogML format.This is needed because you can’t import the dasBlog data straight into WordPress. However, you can import BlogML data WordPress.
  • Fix links: Next I opened the BlogML file in Notepad++ and updated all of the hyperlinks in my content. Since I was changing my sites URL, I needed all of self-referencing links to be up to date.
  • Now, using the BlogML Importer plugin, I was able to easily import all of my content. Note that it seems some people have a lot of errors doing this export and import from dasBlog to WordPress format but luckily I had zero errors here!
  • Next, using FTP I copied up all of my blogs files such as images, zip files, etc.

At this point, the blog is ready to go. It is styled and has content. Still I need to work out all of the url redirection so I don’t lose existing links to my blog.

Part 3: Redirection

This is the area that I was concerned about since I really don’t know that much about. Luckily my friend Nick Berardi (@nberardi) was there to answer a lot of questions.

One issue I had to contend with is that dasBlog uses a different format for urls then WordPress does. For instance, for a post named “This Is A Post” it would become a url like this:

DasBlog: www.blog.ingenuitynow.net/This+Is+A+Post.aspx

WordPress: www.schwammysays.net/this-is-a-post/

There are 3 differences, aside from the obvious fact that I changed domain names:

  • Uppercase vs. lowercase
  • Plus instead of dashes between words
  • .aspx extension vs. “/”

To set up all the redirection:

  • Set up the Domain: Next I used the tools where my domain schwammysays.net is registered and added an CNAME record to point to my new Azure site. FYI, my plan was to get it all working before redirecting the old domain (blog.ingenuitynow.net) to the new one.
  • Redirection: I’ve heard great things about the Redirection plugin so I configured it to route my old post name to my new post name. (I had a list of all the posts with old and new names courtesy of the dasblogML export tool).
  • Unfortunately, the redirection wasn’t working. I tried a bunch of different stuff but after a while I figured out that the plus sign in the URL was causing trouble. My thought was that WordPress was having an issue with the special character. Spoiler alert, I later realized that wasn’t exactly right. i thought I was stuck at this point until Nick reminded me of something that should have been obvious to me all along. I may be running WordPress on Azure but it is really just a website running on IIS. The assumption was that I’d need to deal with the plus sign before WordPress got involved. It is pretty easy to write custom HTTP Handlers with C# and plug them into the site. Nick was even so kind that he sent me a great code snippet to change the URL and issue a 301 redirection error too.
  • However, the handler wasn’t working! It wasn’t getting hit at all. I figured out that some of the web.config settings for WordPress were getting in the way. The WordPress site had some redirects built into the config file and they were getting called before my handler. I changed the web.config file as seen here. I added the parts highlighted in yellow:
        <rewrite>
          <rules>

    <rule name=”old” patternSyntax=”Wildcard” stopProcessing=”true”> <match url=”*.aspx”/> <action type=”None” /> </rule>

            <rule name="wordpress" patternSyntax="Wildcard">
                        <match url="*"/>
                            <conditions>
                                <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
                                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
                            </conditions>
                        <action type="Rewrite" url="index.php"/>
                    </rule>
          </rules>
        </rewrite>

    With the handler in place, I tested it and guess what… it still didn’t work. I did some more research and found out that by default, asp.net sites don’t allow plus signs in the URL. I’m no expert on this topic but it is called double escaping. A quick change to the web.config file and everything was working.

    <system.webServer>
        <security>
          <requestFiltering allowDoubleEscaping="true"/>
        </security>

    While I did not test this, my guess is that, had I updated my web.config file earlier to allow double escaping, the WordPress redirection plugin would probably have worked for me and the http handler would not have been needed. But actually, the handler is easier since it does all of my URLs in one shot.

     

  • Lastly, I sent back to my domain tools and sent traffic for blog.ingenuitynow.net to the Azure site.

This was a fairly long process. Some of it was easy. Some of it would have been easier if I knew more about URL redirection and DNS. But since you are reading this post, it seems that everything has finally worked out!