Saturday, February 27, 2016

Azure Scheduler fails to trigger scheduled WebJob published with WebApp

Hi All,

I am writing this blog post to show how to fix Azure scheduler fails to kicks off webjobs in Azure webapp while when you try to run webjobs through the portal it works.

I have a web app that has couple of webjobs in my solution. While adding these webjobs to my web app, I configured these two webjobs to run on different schedules. After i deploy the web app to Azure, I found out that the Azure Scheduler fails to run the second web job but not the first webjob!!

After carefully checking all the configs for both webjobs, I found this was the error that is being thrown by the Azure Scheduler for my second webjob:

Unauthorized: Access is denied due to invalid credentials.

Detailed error message:

Http Action - Response from host 'MYWEBSITEwebjobs.scm.azurewebsites.net': 'Unauthorized' Response Headers: Date: Sat, 27 Feb 2016 12:02:01 GMT
Server: Microsoft-IIS/8.0
WWW-Authenticate: Basic realm="site"
 Body: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">  <html xmlns="http://www.w3.org/1999/xhtml">  <head>  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>  <title>401 - Unauthorized: Access is denied due to invalid credentials.</title>  <style type="text/css">  <!--  body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}  fieldset{padding:0 15px 10px 15px;}   h1{font-size:2.4em;margin:0;color:#FFF;}  h2{font-size:1.7em;margin:0;color:#CC0000;}   h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}   #header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;  background-color:#555555;}  #content{margin:0 0 0 2%;position:relative;}  .content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}  -->  </style>  </head>  <body>  <div id="header"><h1>Server Error</h1></div>  <div id="content">   <div cla


The solution is the first webjob has the authorization header while the second doesn't. This probably is an issue with VS2015 deployment with Azure SDK.


So you just need to copy these header values from the first webjob to the second one and wait until the scheduler kicks off and things will be working as expected.

Screenshot of the two header values that i have added to my second webjob in Azure Portal scheduler settings:



Enjoy!

Sunday, February 21, 2016

Build Big Data Solutions in Azure using HDInsight


Hi All,

I am posting this post to share my recent presentation on building big data solutions in Azure.



The session covers how to get started to build big data solutions in Azure. Azure provides different Hadoop clusters for Hadoop ecosystem. The session covers the basic understanding of HDInsight clusters including: Apache Hadoop, HBase, Storm and Spark. The session covers how to integrate with HDInsight in .NET using different Hadoop integration frameworks and libraries. The session is a jump start for engineers and DBAs with RDBMS experience who are looking for a jump start working and developing Hadoop solutions. The session is a demo driven and will cover the basics of Hadoop open source products.




Wednesday, February 17, 2016

Build Intelligent Solutions using Azure

Hi All,

Last night i was honored to present to one of our local user groups in DC about how to build intelligent solutions using Azure.

In this session, I was illustrating different scenarios and practical approaches on building microservices that are elastic and resilient into the cloud. I covered with a practical use case on how to build cloud services that have web and worker roles that integrates with services bus queue as an intercommunication channel between web and worker roles. Also, I covered how to add web jobs into web roles into cloud services as well.

The second part of the presentation was covering Azure App services including: web apps, mobile apps, logic apps and api apps. Then , I covered lots of intelligent features that Azure offers to build intelligent solutions from backup automation, continuous integration, traffic routing, troubleshooting features and deployment slots.


Session Description is below:

The session covers how to build web, mobile, Api solutions using Microsoft Azure platform. The session covers in detail how to build intelligent solutions using Azure App Service. Azure App Service includes web apps, logic apps and mobile apps services as PaaS solutions for engineers. The session is a demo driven and demonstrate how to design and provision complete end-to-end solutions using Microsoft intelligent cloud.


Build intelligent solutions using ms azure from Mostafa Elzoghbi

Case Manager Demo code is on GitHub: https://github.com/melzoghbi/AzureCloudServices

At the end of the event, I had some giveaways that are IoT sensor Kits and "Fundamentals of Azure" books. Most audience asked about how to get the pdf of this book, here is the download link:

Fundamentals of Azure book download link


Hope this helps.

Thursday, February 11, 2016

MySQL Data Source not appearing in Visual Studio 2015 - A complete solution

Hi All,

I was trying to upgrade my solution in VS 2015 Community Edition to use latest MySQL .NET connector with VS integration tools.

After i upgraded my provider to version 6.9.8. I was not able to see MySQL provider as a data source when i run Reverse Engineer Code First tool for EF to refresh my classes with my latest DB changes.

First, If you can't see entity framework when you right click on your project. Make sure that you have installed EF Power tools for VS 2015. Here is the link to download it since Microsoft has not officially released VS 2015 release of this tool.

**Entity Framework Power tools for Visual Studio 2015: download link

Once you install this tool, You should be able to view entity framework option with Reverse Engineer Code first option on your project.


Second thing, you have to see MySql data source so you can connect to MySql db and refresh your classes. below screen shot shows MySql data source.


To be able to to see MySQL data source as shown above, you need two components to be able to connect to MySQL db from VS 2015:

1) MySQL Connector/Net
2) MySQL for Visual Studio

You can get them both by installing MySQL installer that allow you to installer any MySQL components into your machine.



Tip: After installing these two components, you need to close and re-open your VS 2015 to get to see the new loaded MySQL data source.

Enjoy!

Friday, February 05, 2016

Mistakes that kill startups lessons learned

In one of my office hours that i hold every month, I selected this topic to cover and cover the most reasons why startups fail.

In this presentation i covered the following:

1) Startup Structure: How to have the right number of founders, Allocation time and resources, hiring.

2) Idea & Market: How to select a good idea, determine market size and value prop of your product.

3) Raising Capital: How to raise the right amount of money for your startup and how to avoid spending too much.

4) Communication & Execution: How to execute your strategy, how to build healthy relationship with your customers and partners.

My presentation:




Hope this helps.