Category Archives: .NET

Now Working With Azure Without Leaving Visual Studio!

First, let me say I love what they have done with the Windows Azure user interface on the web. (You can see it here.) The UI is easy to get around, the animations are helpful, etc. Unfortunately, it’s all in the browser and not in my IDE. This means I have to leave my IDE on occasion to do things like publish my app and confirm the names of sites, services, databases, etc.

But times are a changin’! On April 30th, Microsoft released the Windows Azure SDK 2.0 for .NET. This SDK includes enhancements to Visual Studio that provide integration between the IDE and the Azure management services. In this blog post, I’m going to focus on the publishing to Azure features, but there are other features enabled with this SDK that you can read a little more about on Scott Guthrie’s blog post here.

As I have in the past, I’m going to start by right-clicking my web project and selecting Publish… from the context menu.

Again, as before, the Publish Web dialog appears and we’ll click the Import… button to open the Publish Profile dialog.

I used to download my Azure publish profile from the management portal and keep that file in my Visual Studio project, so I could re-use it if I needed to and share it with my team. I would then import it using this dialog. Here comes the new part! Rather than browsing to the file, I’m going to select the first radio button, labeled Import from a Windows Azure web site, and click the Add Windows Azure subscription hyperlink.

The Import Windows Azure Subscriptions dialog appears. We need to download our subscription details, so click Download subscription file to get the .publishsettings file from the portal. This is the only time you’ll need to return to the Azure portal. This settings file includes all of the information about our Azure subscription – not just a single web site’s publish settings. We’ll then return to the Import Windows Azure Subscriptions dialog and browse out to the location of the file we downloaded. Click the Import button to continue.

Returning to the Import Publish Profile dialog, you should be able to select from your existing Azure web sites from the drop down list. Click OK to return to the Publish Web dialog. The publish settings will auto-populate the Connection tab (which is way better than trying to enter/re-enter all of this stuff yourself). If you’d like, you can click Validate Connection to ensure everything is correct.

The rest of the publish process remains unchanged. After clicking the Publish or Close buttons, you will be prompted to save all of your publish settings and if you choose to do so, they will be added to your Visual Studio project under Properties | PublishProfiles.

Now that I’ve published my application, I should probably check on its status. By opening Server Explorer in Visual Studio, you can now see your Azure subscription services. By expanding the Windows Azure Web Sites node, I can see that my teamsystemcafeservices site is running.

There are several useful options available if you right-click your web site. I can start and stop the web site and stream logs to my output window.

Of course, I can save myself the trip out to the management portal again by selecting View Settings and configure my web site right within the IDE.

There are several other features in the new Azure SDK, so check ’em out!

New SharePoint Features for Developers

I recently completed a tour through Kansas City, Minneapolis, Des Moines, and Omaha to demonstrate the new capabilities for SharePoint developers available in Visual Studio Update 1. (Thanks to all of you that attended – despite this crazy weather!)

A special thanks to Neil Iversen from Avtex for his presentation and demos on the new features in SharePoint 2013. His passion and knowledge on the topic was most evident.


Three key features for SharePoint developers were the focus of my session:

Unit testing SharePoint

Sad smileMost SharePoint developers I know don’t write unit tests. It’s just too hard to isolate your custom logic from SharePoint. Without unit tests, developers must spend a lot of time setting up environments, inserting test data, and walking through numerous pages to see if their code is working as intended.

Rolling on the floor laughingVisual Studio 2012 Update 1 adds a SharePoint emulation capability based on the Fakes Framework. You can now write unit tests against your code without even having a live instance of SharePoint! You can even alter the behavior of the SharePoint API to control what the API returns to you.

This feature requires Visual Studio Premium and Update 1.

Performance and load testing SharePoint

Steaming madAny time you are writing code, its always good to keep in mind performance implications. Users get frustrated when applications aren’t responsive. Unfortunately, SharePoint is such a dynamic system, that it could be hard to create usable web performance tests in earlier versions of Visual Studio. With sites, lists, and documents all having unique identifiers that varied across environments, these tests would require a lot of manual revisions to the recorded URL’s. There was also a lot of extra “noise” in the HTTP traffic.

Fingers crossedIt never fails that when users need something in SharePoint, a LOT of them also need it – at the same time. So, load testing is also important in SharePoint. They’ll sometimes make a problem worse by retrying their last action because they aren’t sure its working properly.

Hot smileUpdate 1 adds features to make the recording of web performance tests ignore the noise and identify any SharePoint error pages encountered. The dynamic parameter detection has been extended to extract and pass the unique identifiers for SharePoint objects like site names, list GUIDs, document names, and more.

This feature requires Visual Studio Ultimate and Update 1.

Advanced debugging SharePoint with IntelliTrace

Surprised smileDo you support issues reported by your SharePoint users? Ever wonder what to do with those correlation IDs you see on a SharePoint error page? Its not always easy to reproduce issues within SharePoint.

Red heartThis update makes it very easy to take advantage of IntelliTrace in order to see what lines of your code executed leading up to the reported issue. Even though the error didn’t occur in your development environment, IntelliTrace will log all of the activity so you can play it back in Visual Studio – even if you don’t have the source code on your machine! You can also filter to specific correlation IDs within the IntelliTrace log.

This feature requires Visual Studio Ultimate and Update 1.

You can download the slides for our sessions from my SkyDrive here. Most of my demo’s were based on the hands-on labs here (and get the associated VM here).

Are you a SharePoint developer? Are these new features interesting to you? Let me know what you think.

Web API, WCF Data Service, and St. Louis Winter Weather

Fun combination, huh? I am the presenter at tonight’s St. Louis .NET User Group meeting and this is the topic. I will start by presenting demonstrations of Web API and WCF Data Services, but I’m hoping this will be a discussion about what people are doing with web services today.

Before I forget to do so, I’ll go ahead and post links to my presentation materials: slide deck and demo script. (I’m adding a couple of things and I’ll update the demo script out there later today.) UPDATE: I’ve added the code snippets used in the demo script to my SkyDrive for you to download here.

Building on the success of the last St. Louis .NET User Group meeting, we will be holding this month’s meeting at The Schlafly Bottleworks starting around 6pm.