Connect:    



Event Calendar

Some useful links

Online Courses

Articles


A software architect, Azure expert, and former Microsoft evangelist, Mike Benkovich dedicates huge amounts of his time to helping his fellow developers and burgeoning programmers learn about new technologies and platforms. Mike’s website equips developers with tips and resources to help them get to grips with technologies including cloud, data and devices, and he produces online courses covering areas like Azure enterprise development and serverless computing. Mike is also a chronic sharer of puns, so head over to his Twitter feed if you’re after a laugh (or a groan).

BenkoBLOG by Tags


Blog Roll...
Conferences
Regional User Groups

Blog

DevUp 2022

@MikeBenkovich 06/08/2022

Guess What? In person events are a thing again,  and I'm back on the road. It's great to be back to St. Louis, this week I'm delivering sessions at DevUp on how to work with Azure and Infrastructure as Code topics. 

  • Permit to Cloud : Land with Confidence in Azure
  • Cosmos DB Performance Tuning
  • Infrastructure as Code Bake-off : Comparing ARM, Bicep, Terraform and Pulumi

The link to the code is on GitHub at https://github.com/mbenko/du22-ptc - Check it out!


rebuild17 Resources

@MikeBenkovich 05/29/2017

As promised last week I updated the slides with the session that the content was drawn from. Here is the consolidated list of sessions with deeper dives into the topics from Build:

  • B8020 - Cognitive Services & Computer Vision Made Easy
  • B8049 - Enable intelligence with Azure IoT Edge
  • B8096 - Windows Template Studio
  • B8100 - What's New and Coming in Windows UI Platform
  • B8001 - Three Runtimes One Standard .NET Standard
  • B8048 - Introducing .NET Core 2.0
  • B8027 - Azure Debugging & Snappoints
  • B8039 - Design for Serverless Success
  • B8061 - How to build serverless business applications
  • B8099 - Xamarin Tools
  • B8103 - The Future of Xamarin Development
  • B8072 - Overview of Mobile Center

My GitHub repo for the event - http://github.com/mbenko/rebuild17. Other links from the event include:


Announcing Visual Studio 2017 Best of Launch Events

@MikeBenkovich 03/23/2017

Starting Friday March 24 I’m working with Microsoft and the community of MVP’s to resurrect a type of event format we used to run for MSDN, the half day – Explore the Possible – see it in action – event. I’d love to invite you to join me on the tour, stop by and say hi. We will explore the move towards productivity and effectiveness of development and deployment tools and technologies.

Since Visual Studio launched 20 years ago it has evolved to become a favorite IDE of the casual to professional developer. With the launch of Visual Studio 2017 Microsoft has stepped up their game with improvements to make it easier to work with Cloud, Mobile and Web, as well as a number of productivity improvements. Join us as we explore the possible with the latest tools and technologies with Visual Studio, Xamarin and the Mobile Center, and DevOps with Team Services. The day starts at 8:30 and ends with a hackfest/install pizza party.

  • 8:30 – Hello Visual Studio
  • 9:45 – Exploring Mobile Stack
  • 11:00 – DevOps, .NET Core, Docker and more
  • 12:00 – Pizza & Hackfest

The list of cities and dates include:

Hope to see you there!

-mike


VS 2017 Launch Live Notes

@MikeBenkovich 03/07/2017

Watching the live stream of the Visual Studio 2017 launch and 20 year anniversary party…thought I’d capture some of the notes of what’s going on and share the fun.

Visual Studio 2017 release

Developer Productivity - Kasey Uhlenhuth

  • Live Unit Tests
  • Exception helper
  • Find all references
  • New intellitrace tray of options
  • Ctrl+T for goto All
  • Code suggestions
  • Code Config file - map code styles and suggestions for environment
  • Support for tuples on methods
  • Improved refactoring
  • Indent guide visibility to method code is in even if not visible

.NET Core - Beth Massi

  • .net Tools for Core 1.0 in production
  • Migrate/Upgrade to new tools easy
  • Simplified csproj format which is human readable
  • References grouped by type…i.e. nuget refs, project refs, etc.
  • Application Insights
    • New add-in experience
    • Search and graph analytics in VS

Containers Docker - Scott Hanselman

  • Add docker support in VS right click on project
  • Run in docker if selected startup project
  • Debug, edit and volume mapping realtime from vs to docker
  • Publish to Linux docker or windows
  • Automatically references other docker containers dependent on
  • Debug across containers
  • Check out Ref application http://aka.ms/MicroservicesArchitecture

Xamarin : James & Miguel

  • Tizen new OS from Samsung for IoT devices…built on Xamarin Forms
  • Visual Studio for Mac Preview 4
  • New App templates
    • Mobile App added with best practices if checkbox Azure
    • Code for clients
  • Forms Previewer
    • Works if you have JDK 1.8+ on x64 installed (settings?)
  • Improved intellisense
  • Native animations in XAML
  • Forms inspector, when connected tp android emulator
    • Layers
    • Live edit of XAML

VS Mobile Center - Keith

  • http://mobile.azure.com
  • Xamarin Test Cloud
  • Add app…pick type
  • Add nuget & register app
  • Distribute sets up a team of testers/user community for builds
  • Build service
    • Pick sln
    • Provisioning profile
    • Certificate for signed builds
    • Trigger
  • Test service …
    • run automated UI tests
    • See devices tested on
  • Crash reporting
    • Usage & crash info
    • Stack dumps grouped by count
  • Analytics
    • Custom events

DevOps - Brian Harry & Donovan Brown

  • Continuous delivery
  • "Shift Right" = delivery improvements, production is part of the plan
  • TFS 2017.1 for on Premise installs
  • http://aka.ms/tfsimportdata
  • Donovan demo - any project, any platform
    • Create project
    • Import Git repo
    • View code
    • Setup build from templates or by scratch
      • Sources - where is repo? In TS or external?
      • Test settings
      • Code Coverage
      • Build agents - windows or linux
      • Search for build task
      • Marketplace for build tasks
      • Create your own extension
      • Variables
      • Create work items on failure
      • Track history/changes to build definitions
    • Release definitions
      • Infrastructure as code
      • Approvers
    • Dashboards
  • Data Migration - Partner with Red Gate
    • In VS RedGate ReadyRoll has tools by default
    • SQL Obj explorer, make changes and save
    • Tell ReadyRoll to refresh with changes, generate migration scripts
      • Add update statements for populating default values on existing data after modification
    • Add database scripts and changes that will happen on the database
    • Add the ReadyRoll task to deploy the database task
  • RedGate included in VS 2017 Enterprise
  • Pluralsight 1yr
  • DevOps Enterprise Accelerator offer

Did you see Windows Phone 8 Preview?

@MikeBenkovich 06/20/2012

It’s been a busy week by anyone’s estimation. We announced new capabilities in Windows Azure, a new Windows 8 Tablet called Surface, and now Windows Phone comes to the front.   Some great stuff has been announced around the future of Windows Phone yesterday. Here’s a summary of the core 8 features which include:image

Multi-core processor support: As reviewers have noted, Windows Phone runs buttery smooth on phones with a single processor. But piggybacking on the Windows core provides support for multiple cores—so we’re ready for whatever hardware makers dream up.

Bigger, sharper screens: Windows Phone 8 supports two new screen resolutions—1280x768 and 1280x720, opening the door to amazing new handsets with high-definition 720p displays.

More flexible storage: Windows Phone 8 supports removable MicroSD cards, so you can stuff your phone with extra photos, music, and whatever else is important to you, and then easily move it all onto your PC.

NFC wireless sharing: If you haven’t heard the term “NFC” yet, I’m betting you soon will. This emerging wireless technology lets phones share things over short distances. In Windows Phone 8, it helps make sharing photos, Office docs, and contact info easier—just tap your phone another NFC-equipped device. How cool is that?

Internet Explorer 10: The next version of Windows Phone comes with the same web browsing engine that’s headed for Window 8 PCs and tablets. IE10 is faster and more secure, with advanced anti-phishing features like SmartScreen Filter to block dangerous websites and malware.

Wallet: Windows Phone 8’s new digital Wallet feature does two great things. It can keep debit and credit cards, coupons, boarding passes, and other important info right at your fingertips. And when paired with a secure SIM from your carrier, you can also pay for things with a tap of your phone at compatible checkout counters.

Better maps and directions: Windows Phone 8 builds in Nokia mapping as part of the platform. Our partnership will provide more detailed maps and turn-by-turn directions in many countries, plus the ability to store maps offline on your phone so you can work with maps without a data connection.

Cooler apps and games: Basing Windows Phone 8 on the Windows core will unleash a new wave of amazing apps and especially games, for reasons

For a more detailed write up check out the blog post here:

http://windowsteamblog.com/windows_phone/b/windowsphone/

You can also check out a recording of the summit here:

http://channel9.msdn.com/Events/Windows-Phone/Summit

Great stuff coming, stay tuned!

-mike

Digg This

CloudTip #16-Meet the new HTML based Windows Azure Management Portal

@MikeBenkovich 06/07/2012

Windows Azure has seen a number of upgrades. The latest announced today, along with a series of events to showcase and explore the features and capabilities of the Microsoft cloud platform (http://aka.ms/MeetAzMB), clearly shows the move towards simplicity, ease of use, and the speed to which you can get started with Azure. While I can’t cover it all in a single post, this is meant as an introduction to the new portal and in future posts I will explore various aspects and features that you can use for building scalable, durable and performant information solutions. A number of things were announced on the Azure blog (blog url) including some key ones around IaaS, Virtual Machines, Web Sites, and the Application Galleries.

HTML and AJAX Based Interface

The new portal runs on HTML and JavaScript, which means it can render on any browser that supports the core HTML functionality. This is great if you need to access it from a mobile device or tablet that doesn’t support plugins like Silverlight. The next thing you notice is that you get an at-a-glance view of all your running services, storage and networks.

image

Easily Create New Services

Adding a new service is as easy as clicking “NEW” on the bottom left corner of the screen and then making a selection of what you want to create. In addition to Cloud Services (formerly called Hosted Services) and storage, you can also create Virtual Machines, Web Sites, and Networks. These generally include a quick creation option which provisions the service with minimal configuraiton, but both Web Sit4es and Virtual machines include a “From Gallery” option which allows you to select a starting point to build from. 

image

This includes content management applications like Umbraco, DotNetNuke, Joomla, Das Blog, mojoPortal, and WordPress, or a Virtual Machines that already have SQL 2012 Eval, Windows Server 8 Beta, SUSE Linux, or Ubuntu installed and ready for your deployments. You can also save your own machines as starting points or upload your own VHD.

Yes, I did just say Linux. Running on Azure. In the Microsoft Cloud. Notice that the list of available images includes these as well as images I created!

image

The new dialogs walk you thru all the steps collecting the needed information in an easy to follow logical order to get the selected services up and running. Quick and easy, but where can you see the status and updates on these configuration tasks? That’s where the notification area at the bottom of the screen comes to bat. It provides a comprehensive spot for seeing summary and optionally more detailed information about your changes as they happen.

image 

Monitoring and Diagnostics

Beyond the provisioning of new services and configuration tasks you also can get great monitoring information about resources used by your cloud instances. By selecting a provisioned instance, clicking the name takes you to a details page where you can get deployment and configuration settings including database connection strings and more. You can quickly see how much usage you’ve used out of the available allocation that is part of the subscription.

image

You can easily get started today, just go out to http://windowsazure.com and try out the 90 Free Trial, or if you have an MSDN Subscription you can get compute time, storage and a lot more as part of your subscription benefits.

Enjoy!

-mike

Digg This

CloudTip #13-What do you need to know to get started?

@MikeBenkovich 05/17/2012

imageThere are many ways to learn a new technology. Some of us prefer to read books, others like videos or screencasts, still others will choose to go to a training style event. In any case you need to have a reason to want to learn, whether it's a new project, something to put on the resume or just the challenge because it sounds cool. For me I learn best when I've got a real project that will stretch my knowledge to apply it in a new way. It also helps to have a deadline.

I've been working for a while now for Microsoft in a role that allows me to help people explore what's new and possible with the new releases of technology coming out at a rapid pace from client and web technologies like ASP.NET and Phone to user interface techniques like Silverlight and Ajax, to server and cloud platforms like SQL Server and Azure. The job has forced me to be abreast of how the technologies work, what you can do with them, and understanding how to explain the reasons for why and how they might fit into a project.


Try Azure for 90 Days Free!

In this post I'd like to provide a quick tour of where you can find content and events on Cloud Computing that should help you get started and find answers along the way.

Part 1 - Get Started with Cloud Computing and Windows Azure.
You've heard the buzz, your boss might even have talked about it. In this first webcast of the Soup to Nuts series we'll get started with Windows Azure and Cloud Computing. In it we will explore what Azure is and isn't and get started by building our first Cloud application. Fasten your seatbelts, we're ready to get started with Cloud Computing and Windows Azure.
Video; WMVMP4 Audio; WMA Slides: PPTX

Part 2 - Windows Azure Compute Services
The Cloud provides us with a number of services including storage, compute, networking and more. In this second session we take a look at how roles define what a service is. Beyond the different flavors of roles we show the RoleEntryPoint interface, and how we can plug code in the startup operations to make it easy to scale up instances. We will show how the Service Definition defines the role and provides hooks for customizing it to run the way we need it to.
Video; WMVMP4 Audio; WMA Slides: PPTX

Part 3 - Windows Azure Storage Options
The Cloud provides a scalable environment for compute but it needs somewhere common to store data. In this webcast we look at Windows Azure Storage and explore how to use the various types available to us including Blobs, Tables and Queues. We look at how it is durable, highly available and secured so that we can build applications that are able to leverage its strengths.
Video; WMVMP4 Audio; WMA Slides: PPTX

Part 4 - Intro to SQL Azure
While Windows Azure Storage provides basic storage often we need to work with Relational Data. In this weeks webcast we dive into SQL Azure and see how it is similar and different from on-premise SQL Server. From connecting from rich client as well as web apps to the management tools available for creating schema and moving data between instances in the cloud and on site we show you how it's done.
Video; WMVMP4 Audio; WMA Slides: PPTX

Part 5 - Access Control Services and Cloud Identity
Who are you? How do we know? Can you prove it? Identity in the cloud presents us with the same and different challenges from identity in person. Access Control Services is a modern identity selector service that makes it easy to work with existing islands of identity such as Facebook, Yahoo and Google. It is based on standards and works with claims to provide your application with the information it needs to make informed authorization decisions. Join this webcast to see ACS in action and learn how to put it to work in your application today.
Slides: PPTX

Part 6 - Diagnostics & Troubleshootingx
So you've built your Cloud application and now something goes wrong. What now? This weeks webcast is focused on looking at the options available for gaining insight to be able to find and solve problems. From working with Intellitrace to capture a run history to profiling options to configuring the diagnostics agent we will show you how to diagnose and troubleshoot your application.

Part 7 - Get Started with Windows Azure Caching Services with Brian Hitney (http://bit.ly/btlod-77)
How can you get the most performance and scalability from platform as a service? In this webcast, we take a look at caching and how you can integrate it in your application. Caching provides a distributed, in-memory application cache service for Windows Azure that provides performance by reducing the work needed to return a requested page.

Part 8 - Get Started with SQL Azure Reporting Services with Mike Benkovich (http://bit.ly/btlod-78)
Microsoft SQL Azure Reporting lets you easily build reporting capabilities into your Windows Azure application. The reports can be accessed easily from the Windows Azure portal, through a web browser, or directly from applications. With the cloud at your service, there's no need to manage or maintain your own reporting infrastructure. Join us as we dive into SQL Azure Reporting and the tools that are available to design connected reports that operate against disparate data sources. We look at what's provided from Windows Azure to support reporting and the available deployment options. We also see how to use this technology to build scalable reporting applications

Part 9 - Get Started working with Service Bus with Jim O'Neil (http://bit.ly/btlod-79)
No man is an island, and no cloud application stands alone! Now that you've conquered the core services of web roles, worker roles, storage, and Microsoft SQL Azure, it's time to learn how to bridge applications within the cloud and between the cloud and on premises. This is where the Service Bus comes in-providing connectivity for Windows Communication Foundation and other endpoints even behind firewalls. With both relay and brokered messaging capabilities, you can provide application-to-application communication as well as durable, asynchronous publication/subscription semantics. Come to this webcast ready to participate from your own computer to see how this technology all comes together in real time.

Enjoy!

-mike

Digg This

Get your App into the Windows 8 Store!

@MikeBenkovich 05/08/2012

imageRecently, the Windows Store blog announced that in the next significant Windows 8 preview release they will be expanding their global coverage with 33 additional app submission locales for developers.

Our store services are ramping up as planned--and of course the plan includes ramping up developer registrations to enable app submissions to the Windows store. Today, you need an invite “token” to register. This begs the question - How can YOU get a token?

It’s easy! If your app is ready and you want to be among those developers who get to submit to the store early, simply attend one of the 100s of free Application Excellence Labs that DPE and Windows are holding around the world.

Follow these steps to get invited to an App Excellence lab:

1. Contact me (mike.benkovich@microsoft.com) for instructions on how I can nominate your app for an excellence lab.

2. Create a really great Windows 8 Metro style app (or game) immediately. Get it as ready as if you were submitting to the store.

Hopefully, there will be a lab near you. Right now, we have labs in 40+ countries and we may be adding more.

Of course, coming to the lab is not all you have to do. I have to go back to step #1: You need to have a compelling, functional app that follows our UX guidelines, our performance best practices, and our store certification requirements2

The lab is a 4-hour engagement with a trained Microsoft Services Engineer. This person will run your app through a series of tests based on a quality checklist to ensure your app is (or will be) in top-notch shape when you submit. You will also get a chance discuss ways to make your app even better and you will get answers to any questions you might have.

If your app meets the criteria, then booyah! You get a token to register your developer account and (once you have been verified and all that) you will be able to submit your app to the Windows store.

If your app does not meet the criteria, nothing is lost. You will still end up with a much better app3 and you will be able to submit it when registration opens for all developers.

Good luck. We are looking forward to seeing your apps and helping you to make them great!

Prepare For the Windows Store

ü  Get your app into the Windows Store! - Register and create your app profile found here http://aka.ms/CRReg

ü  Download and install the Windows 8 Consumer Preview 

ü  Download and install the Visual Studio 11 Express Beta for Windows 8

Additional Resources

ü  Stay connected with our Windows 8 Evangelists? Visit their blogs to keep informed about all the latest news, updated information and local events you can attend.

·         Jennifer Marsman

·         Jeff Brand

·         Clark Sell

·         Jared Bienz

Test your app before submitting with the Windows App Certification Kit (WACK)


Cloud Tip #4-How to migrate an existing ASP.NET App to the Cloud

@MikeBenkovich 04/01/2012

Suppose you have an existing application that you want to migrate to the cloud. There are many things to look at, from the data to the architecture to considering how you plan to scale beyond one instance. For simple web sites which don’t use a lot of data or stateful information the migration to the cloud can be pretty easy with the installation of the Visual Studio Tools for Windows Azure.

imageThe current release of the tools (as of March 2012) is v1.6 which adds a command to the context menu when you right click on a web project. The SDK is installed using the Web Platform Installer (aka WebPI) which checks for previous versions of the tools and any other prerequisites and the consolidates the install into a single step.

imageAfter installing the tools when you open a Web Project, whether ASP.NET Web Forms, MVC, or similar, right clicking the project file gives you the command to add an Azure Deployment Project. You could achieve something similar by simply adding a Cloud Project to your solution and then right clicking on the “Roles” folder and adding the existing site to the project.

This adds a Cloud project to the solution and then adds the current Web project as a standard Web Role in the deployment. The key assets added include a Service Definition file and a couple Service Configuration files (one for running locally and one for running in the cloud).

The Service Definition file includes markup which describes how the Cloud Service will be deployed, including the public ports that are enrolled in the load balancer, any startup tasks and plugins that you want to run, as well as any other custom configuration that should be part of the deployment.

For example the Service Definition we created for the Kick Start event in Minneapolis looked like this:

<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="MplsKickSite.Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
  <WebRole name="MplsKickSite" vmsize="Small">
    <Sites>
      <Site name="Web">
        <Bindings>
          <Binding name="Endpoint1" endpointName="Endpoint1" />
        </Bindings>
      </Site>
    </Sites>
    <Endpoints>
      <InputEndpoint name="Endpoint1" protocol="http" port="80" />
    </Endpoints>
    <Imports>
      <Import moduleName="Diagnostics" />
    </Imports>
  </WebRole>
</ServiceDefinition>

In this code we’ve got a single web role being deployed that will run on port 80. It is running a small instance (1 dedicated core), and will have remote desktop enabled. The Service Configuration contains additional settings including the OS Family for the instance (1 = Windows Server 2008 SP2 and 2 = Server 2008 R2) and number of instances to run (in this case 3).

<?xml version="1.0" encoding="utf-8"?>
<ServiceConfiguration serviceName="MplsKickSite.Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" 
osFamily="2" osVersion="*"> <Role name="MplsKickSite"> <Instances count="3" /> <ConfigurationSettings> <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" /> <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" /> <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="... <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="...
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="... <Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" /> <Setting name="QueueName" value="createthumbnail" /> <Setting name="myStorageAcct" value="UseDevelopmentStorage=true" /> </ConfigurationSettings> <Certificates> <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="... </Certificates> </Role> </ServiceConfiguration>

Pressing F5 will run the Cloud Service in the local emulator (assuming we’re running Visual Studio as Administrator so it can communication cross process to the running services…an error message tells you if you’re not). The nice thing about this approach is it supports attaching to the local debugger and using the rich set of features such as breakpoints, local and watch variables, and all the rest of the goodness we’ve come to expect in Visual Studio debugging.

image

Once we’re satisfied that the application works and we are ready to go to the Cloud, you can right click on the Azure Deployment project and either click “Package” to create a deployment package which you can manually upload the the Windows Azure Management portal, or you can select Publish to automate it directly from Visual Studio. This runs a wizard with 3 basic steps to collect the necessary information and complete the deployment. You select the subscription you want to use, name the hosted service, optionally enable remote desktop and web deploy, and then click complete.

image   image  image

Note that if you enable Web Deploy, because this is only supported for a single instance development environment where you require the ability to publish changes to a web site quickly, the publishing process will change your configured number of instances to 1 despite having set it to 3 in the configuration files. That’s because if you have more than 1 instance deployed the load balancer will distribute the incoming web requests round robin, and if you change one of the instances with a web deploy you’ll have an inconsistent state. You can always change the number of instances from the management portal, but you should be aware of what you’re doing.

imageimage

What happens next is the deployment process takes place. This includes validating that the hosted service is provisioned for you, uploading certificates if needed, then uploading your deployment package and configuration files to Windows Azure storage, and then deploying and starting your instances. It will also add the service deployment to the Server Explorer window (CTRL + ALT + S). From there you can see the status of your service instances, download the profile or intellitrace files if you’ve enabled that option (under advanced features during the publish).

For more information on how to do this, or if you’d like to see a webcast on how this is done, check out the first webcast in the Cloud Computing Soup to Nuts series (http://bit.ly/s2nCloud).

Enjoy!

Digg This

Cloud Tip #3–Find good examples

@MikeBenkovich 03/31/2012

imageYesterday in Minneapolis we delivered the first Windows Azure Kick Start event of the series we’re running this spring to help developers learn and understand how to use the new tools and techniques for building cloud based applications. As part of that event we wrote a lot of code as a demonstration of how this stuff comes together and I’ve uploaded it to www.benkotips.com in case you’re interested in the download. The solution includes several projects including:

  • MplsKickSite - An existing ASP.NET web site that we migrated to Windows Azure, implementing the RoleEntryPoint interface and adding references to the Microsoft.WindowsAzure.StorageClient for working with storage, and Microsoft.WindowsAzure.ServiceRuntime to give us instance information. We also added cloud identity to the site using Access Control Services to secure a data entry page with data hosted in a SQL Azure database
  • WPFUpload which is a Windows application which includes logic to support drag and drop to upload files into Windows Azure Blob Storage, and if they are images to add work to a queue to create thumbnail images
  • UploadDataLib which is a class library that implements Windows Azure Table Storage logic for working with the images uploaded by WPFUpload and the ThumbMaker worker role projects.
  • ThumbMaker which is a worker role class that demonstrated working with Tables and Queues and the System.Drawing library to create thumbnail images and brand them with a custom logo message
  • PhoneApp1 which demonstrates how to use a Windows Phone Silverlight user control to handle the login conversation with ACS
  • NugetPhone which is a second example of ACS in use with devices, except that instead of spending 10 minutes to write the code like we did with PhoneApp1 we use the Nuget package manager to include a package (Install-Package Phone.Identity.AccessControl.BasePage) to perform the authentication for us and make the 4 code changes to implement the logic…2 minutes to demo

The decks and recordings of similar sessions are available on the Soup to Nuts Cloud Computing page of my site (http://bit.ly/s2nCloud). You can download the solution and project files and run every thing with the Compute and Storage Emulator, but you’ll need an active subscription to deploy to the cloud. If you don’t have Azure benefits you can activate from an MSDN Subscription you can always give the 90 day Free Trial a try.

Enjoy!

Digg This

Cloud Tip #2–Finding Cloud Content that works for You

@MikeBenkovich 03/29/2012

imageThere are many ways to learn a new technology. Some of us prefer to read books, others like videos or screencasts, still others will choose to go to a training style event. In any case you need to have a reason to want to learn, whether it’s a new project, something to put on the resume or just the challenge because it sounds cool. For me I learn best when I’ve got a real project that will stretch my knowledge to apply it in a new way. It also helps to have a deadline.

I’ve been working for the last several years now for Microsoft in a role that allows me to help people explore what’s new and possible with the new releases of technology coming out at a rapid pace from client and web technologies like ASP.NET and Phone to user interface techniques like Silverlight and Ajax, to server and cloud platforms like SQL Server and Azure. The job has forced me to be abreast of how the technologies work, what you can do with them, and understanding how to explain the reasons for why and how they might fit into a project.

In this post I’d like to provide a quick tour of where you can find content and events on Cloud Computing that should help you get started and find answers along the way.

First on my list are the webcasts we’ve created that are 1 hour long sessions on the various aspects of a given topic. For Cloud Computing and Windows Azure I’ve got a list of several on my web site (www.benkotips.com) including a 27 part companion series we called “Windows Azure Boot Camp”. The first 10 webcasts in this series cover what you would see at a boot camp event (www.windowsazurebootcamp.com).  This spring we started a new series called “Cloud Computing Soup to Nuts” which is a developer focused get started with Windows Azure and the related services. We’ve recorded 6 webcasts as part of that series and will be adding more as we go forward. We just added 3 more for April including:

4/3 : Part 7 - Get Started with Windows Azure Caching Services with Brian Hitney (http://bit.ly/btlod-77)
How can you get the most performance and scalability from platform as a service? In this webcast, we take a look at caching and how you can integrate it in your application. Caching provides a distributed, in-memory application cache service for Windows Azure that provides performance by reducing the work needed to return a requested page.

4/10 : Part 8 - Get Started with SQL Azure Reporting Services with Mike Benkovich (http://bit.ly/btlod-78)
Microsoft SQL Azure Reporting lets you easily build reporting capabilities into your Windows Azure application. The reports can be accessed easily from the Windows Azure portal, through a web browser, or directly from applications. With the cloud at your service, there's no need to manage or maintain your own reporting infrastructure.  Join us as we dive into SQL Azure Reporting and the tools that are available to design connected reports that operate against disparate data sources. We look at what's provided from Windows Azure to support reporting and the available deployment options. We also see how to use this technology to build scalable reporting applications

4/17 : Part 9 – Get Started working with Service Bus with Jim O’Neil (http://bit.ly/btlod-79)
No man is an island, and no cloud application stands alone! Now that you've conquered the core services of web roles, worker roles, storage, and Microsoft SQL Azure, it's time to learn how to bridge applications within the cloud and between the cloud and on premises. This is where the Service Bus comes in—providing connectivity for Windows Communication Foundation and other endpoints even behind firewalls. With both relay and brokered messaging capabilities, you can provide application-to-application communication as well as durable, asynchronous publication/subscription semantics. Come to this webcast ready to participate from your own computer to see how this technology all comes together in real time.

If you’re looking for a conversational 30 minute show that covers Cloud topics I suggest checking out Cloud Cover on Channel9. This show features Azure experts including Ryan Dunn, Steve Marx, Wade Wegner, David Aiken and others who work closely with the product teams at Microsoft to learn how to use the latest releases.

Live events are a moving target depending on when you read this post, but we try to keep a list of upcoming Microsoft Events for developers on http://msdnevents.com. As we schedule them we add the events to this hub and you can find them by date and by location with a map of upcoming events. Another place to check is the demo page I’ve created on BenkoTips which shows not only upcoming events (aggregated from Community Megaphone, if you add it there it should show up on the map) but also User Group locations and links to their sites. That’s on http://benkotips.com/ug, then use the pan and zoom to focus the map on your city. Pins get added with the links. If your User Group data is out of date, send me an email & we’ll get it fixed.

We’ve got a series scheduled to run in thru May 2012 for Cloud Computing called Kick Start, which are a 1 day focused event that takes you thru the content from Soup to Nuts. The current schedule includes:

As to books I’d suggest checking out Sriram Krishnan’s book Programming Windows Azure: Programming the Microsoft Cloud, or Brian Prince’s book Azure in Action. If it’s SQL Azure that you’re after then Scott Klein has a great book called Pro SQL Azure (Expert’s Voice in .NET). I am also partial to the Patterns and Practices team’s book on Moving Applications to the Cloud on the Microsoft Azure Platform.

Finally you need an active Azure Subscription to get started. You can activate a 90 Free Trial by going to http://aka.ms/AzureTrialMB and get the tools at http://aka.ms/AzureMB.

Digg This

Cloud Tip #1–How to set a connection string in Web.config programmatically at runtime in Windows Azure

@MikeBenkovich 03/27/2012

The scenario is I’m migrating an application to the cloud. I’ve got a database connection defined in my web.config file which uses an on-premise SQL Server database and what I’d like to do is to move it to a Web Role on Windows Azure and use a SQL Azure database. The basic process is to add a Windows Azure Deployment Project to the solution that contains my web application. Next I move my database to SQL Azure (using the SQL Azure Migration Wizard), and then I change the connection string to point to the cloud database. Except that after I’ve deployed the project I may need to change where the database lives.


Try Azure for free - Activate a 90 day trial at http://aka.ms/AzureTrialMB today!

Since that information is stored in Web.config all I need to do is redeploy a new web.config file to the Web Role and we’re good to go. Unfortunately that probably means an upgrade to the application or a VIP swap, which isn’t all bad, but I know that I can make changes to the ServiceConfiguration file and propagate the changes to the running instances…no down time. But how do I get a change in the Service Configuration into the web.config?

I have posted before how you can encrypt information stored in the web.config file during a Session_Start event by adding code to the Global.asax file to examine a section and then call protect. If I can add some code to determine whether I’m running in Azure, and if I am to read the setting from the ServiceConfiguration file then we should be good.  Like the example of encrypting settings an approach that works well is to add code to the Session_Start event. For my example I’ve created a setting in the Windows Azure Role for dbConnectionString and set it to the value I’d like to use.

image

Next I make sure I add a reference to the Microsoft.WindowsAzure.ServiceRuntime namespace added to the web project so I can access information about the role. If I don’t have one already I add a global.asax file to my web project. This would be where I can add code for the events that fire periodically throughout the lifecycle of my app. I choose to use the Session_Start because if I’ve made changes to my ServiceDefinition file they will get applied the next time someone browses to my site. 

        public string dbConnectionString { get; set; }
 
        void Session_Start(object sender, EventArgs e)
        {
            // Are we running in Azure?
            if (RoleEnvironment.IsAvailable == true)
            {
 
                dbConnectionString = RoleEnvironment.GetConfigurationSettingValue("dbConnectionString");
 
                // Do we have a value for the alternate dbConnectionString in the ServiceConfiguraiton file?
                if (dbConnectionString != null)
                {
                    Configuration myConfig = WebConfigurationManager.OpenWebConfiguration("~");
                    ConnectionStringsSection mySection = myConfig.GetSection("connectionStrings") as ConnectionStringsSection;
                    if (mySection != null)
                    {
                        if (mySection.ConnectionStrings["myDBConnectionString"].ConnectionString != dbConnectionString)
                        {
                            mySection.ConnectionStrings["myDBConnectionString"].ConnectionString = dbConnectionString;
                            myConfig.Save(ConfigurationSaveMode.Modified, true);
                        }
                    }
                }
            }
        }

I check to see whether the value in the Service Configuration file is different than the value in my web.config, and if it is then make the change and save it. Initially when I tested the code I got a “the configuration is read only” error, but by adding the option for the Save method it works. Now I am able to update the database connection string from the Service Configuration File and have it propagate to my web.config of the running application.

Credit goes where credit is due, and Bing pointed me to a few posts on the subject, including StackOverflow and DotNetCurry.

Enjoy!

Digg This

Announcing Windows Azure Kick Start Events

@MikeBenkovich 03/12/2012

It’s spring and once again we’re back on the road to helping people explore the possible and see how to get started with Cloud Computing. Along with the webcast series I’ve been doing (http://benkotips.com/s2nCloud) we’ll be on the road to bring the content to your town. The schedule so far is listed below.

By the way if you have MSDN you have free cloud benefits! This video shows you how to get your risk free access to Azure to explore and learn the cloud or activate your MSDN Cloud benefits here. If you have questions send our Azure team members an email msnextde at microsoft.com.

See you on the road!

Digg This

Get Started with Cloud Computing and Windows Azure

@MikeBenkovich 03/04/2012

This is the first part of a series of blog posts I’m working on as part of the companion webcast series “Soup to Nuts Cloud Computing” in which we look at what it takes to get started with the tools and setup things you need to begin building Cloud applications. I will be focusing on Windows Azure as our target platform, but the topics we cover later on about architecting for scale, availability and performance apply across any Cloud Provider. I’m going to make the assumption that we’re on the same page as to what Cloud Computing is, which Wikipedia defines as

Cloud computing is the delivery of computing as a service rather than a product, whereby shared resources, software, and information are provided to computers and other devices as a utility (like the electricity grid) over a network (typically the Internet).[1]"”

I like the definition on SearchCloudComputing - http://searchcloudcomputing.techtarget.com which describes it this way:

“A cloud service has three distinct characteristics that differentiate it from traditional hosting. It is sold on demand, typically by the minute or the hour; it is elastic -- a user can have as much or as little of a service as they want at any given time; and the service is fully managed by the provider (the consumer needs nothing but a personal computer and Internet access).”

Assuming we agree on what it is, Windows Azure provides what is called “Platform as a Service” or PaaS to customers who want to build scalable, reliable and performant solutions to business information problems. Windows Azure is available on a Pay as you Go, as a Subscription Benefit or on a Trial basis. These are associated with a subscription which you create as the management point of contact for your services. The services available are fairly broad and include some core services such as Compute, Storage and Database, but also include several additional services that can be used in conjunction with or separate from the core services including Identity Management (Access Control Services), Caching, Service Bus, Reporting Services, Traffic Management, Content Delivery Network and more.

image

Using these services we can build a variety of applications and solutions for websites, compute intensive applications, web API’s, social games, device applications, media intensive solutions and much more. The thing we need to get started is an account or subscription which provides the interface to provision and manage these services. Fortunately there are many ways to get started.

The Subscription. If you have an MSDN Subscription or are part of the Microsoft Partner Network or have signed up for BizSpark you already have Azure Benefits that you just need to activate. Simply go to http://bit.ly/bqtAzMSDN to see how to activate. If none of these apply you can also try out the Free 90 Day Azure Trial (http://aka.ms/AzureTrialMB) which includes a cap which prevents accidental overage. When you activate your subscription it will walk you thru a series of steps which are needed to get things set up.

image  image  image

The first page shows us what we get with the subscription. Next it confirms your identity by sending a confirmation code to your cell phone. The process then asks for credit card information to validate your identity and then activates your account. The process is very fast and responsive (unlike the old 30 day Azure Pass we had used at the Boot Camps in 2011 which could take up to 24-48 hours to activate the trial.

image  image  image

The Tools. Next we get the tools. because there are lots of platform developers out there, you can get the tools that work for you, whether it’s Visual Studio, Eclipse, PowerShell or just command line tools. You’ll want to download the SDK and tools by going to http://aka.ms/AzureMB and clicking the appropriate link.

image

Our First App. Now that we have our tools, let’s look at what is needed to build and deploy an app. In the webcast we showed how to take an existing application and add the pieces needed to deploy it to the cloud. We start out in a Visual Studio Solution that has a simple ASP.NET web application. After we’ve installed the tools for Visual Studio when you right click on the web project file you will see a new option on the context menu to Add a Windows Azure Deployment Project to the solution.

image

This adds a new project to the solution and includes a service definition file and a couple configuration files. The Service Definition file (*.csdef) describes how our cloud application looks, including what type of roles are included (think front end web servers and back end processing servers), the endpoints that will be serviced by the load balancer and any internal endpoints we plan to use, as well as any startup configuration we need to run when our instances start up.

<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="Soup2NutsSite.Azure1" 
                   xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
  <WebRole name="Soup2NutsSite" vmsize="Small">
    <Sites>
      <Site name="Web">
        <Bindings>
          <Binding name="Endpoint1" endpointName="Endpoint1" />
        </Bindings>
      </Site>
    </Sites>
    <Endpoints>
      <InputEndpoint name="Endpoint1" protocol="http" port="80" />
    </Endpoints>
    <Imports>
      <Import moduleName="Diagnostics" />
    </Imports>
  </WebRole>
</ServiceDefinition>

The Service Configuration files (*.cscfg) include things like connection strings, certificates and other pieces of information used by our running service instances that we may change after deployment.

Deploy. After adding the Windows Azure Deployment Project you can publish it out to the cloud by right clicking and selecting Publish. A wizard is presented which walks you thru the steps to build a package of files which includes zipped and encrypted copies of all the code and resources the application requires, as well as the configuration files to make your application work. You sign into your Windows Azure subscription setup a management certificate which authorizes Visual Studio to make deployments on your behalf. You can pick the subscription you want to use and then create a hosted service name and select a data center or region to run it in.

image  image  image

You can choose to enable Remote Desktop, where it will ask for an admin user name you’d like to use to manage the service, and optionally enable Web Deploy which adds the necessary plumbing to support WebDav deployment of your web code (a nice development feature where you can update the code running the website without doing a full deployment of the hosted service).  You end up with a Publish Summary that shows what and where you will deploy the site to.

image  image

Clicking Publish then goes thru the process of building your package, uploading it to the Windows Azure Management site, and starting your service. Visual Studio has a status window which shows where it’s at in the process, and you can see your deployment from the Windows Azure Management Portal and clicking on the “Hosted Services, Storage Accounts & CDN” button on the left panel of actions.

image

If you’re curious to see how much you’ve used of your subscription you can always go back to http://WindowsAzure.com and view your account details.

image

Conclusion. So that’s it. You can get started with Windows Azure and Cloud Computing very quickly, all you need is an active subscription, download the tools, and then do a quick deploy of a project.  For details on things like pricing check out the page on http://WindowsAzure.com.

Digg This