Azure Architect Notes: Azure Service Bus

This post is the first in a series called Azure Architect Notes. I will provide an overview of different Azure topics from an architect perspective with lots of references. Please suggest topics in the comments.

“Service Bus supports two distinct messaging patterns: Azure Relay and Service Bus Messaging.”Source

Azure RelayThere are 2 main things to know about Azure Relay.

  1. Azure Relay is synchronous, bi-directional communication similar to a phone call. Both entities need to be online at the same time.
  2. It is great for facilitating connections between the cloud and on-prem because you don’t have to open the firewall for incoming traffic. Both servers establish outgoing connections to the Relay and then communication can happen without enabling incoming traffic through the firewall.

Read more on Azure Relay

 

Service BusIn contrast to Azure Relay, Service Bus Messaging can be thought of as asynchronous, similar to the postal service. “Producers” and “consumers” do not have to be online at the same time. The main components are Queues, Topics, and Subscriptions.

Read more on Service Bus Messaging

Queues offer First In, First Out (FIFO) message delivery to one or more competing consumers. That is, messages are typically expected to be received and processed by the receivers in the order in which they were added to the queue, and each message is received and processed by only one message consumer.” – Source

Architect Pattern to Know: Queue-Based Load Leveling

queue based load leveling pattern

“Requests from a number of tasks, which can be generated at a highly variable rate, can be passed to the service through the same message queue. This figure shows using a queue to level the load on a service.” – Source

Architect Pattern to Know: Competing Consumers

competing-consumers-diagram

“Enable multiple concurrent consumers to process messages received on the same messaging channel. This enables a system to process multiple messages concurrently to optimize throughput, to improve scalability and availability, and to balance the workload.” – Source

“In contrast to queues, in which each message is processed by a single consumer, topics and subscriptions provide a one-to-many form of communication, in a publish/subscribe pattern. Useful for scaling to very large numbers of recipients, each published message is made available to each subscription registered with the topic.” – Source

Architect Pattern to Know: Priority Queue

priority-queue-service-bus

“Microsoft Azure doesn’t provide a queuing mechanism that natively supports automatic prioritization of messages through sorting. However, it does provide Azure Service Bus topics and subscriptions that support a queuing mechanism that provides message filtering, together with a wide range of flexible capabilities that make it ideal for use in most priority queue implementations.” – Source

Azure Service Bus References

Announcing The Philly Azure Meetup Group

azure-icon-250x250I am happy to announce the creation of the Philly Azure Meetup Group!

This is a group for anyone who works with, uses, or wants to learn more about Microsoft Azure. From Architects to developers to IT Pros to users and consumers, we will support anyone. There will be meetings every month or two. Topics will range from beginner to expert. We will meet in person at the Microsoft Philly MTC and stream worldwide on Mixer.

Our first meeting is scheduled for 12/5 at 6:30pm at the Microsoft MTC in Malvern. Please join the Meetup group and RSVP there.

Session 1: Rufus Harvey – Introduction to Azure Cloud Development for Developers and Architects

“We will address how to get started deploying your enterprise applications to the cloud today. By taking an existing ASP.NET MVC application and deploying it to the cloud, we will learn what is required to go beyond “Hello World”. Along the way we will discover some of the pitfalls and lessons learned so that our application is positioned to grow as the demand grows. Walking away, you should feel ready to jump in and start planning your resource deployment needs.”

Session 2: Tim Ferro – Azure Service Bus and Azure Relay (if time permits)

Group Links

Three Time Microsoft MVP

We are once again pleased to present you with the 2017-2018 Microsoft Most Valuable Professional (MVP) Award! As you know, this award is given to exceptional technical community leaders who share their remarkable passion, real-world knowledge, and technical expertise with others through demonstration of exemplary commitment. We appreciate your outstanding contributions in the Visual Studio and Development Technologies technical communities during the past year.

I’m honored and excited to be awarded the Microsoft MVP award for a third consecutive year! Thank you!

Tim Ferro

Thanks MS Dev Show Podcast!

THE Podcast for Microsoft developers. Jason and Carl talk about the latest in developer news covering topics such as the cloud and cross-platform development using the Microsoft platform.

MS Dev Show is one of my favorite podcasts. Leading up to their 100th episode, they ran a contest and the winner got a grab bag of goodies from them. Check out the 100th episode with the winning entry here: http://msdevshow.com/2016/04/build-2016/. It’s also a Build 2016 recap episode which is a must listen for any Microsoft developer.

Spoiler Alert: I WON! Here are all the fantastic grab bag items that were included. Thanks so much!

The first thing in the box was the actual grab bag. It’s from Tom Bihn and has a sweet MS Dev Show patch.

Tom Bihn Backpack

The first thing I pulled out was a nice MS Dev Show hat! Here it is with more MS Dev Show branded stickers and a button.

MS Dev Show

The next thing I found was the previously (on the podcast) mentioned tablet! It’s an Amazon Fire AND it was accompanied by an Amazon FireTV Stick! Jackpot! I was shocked when I won then shocked again when I saw these.

Amazon Fire and FireTV Stick

Thanks so much to Infragistics as well for the 2 t-shirts, bag, large button, and black notebook! Check out the rest of the gifts below including MS Dev Show branded M&Ms!

Infragistics T-Shirts

Tim Ferro

Philly .NET Code Camp 2016.1 Session Info and Presentations

Philly .NET Code Camp

Philly .NET Code Camp 2016.1
April 8-9, Microsoft, Malvern, PA

Optimizing Team Efficiency with Visual Studio and TFS
Saturday, 11:30am – Malvern Room
Presentation Link
Software development is not easy. Managing projects and a team of developers is not easy. Visual Studio, Visual Studio Code, Team Foundation Server, and Visual Studio Team Services can help you optimize your development team efficiency, even if you don’t work exclusively on the Microsoft stack.

This session will give an overview of features in each product while focusing on those related to increasing your development team’s efficiency. From project planning, to inline enhancements from CodeLens, this session will show developers, team leads, and project managers how they technologies work together to greatly increase team efficiency and reduce wasted time. Rarely do you find a session that attracts both developers and Project Managers, but this is it! Developers come and see all the new enhancements for Visual Studio and bring your Project Managers to show them how it will increase productivity. Project Managers come see the enhancements for project management and application lifecycle management and bring your developers to show them why they need to update burn down charts!

Getting Started With JavaScript Libraries for Office 365
Saturday, 1:30pm – Strafford Room
Presentation Link
Whether you are developing for Office 365 (or SharePoint on-premises), these days you are going to need some “go-to” JavaScript libraries to enhance your solutions. No matter what project I am on, over the past few years there are a number of fantastic JavaScript libraries I have learned to use and integrate with great success. They work with Apps, content editor web parts, .NET solutions, and anywhere else you can utilize JavaScript (Even CSS!). Some of my favorites covered in this session are jQuery, SPServices, jqPlot, and DataTables.

In this session I will show how to get up and running developing with JavaScript for Office 365 in multiple ways. Then I will demo some of my “go-to” libraries as well as a few others. I will discuss real world application of these libraries based on previous clients where I have used them. I will wrap up with a nice combined demo that works great in both Office 365 and SharePoint on-premises.

Tim Ferro

I’m No Giant, but I Have Shoulders… Microsoft MVP Award

Congratulations! We are pleased to present you with the 2016 Microsoft® MVP Award! This award is given to exceptional technical community leaders who actively share their high quality, real world expertise with others. We appreciate your outstanding contributions in Visual Studio and Development Technologies technical communities during the past year.

When I received my first MVP Award last year, I was shocked and humbled and thankful for all the help I have received over the years. This quote by Sir Isaac Newton felt most appropriate.

“If I have seen further it is by standing on the shoulders of giants.” – Sir Isaac Newton

The second time around, all of that is still completely true. I am still shocked and humbled and without the support of my family, friends, colleagues, technical communities, and the MVP community, this would not have been possible. If there is any way I can help you in your career, please reach out. I’m no giant, but I have shoulders. Thank you.

Tim Ferro

Cryptographic failure while signing assembly – Unknown error 8013141c

Terrible title, but read the whole thing as this gets interesting.

First, if you are here because you have this error, or more specifically these 2 errors

SGEN Cryptographic failure while signing assembly … Error signing assembly —  Unknown error (8013141c)
SGEN Unable to generate a temporary class (result=1)

then I have a number of options for you to try:

  1. Right click and run Visual Studio as admin
  2. Unmount the project, update the csproj file with some proxy related XML, remount project (this advice found elsewhere doesn’t even compile correctly in Visual Studio 2015 so I wont show the code)
  3. Change the permissions on the “c:\windows\temp” folder to include Everyone
  4. Remove read only from all folder/files related to this project and code
  5. Move all the code to your primary C drive
  6. Uncheck “Sign the Assembly” in the project properties (this works but is not an acceptable fix)

If like me you have been Googling for an answer all day, these are all you will find and none worked for me. Here are the steps that did work.

  1. You need to change security on directory or multiple directories. Most blogs pointed to “C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys” but sometimes that directory structure doesn’t exist. Search your C drive for “MachineKeys” and update each in order starting with “C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys”.
  2. A number of blogs mention to grant read/write permission to Everyone. That is not the best idea. Start with just your user, even if that use is already an Administrator on the machine like mine was. Then set the following permissions:
    • Create files / write data
    • Create folders / append data
    • Write attributes
    • Write extended attributes
    • Delete
  3. Hit apply. Some directories may say “Access Denied” but it still works.
  4. If this fails, grant Full Control to Everyone AND your specific user on all “MachineKeys” folders and recheck BUT DON’T LEAVE IT THIS WAY. If this works, start removing permissions until you figure out what is needed.
  5. Recompile in Debug mode and then Release mode to be sure. My issue only happened in Release mode.

Full credit to this blog for helping me figure this out http://aadhoc.blogspot.com/2010/05/cryptographic-failure-while-signing.html

Second, if you are still reading and wondering why I wrote this post then keep going, it gets interesting.

I wrote this post for 3 main reasons.

  1. Google Index vs Bing Index – I spent about a full work day searching the internet for an answer to this issue using Google. I have been a software developer professionally for almost a dozen years and I have found Google search to be better for most of my queries. The blog that contained the answer above; however, did not show up in any Google query but when I switched to Bing it was on page 2. My blog gets good indexing from Google so I hope this post is picked up for future searches.
  2. PowerShell Help – Even though I had found the answer, I still did not find any useful information on “Unknown error 8013141c”. A much better developer than me showed me this trick in PowerShell.
    PowerShell Tip
    You can see where the error ID was added to the command and a decently useful message is displayed.
  3. My Blog is my reference – Many technical posts I write are for my own benefit and I have gone back to my blog hundreds of times to look something up that I know I solved previously.

I hope this helps. Leave a comment if you found other ways to fix this issue or if you confirm it helped.

Tim Ferro

SPSDC Reston 2015

#SPSDC

#SPSDC

SharePoint Saturday DC: Reston 2015
Saturday, October 3, 2015 (8am-6pm)
Microsoft Reston, 12012 Sunset Hills Road, Reston, VA 20170
@SPSaturday_DC #SPSDC

Platinum Sponsor: RDA Corporation
Gold Sponsor: Planet Technologies
View All Sponsors

RDA Speakers and Sessions
Ravi Patil
Modern SharePoint Development: PnP, JavaScript, and Best Practices
0915-1030 in room 3062

Manny Agrinya
SharePoint Hybrid and Workflows
1045-1200 in room 3058

Barton Loesley
Surfacing External Data in SharePoint & Office 365
1300-1415 in room 1018

Tim Ferro
Getting Started with JavaScript Libraries for Office 365
1430-1545 in room 3062

Fiddler AutoResponder for Rapid Development and Debugging

Fiddler is one of the core tools used by any web developer. In my experience, most developers are familiar with the primary feature of showing and interacting with the network traffic between the user and the server. Less often they know about other great features like Composer and AutoResponder.

Click to Enlarge

The Fiddler AutoResponder feature allows developers to automatically respond to a call on the server, like a request for an image or JavaScript file, with a file on the developer’s local computer. In the above image, I am setting up my AutoResponder to help me quickly develop and debug my “base.js” file that was previously deployed to my Office 365 tenant. (Be sure to check the “Enable automatic responses” box AND check the “Unmatched requests passthrough” box) In this scenario, I am writing an enhancement or debugging an issue with an existing JavaScript file I’ve written and deployed. Instead of spinning up a VM or making changes and uploading files frequently, I can just use Fiddler to respond, for my local browser session only, with that same file. Now I can just make changes locally, hit save, and hit refresh to see what it would look like!

Check out the walkthrough video from Telerik below.

Tim Ferro

Pro Tip: Always Create SharePoint Columns from the List Settings Page

Traditionally when creating SharePoint (or SharePoint Online) list columns, you would first navigate to the Settings page for the List you wanted to add a column. Then you would click “Create column” under the list of existing Columns. This will create the column and the internal name will be a double encoded (click link, scroll down) version of what you typed. You can check this by clicking on the column name after creation and viewing the URL. (See Image Below)

Checking Column Internal Name (Double Encoded)

In SharePoint Online and SharePoint 2013 on-prem, there is another option for adding columns to a list: Quick Edit. (See Image Below)

SharePoint Online Quick Edit

When you click the Edit link (Above), you can add columns directly from the List page. (See Image Below)

Quick Edit Adding Column

However, when you create columns this way, the column name is NOT the double encoded version of the text you entered. It is a random string of numbers, letters, and sometime non-alphanumeric characters! (See Image Below)

Random Character Column Name

This can not only cause issues when this behavior is not known, but it can wreak havoc with custom code like JavaScript.

There is currently no fix for this so please vote on this issue at User Voice for Office 365 here: https://office365.uservoice.com/forums/273492-sites-and-collaboration/suggestions/9756108-update-the-sharepoint-online-list-quick-edit-colum.

If you are writing JavaScript code that references column names, check out this post from the amazing Marc Anderson on how to get the InternalName of a SharePoint list column with SPServices. This should look familiar as it is the Double Encoding example I mentioned earlier.

This is a pretty big issue so please vote for this and share to get visibility with the product team. Also if there are other scenarios where this happens please leave a comment.

Tim Ferro