Archive

Archive for the ‘azure’ Category

Upcoming Cloud Computing Events

March 10th, 2010

I just wanted to make you aware of the meetings planned for the Twin Cities Cloud Computing User Group for the next 4 months. These are some great topics and speakers that you’re not going to want to miss.

April 8, 2010
Dynamics CRM Online
Presented by Shikhar Agarwal, Sogeti
Register here

May 13, 2010
Custom Applications and SharePoint Online
Presented by Frank Shink, Magenic
Register here

June 10, 2010
SQL Azure
Presented by Mike Benkovich, Microsoft
Register here

July 8, 2010
Azure Storage
Presented by Brent Stineman, Sogeti
Register here

Hope to see you there!

adam Community, azure, cloud computing, sql azure , , ,

Version 1.1 of Thor is Released

February 22nd, 2010

I’m pleased to announce that version 1.1 of Thor has been released. Here’s a summary of what’s new in this release:

  • Specify whether or not to display the subject of appointments on a calendar
  • Specify whether or not to use a booking agent on a calendar by calendar basis
  • Specify whether or not a calendar requires authentication to view and/or book appointments
  • Specify whether or not to display a given timeframe for a calendar
  • Highlight the current time in a calendar
  • Only passwords are encrypted when persisted to storage
  • The logo for the website was changed from a .png to a .jpg to accommodate Windows Mobile
  • The provider assembly dropdown only displays assemblies that contains type that implement ICalendarProvider
  • The provider type dropdown only displays types that implement ICalendarProvider

You can dowload all the goodness here.

adam Community, azure, thor , ,

WCF RIA Services, ASP.NET MVC, and Windows Azure Assemblies

February 3rd, 2010

In my previous post I talked about some of the pain points I went through with Windows Azure and setting “Copy Local” appropriately on referenced assemblies. I thought I’d do a quick post to let you know which assemblies, other than my own, I ended up marking as “Copy Local”. As you’re aware Project Thor uses technologies such as Azure storage and diagnostics, ASP.NET MVC, and WCF RIA Services. If you’re using these technologies you’ll need to make the following assemblies are flagged as “Copy Local”:

Azure Storage and Diagnostics
Microsoft.Windows.Azure.Diagnostics
Microsoft.Windows.Azure.StorageClient
Microsoft.Windows.Azure.CloudDrive (new in the February release)

ASP.NET MVC
System.Web.Mvc
System.Web.Routing

WCF RIA Services
System.ComponentModel.DataAnnotations (for version 3.6.0.0 only)
System.Web.DomainServices
System.Web.Ria

Hope this helps.

adam asp.net mvc, azure, thor, wcf ria services , , ,

Copying Local with Windows Azure

February 3rd, 2010

So, I finally got Project Thor to a state where I felt comfortable deploying it to the Azure staging environment. After packaging it up, uploading it to the portal, pressing run, I waited with baited breath as my web role and worker role fired up. And I waited, and I waited, and I waited. Both roles went from Initializing to Busy to Stopping to Stopped. Of course, they work on my machine without problem. FAIL!

I have a bunch of logging in place, but the roles weren’t even getting to the point where they could log messages. After doing some digging on the Azure forums I came across this post. The underlying idea is that my apps were missing referenced assemblies. I saw this as a pretty good possibility as my apps are loosely coupled and I’m actually dropping assemblies into various directories as part of a post build process. However, my assumption was that the CSPack command line utility was simply packaging up the web and worker role directories for deployment. I wanted to verify my assumption was incorrect before proceeding, but since the package created by CSPack is encrypted there’s no way for me to verify the contents. Or is there?

Enter Jim Nakashima. Jim has a great poston how you can force CSPack to create unencrypted packages. After following the steps in the post and creating the unencrypted package, I dug into it to examine the contents. Sure enough, the assemblies I was dropping into my web and worker role directories weren’t getting packaged. After reading this post by JimI understood why. If I want to include the files in the package they need to be associated with the projects. This is kind of a bummer as I wanted to maintain the loose coupling, but I was willing to sacrifice it for the time being. I added the necessary references to my worker and web roles projects, packaged, uploaded, pressed run, and waited, and waited, and waited. Same thing as before. WTF?!

This post mentions to make sure you have “Copy Local” set to true for your assemblies. OK. Fine. No problem. I went through the web and worker role projects and set all references to “Copy Local” = true, packaged, uploaded, pressed run, and waited, and waited, and waited. OK, progress. The worker role started up, but the web role continued to fail.

I’m not one to typically post a problem on a forum as I like to go through the pain of solving them myself (helps me not to forget). However, at this point I was at my wit’s end. I posted the problem to the Azure forums, making sure to give Microsoft permission to open up my VM for diagnostic purposes.

After a couple of back and fourths, the problem became clear. I had marked all assemblies in my web and worker roles with “Copy Local” = true. However, I’m running a 32 bit dev machine (I know, I know I need to upgrade, but this laptop rocks, but that’s another post), and the cloud runs 64 bit. As a result, the 32 bit assemblies that were included in my package were failing to load as they weren’t 64 bit. Makes perfect sense! OK, so which assemblies are loaded in the cloud and which do I need to set to “Copy Local” = true? The answer lies here, but I’ll summarize it for you:

The cloud has a default installation of .NET 3.5 SP1, plus the Microsoft.Windows.Azure.ServiceRuntime.dll. This means you can refer to C:\Windows\Microsoft.NET\Framework64 on your own machine. All the assemblies available in v2.0.50727, v3.0, and v3.5 should be available on the cloud machines.

Many thanks to Yin-Lun Luo and Toddy Mladenov for the help.

Given the several valuable lessons I learned, I would once again say that Project Thor is living up to its mission.

adam azure, thor ,

Azure Deployment and Maintenance

February 1st, 2010

I’m going to be speaking on Azure Deployment and Maintenance at the Twin Cities Cloud Computing User Group on February 11th. Here’s the abstract for the session:

So, you’ve created your first Azure application. Now what? In this session Adam Grocholski joins us to to help walk us through moving our Azure applications from our local development environments to the cloud. Areas to be discussed include:

  • Creating Azure services
  • Preparing your application for deployment
  • Packaging your application for deployment
  • Deploying your application to Azure’s staging environment
  • Moving your application from Azure’s staging environment to production
  • Upgrading your Azure application
  • Creating deployment and maintenance scripts with Powershell

You can register for the session here.

Hope to see you there!

adam azure, cloud computing ,

More ASP.NET MVC Learning on Project Thor

January 20th, 2010

In my last post I described an issue I was encountering with ASP.NET MVC and WCF RIA Services while writing code for Project Thor. The gist of it is that routing was intercepting the calls made to my WCF RIA Services by my Silverlight application and resulting in 404 errors. A quick change to the RegisterRoutes method and voila it worked! Or so I thought…

Since I thought my problem was solved I went on to working on other parts of the ASP.NET MVC side of Project Thor. However, one day, like yesterday, I was running the app and wanted to adjust an admin setting on the Silverlight side, so I typed in the url to the Silverlight page, and I got another 404. What?! That wasn’t supposed to happen. Grrr!

I started going down some pretty nasty rabbit holes on this one. I knew it had something to do with routing, but being new to ASP.NET MVC I wasn’t sure what exactly it could be. At one point I had myself convinced it had do something with local Azure development fabric and integrated pipeline mode on IIS 7.0 running on Windows 7. I wasn’t getting anywhere. I’m not the type of guy that posts my problems and asks for help. I like working through these things on my own (yes, I am a glutton for punishment). However, I needed to get moving so I put the question on Stack Overflow. Within minutes, like 1 minute, I had two responses. The first response was on twitter from John Sheehan. The other response was on Stack Overflow and from none other than Phil Haack. Both responses weren’t a direct answer to my question, but they both pointed me to the ASP.NET Routing Debugger. As the page says:

“This utility displays the route data pulled from the request of the current request in the address bar. So you can type in various URLs in the address bar to see which route matches. At the bottom, it shows a list of all defined routes in your application. This allows you to see which of your routes would match the current URL.”

I downloaded the utility and fired the app up. Here’s what I got for the default page:

Figure 1

Good. Exactly what I expected.

I then tried to navigate to the configuration page that contains the Silverlight application:

routetestb

Bam! There’s the error! I shouldn’t be getting a match on the first route, the route I want MVC to ignore, the route I told MVC to ignore in my last post. D’oh! If you remember, my RegisterRoutes method looked something like this:

public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{Services}/{*pathInfo}");
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
 
            routes.MapRoute(
                "Configuration",
                "Configuration",
                new { controller = "Configuration", action = "Index" }
            );
 
            routes.MapRoute(
                "Calendars",
                "Calendars/{id}",
                new { controller = "Calendar", action = "Index", id = "" }
            );
 
            routes.MapRoute(
                "Default",
                "{controller}/{action}/{id}",
                new { controller = "Account", action = "Index", id = "" }
            );
        }

See those curly braces around Services in the first line of the method. Those curly braces that are the MVC convention for replacement. Yeah, um, those shouldn’t be there. I’m not replacing anything. I want to ignore any calls to the actual Services directory. So the updated line looks like this:

routes.IgnoreRoute("Services/{*pathInfo}");

Once I made this change here’s what the testing utility showed me.

routetestc

Perfect! When I then ran the app without the route debugging utility in place it worked as expected. I’m always amazed and at how so many seemingly complicated problems are solved with one line of code.

So, what’s the upshot of all this? Well, as I mentioned previously, the main goal of Project Thor is to help people, especially me, learn about other technologies they don’t get to work with on a day-in/day-out basis. Today I learned two things about ASP.NET MVC:

  1. Routing is incredibly simple, ONCE YOU UNDERSTAND IT!!!
  2. There is a great ASP.NET MVC community out there willing to offer assistance if you need. (Thanks again John Sheehan and Phil Haack!)

In my opinion Project Thor is, once again, accomplishing its goal. Now to finish version one!

adam azure, silverlight, tag, wcf ria services, windows azure , , ,

MVC-ing WCF RIA Services

January 8th, 2010

In my last post I wrote about how I’m going to spending some time focusing on UX. However, I will be spending some time on other endeavors as well. One of those endeavors is Project Thor. I don’t want to go into all the details of Thor as I’ll be posting more about the project as we get closer to our February 1st release date. However, I ran into an issue last night/this morning that I thought deserved an immediate post. One of the goals of Thor is to get developers exposed to technologies that they might not otherwise have a chance to tinker with. To that end we’re using things like Windows Azure, Microsoft Tag, Exchange Web Services, Powershell, Silverlight, WCF RIA Services, and ASP.NET MVC. We’re using Silverlight and WCF RIA Services to provide a configuration front-end to the app. ASP.NET MVC is being used to provide a mobile front-end that users will use to reserve conference rooms. I’ve been doing the Silverlight/WCF RIA Services and up until yesterday evening everything was working great. Data was flowing from the Silverlight app through the services to our Windows Azure storage mechanisms. Then, last night, one of the other developers told him he had checked in some changes to complete the MVC-ing of our Windows Azure Web Role and that his code (mobile web type stuff) was working. “Great!” was my initial thought. Then I pulled down the latest source code from CodePlex and realized that while his stuff was in fact working all of our Silverlight/WCF RIA Services was busted. WTF? Why would ASP.NET MVC code break our Silverlight/WCF RIA Services. Time to put on the debugger had and figure this sucker out.

The error I was receving was fairly non-descript but it basically told me the request resource (service) could not be found. The first thing I did was to take a look at what he had checked in, specifically in the web.config file. One of the more interesting entries I found was this one:

Now keep in mind I’m fairly new to ASP.NET MVC. I understand how it works at a high-level and I’ve built a couple of basic CRUD apps, but I haven’t really dived into the guts of it as I spend most of my time in Silverlight. Putting the web.config entry together with the error got me thinking that maybe this UrlRoutingModule thingy was intercepting the WCF RIA Service request coming from the Silverlight app transforming it into something that could no longer be mapped to the desired service. It took a while for me to put this together and Fiddler played a big role in helping me sort through this.

After doing a bunch of reading on MSDN to better understand both ASP.NET MVC and the UrlRoutingModule thingy I realized the key to solving this problem was the RouteCollection. I need to modify this to not route incoming requests for our WCF RIA Services. Doing this was pretty simple. The developer who MVC’d the app had checked a global.asax file. I found the following method in the class:

public static void RegisterRoutes(RouteCollection routes)
{
     routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
     routes.MapRoute("Default", "{controller}/{action}/{id}", new { controller = "Configuration", action = "Index", id = "" });
}

All I needed to do was add a route to ignore service calls. In my case, I keep all of the WCF RIA Services in a folder named Services, so I just wanted to ignore all calls to the Services folder. Here’s what I came up with:

public static void RegisterRoutes(RouteCollection routes)
{
     routes.IgnoreRoute("{Services}/{*pathInfo}");
     routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
     routes.MapRoute("Default", "{controller}/{action}/{id}", new { controller = "Configuration", action = "Index", id = "" });
}

F5 and voila! Problem solved! I know for a lot of you ASP.NET MVC veterans the answer to this problem was probably obvious. However as an ASP.NET MVC rookie I had to start digging into the guts of how ASP.NET MVC worked to solve this problem, which means I learned a whole lot about ASP.NET MVC, which is one of the main goals of Thor. So, in my mind at least, Thor is definitely on the right track.

 

adam azure, silverlight, tag, wcf ria services, windows azure , , ,

Hello Azure!

December 1st, 2009

Tonight I gave a talk on Azure to the Dubuque Iowa .NET User Group. The talk was an overview of Microsoft’s cloud platform with an emphasis on Azure. The demos show how to start developing with Azure, using Web and Worker Roles along with various storage mechanisms (i.e. tables, blobs, and queues).

 To run this code you’ll need the following installed on your machine:

Optionally, you want to also install the Azure Storage Explorer to make working with Azure storage on your local machine a bit easier.

You can download the slide deck and code here.

adam Community, azure, cloud computing, presentations, windows azure , , ,

What’s a Backstage Pass Without a Great Band?

November 19th, 2009

As you’re aware I’ve been working in conjuction with RBA Consulting and Microsoft to put together and event on December 8th entitled Backstage Pass: A Day in the Microsoft CLOUD. We’ve got some great speakers lined up, like Jack Calhoun, along with some great giveaways, including a Zune HD. However, I felt like something was missing. After all if this is a backstage pass event, shouldn’t there be band, a really great band? How about the biggest band in the world today! How about U2? That’s right U2!

I’m excited to announce that RBA Consulting is going to be giving away a pair of tickets to the U2 concert on June 27, 2010 at the TCF Bank Stadium on the University of Minnesota campus. These are field level tickets to what is going to be the biggest concert of the year.

If you want a shot at these highly sought after tickets you must be present at the event to win. Be sure to register here.
See you there!

adam azure, cloud computing ,

Note to Self - DSInit.exe

November 18th, 2009

{Every now and then I find that I have to do some kind of configuration magic to get my development environment working the way I want it to. I promptly forget it until I have to do it again 3-6 months later when I replace my machine. By then I have no idea what I did so I have to look it up again. The point of this “Note to Self” series is to remind me of exactly what I did so I don’t have to try to remember the name of some odd command line tool and the various parameters that go along with it.}

I don’t know how you have your development environment set up, but one of the things I don’t have installed is SQLExpress. I have SQL Server 2008 Developer Edition (I need some of the tools not included with the express version). I also don’t use a default instance, I use a named instance, just ‘cuz I’m picky. This is all well and fine, but it requires you to jump through an additional step if you want to use development storage when developing Azure applications on your local machine.

Enter DSInit.exe.

DSInit.exe is a command line utility that allows you to initialize the development storage environment on your location machine. By default, the storage wants to use an instance of SQLExpress on your machine named SQLExpress. DSInit allows you to work around this. The tool initializes the development store for usage by reserving http ports for the blog, table and queue services for the current user, and creating the database needed by the blob and queue services. Here’s the lowdown on how to use it:

Syntax
DSInit [/sqlinstance:<SQL server instance>][/forceCreate][/user:<Windows account>]

Options
sqlinstance: the name of the SQL Server instance on the local machine that should be used for development storage. Use “.” for unnamed instance

forceCreate: recreate the database event if it already exists.

user: user for whom ports art to be reserver. By default it is the current user.

DSInit.exe can be found in [install directory]:\Program Files\Windows Azure SDK\v1.0\bin\devstore

Hope this helps you (and me)!

adam azure, note to self ,