Well, this was one of those bugs that took a while to figure out and of course the solution was pretty simple.

It turns out that this:

[EnableCors(origins: “http://MyWebsite.com”, headers: “*”, methods: “*”)]

is not the same as this:

[EnableCors(origins:”http://mywebsite.com”, headers: “*”, methods: “*”)]

I have some JavaScript that calls an ASP.NET web API method on another domain. Let’s pretend that the API is on myservice.com and the website is on mywebsite.com. As you can guess, I was having some issues and getting an error similar to this:

Failed to load http://myservice.com/api/SomeController/SomeMethod: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://mywebsite.com is therefore not allowed access.

I tried a lot of things to figure out what was going on. I knew that I had the CORS attribute on my controller and I had config.EnableCors(); set up in my Web API configuration. This is one of the first times I’m using CORS on Azure so I thought it had something to do with Azure, but that was not correct. After trying many, many hacks with no success and staring at my EnableCors Attribute, I had the “crazy” idea to change “http://MyWebsite.com” to ”http://mywebsite.com” and of course, everything worked fine. From now on, I’ll use all lowercase!

I hope you won’t get stuck wasting as much time as I did trying to figure this one out!

What? You haven’t registered for the best developer conference in the Northeastern U.S. yet? Well don’t worry, there is still time. First, let me tell you why you need to attend.

Full disclosure: I am a founding board member of the TechBash Foundation. Myself and a few other people run this event for the community. We make no money from the event. All fees and revenue generated by TechBash are put directly into the event to cover costs.

OK, on to it…

What is TechBash?

TechBash is a 3 day developer conference. If you are interested in topics like .NET, Web, Cloud, JavaScript, DevOps, Architecture, Patterns, Mobile, Frameworks and more, you should be at TechBash.

Why should you be at TechBash 2017?

I’ll summarize and you can read on below for more details:

1. Content – TechBash has got great content. Want to learn about the latest frameworks and patterns from industry experts? We’ve got them. Want to hear directly from Microsoft employees and MVPs? We’ve got plenty of them. TechBash is bringing in the best speakers from top tech companies to deliver content to you. read more…

2. Location TechBash is organized by a small group of developers who were tired of traveling across the country for good content. So now they are bringing the content to you. TechBash is in the Poconos in Pennsylvania. That’s less than a 2 hour drive from NYC or Philly. Plus, the short drive time means you won’t need to ask your boss for two extra travel days. read more…

3. Price. Book now and you can register for TechBash plus 3 nights in the hotel for less than $1000. That’s a great price for a conference of this caliber. Plus, no airfare needed so TechBash fits into your budget!  After 9/8 hotel rates may vary. read more…

4. Venue  The Kalahari Resort. This is the largest indoor water park in the country. So while you are coming to learn and network with tech leaders from around the country and meet up with old friends and new, you can have a little fun and hit the water slides. read more…

5. Fun for the Family – Yes, it’s a huge water park. But there are a ton of other activities at the Kalahari Resort and nearby. Plus, Friday afternoon we have Sara Chipps hosting a Jewelbots build event for kids 8 and up. They can learn to code too. read more…

 

Plus, if you want to bring the whole team, contact us regarding group discounts: info@techbash.com

 

Great Content – Learn from the best

We’ve got great speakers from top tech firms around the country coming in to speak to you. And you may notice these are some of the same speakers that you’ll see at much more expensive conferences. Here are a just few of our featured speakers:

image

 

And if you are interested in content direct from Microsoft, we’ve got that too:

image

OK, here is a full list of our speakers. You can see our current schedule on our website.

Alon Fliess, Ambrose Little, Anne Bougie, Anoop Kumar, Ashley Grant, Bill Wolff, Cameron Presley, Chris Houdeshell, Damian Brady, Danny Brown, Dave Voyles, Donovan Brown, Eran Stiller, Erika Carlson, Gajan Pathmanathan, Jason van Brackel, Jeffrey Fritz, Jeremy Clark, Jim Wooley, Joseph Guadagno, Joshua Garverick, Ken Dale, Kevin Griffin, Lee Brandt, Nate Barbettini, Nick Landry, Ondrej Balas, Oren Novotny, Paul Hacker, Richard Taylor, Sam Basu, Sara Chipps, Scott Allen, Scott Kay, Stephanie Herr, Stephen Bohlen, Steve Michelotti

Location – If you are in the Northeast, we are close by

Just check out the map below. We are about 2 hours from NYC, NJ, and Philly. We are close by to Delaware, Central and Western PA, NY State, Maryland, DC and much more. The best part is that you don’t need to sit on long flights or ask the boss for extra travel days just to attend TechBash! Oh, and that means travel costs are lower too.

image

Price – The Price is Right!

TechBash fits your budget! An all access ticket to TechBash is only $349. That includes 3 days of content plus breakfast, lunch and coffee/snacks too. Compare that price to some other conferences and see what you think. Of course, you’ll need to stay over for a few nights. We’ve got great prices reserved at the Kalahari Resort (use group id 1145) and if you book quickly you can still get the conference registration and 3 nights in the hotel for under $1000. That is an incredible deal for the content we provide. If you need help convincing your boss, check this out.

Venue – The Kalahari Resort is AWESOME!

To start, The Kalahari is a first class conference center with plenty of Wi-Fi to go around! The place was brand new last year and this year they expanded to add another 500 hotel rooms. Plus, it is now the largest indoor waterpark in the country! So after you are done learning from the best, hit the slides and have some fun!

imageimageimageimageimageimageimageimage

Family Fun – There is plenty to do!

Bring the whole family to TechBash! The kids will love the waterpark but that isn’t all there is for families. This year TechBash is very proud to announce that Sara Chipps will be offering a hands-on event for kids ages 8 and up to learn to code and work with Jewelbots. Kids will learn entry level coding and Arduino. Plus there is face painting, crafts, and more! There is a $10 ticket required to cover costs for this. Check out all of the great stuff to do while at TechBash on our site. We’ve got a ton of ideas.

I hope I’ve shown you why TechBash is the best conference for you. Contact me via my blog if you have any questions.

Thanks,

Andy

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.