Weird bug/feature in Visual Studio 2010

As I was working with some of my demo code for the Azure posts I have been putting up lately, I came across a very odd thing. I had a solution with several projects that built and worked perfectly fine. I did however need to make some changes to the solution before zipping it up and putting it on my blog. So I made a copy of the solution folder, removed my source control bindings and everything else that shouldn’t be in the zip.

Before zipping it up, I thought I would just make sure it built ok after my changes, which it obviously should as I made no code changes. So I loaded the solution into Visual Studio and everything looked fine. But pressing Ctrl+Shift+B made Visual Studio cough and tell me that XXX was not available in namespace YYY, which is really odd as I had made no code changes.

More...

Using the Windows Azure Service Bus - Queuing

I guess it is time for another look at the Azure Service Bus. My previous posts about it has covered the basics, message relaying and relaying REST. So I guess it is time to step away from the relaying and look at the other way you can work with the service bus.

When I say “the other” way, it doesn’t mean that we are actually stepping away from relaying. All messages are still relayed via the bus, but in “the other” case, we utilize the man in the middle a bit more.

“The other” way means utilizing the message bus for “storage” as well. It means that we send  a message to the bus, let the bus store it for us until the service feels like picking it up and handling it.

There are several ways that this can be utilized, but in this post, I will focus on queuing.

More...

Using Azure Service Bus relaying for REST services

I am now about a week and a half into my latest Azure project, which so far has been a lot of fun and educational. But the funky thing is that I am still excited about working with the Service Bus, even though we are a week and a half into the project. I guess there is still another half week before my normal 2 week attentions span is up, but still!
So what is so cool about the bus, well, my last 2 posts covered some of it, but it is just so many cool possibilities that open up with it.
This post has very little to do with what I am currently working on, and to be honest, the sample is contrived and stupid, but it shows how we can use REST based services with the bus.

Windows 8 communication is not very Microsofty

A couple of weeks has gone by since Microsoft unveiled Windows 8 at the BUILD conference in Anaheim, and things are kind of back to normal. Except for the fact that Microsoft has gagged all of their normal information channels.

Apparently, Microsoft representatives are not allowed to talk about Windows 8 at all. And speakers at some conferences have been informed that they are not to talk about Windows 8 on stage. At least not their personal opinions. I assume that they are allowed to talk about the facts that were unveiled in Anaheim…

More...

Choosing technology for Windows development

I feel that the one thing that has been lacking here at Build is information about the fact that “old” windows application technologies are still there in Windows 8, and are just as much first class citizens as the new Metro style apps. They even have a lot on offer that the new apps don’t.

Microsoft promises that any application that runs on Windows 7 will also run on Windows 8. They are also saying, repeatedly but not loud enough, that the “old” technologies are still a very viable option for developing apps. You should not necessarily default to building a Metro style app when creating a new application. To be honest, in my world at least, I am very likely to lean towards another technology when starting a new project.

More...

Using ildasm and ilasm to fix the EPiServer Mobile Pack

Ok, so a couple of days ago (or something) EPiServer released a module called Mobile Pack. It is built to make it easy for companies to get their website up and running for mobile browsers, which is pretty cool.

It uses “Visitor Groups” and a browser criterion to redirect mobile users to a mobile version of the website. A solution which is actually quite simple, but it works well, and simple well working things are great. At least it works in theory. Unfortunately, in the real world the code doesn’t work…

More...

Have you seen Uri.GetComponents()?

If you haven’t, it is freaking brilliant! Well, at least very useful! And it has been around since .NET 2.0…

For some reason I keep ending up in situations where I need to get certain parts of a Url. In a lot of cases, I just want to extract the scheme and host name, eg http://chris.59north.com/, from a longer Url, and I don’t think I am alone. But if you Google it to find a good solution, you get a gazillion hits talking about how people have created this awesome method that takes the parts of the Url and uses string concatenation to build the result. Well, guess what…that sucks!

More...

WCF service clients for the complete n00b

Ok, so in my last post, I gave a brief introduction to WCF for the complete n00b. As a follow up to this, I would like to have a look at some different ways to consume these services.

The “normal” way to do it is obviously by adding a service reference to the project in VS, but there are alternatives that can make sense.

The samples I am going to use are specifically for Silverlight as they focus on simple bindings and features that Silverlight supports, but it can still be used for any .NET client.

More...

A WCF introduction for the complete n00b

Ok…So I am more of a general .NET and Silverlight developer, but it is hard to get around the fact that WCF infiltrates most of the projects I ever work on. And after having read a substantial part of Juval Löwy’s book about WCF, I have realized that there was a lot that I didn’t know and didn’t fully understand. Not that I am saying that I get it all now, but I have a better understanding at least.
The thing is that WCF isn’t really very hard in most cases, but having a basic understanding makes it a lot easier. And to be honest, the basics will take you a long way when working with Silverlight, since Silverlight doesn’t support a lot of the more advanced features. To be honest, the WCF support  in Silverlight is fairly basic, but it is enough…
So based on this, I thought I would try and write a down to earth and simple introduction to the main concepts in WCF.

WCF, Silverlight and T4…a good combination…

Ok, so this post is definitely going down in the books as “why would you do that” for a lot of people, but it actually has its benefits in some cases. What I want to show, is how we can work with WCF services and service interfaces without having to add a service reference to Visual Studio and instead auto generate the required code using T4 templates…

So why would I want to do that? Well, in some cases it is kind of tedious and even complicated to spin up the service just to be able to update the service reference and in some cases it isn’t even possible to get access to the WSDL that is required to create it. And in those cases, this will help you… In my case, the services and service contracts are built by one dev, and the Silverlight stuff by me. To us, this way of working makes it a lot easier to handle changes to the service contracts as we go along… I can get changes by just checking out the changed interfaces without having to try and get my solution into a state where I can update my service reference.

More...