A recent project I worked on had an Azure Worker Role (background processing) and a Web Role (web sites). The worker processed custom job messages off of a queue on an interval basis and did the expected work for the message type - pretty standard. One day we were pushing out a change to the worker logic and started seeing extremely [...]
Imagine you are building an API which is “multi-tenant”: the domain name defines the tenant or customer name and should be passed as a route value to your API. An example would be http://customer1.mydomain.com/api/v1/users/1
. Customer 2 can use the same API, using http://customer2.mydomain.com/api/v1/users/1
. How would you solve routing based on a (sub)domain in your ASP.NET Web API projects?
Almost 2 years ago (wow, time flies), I’ve written a blog post on ASP.NET MVC Domain Routing
. Unfortunately, that solution does not work out-of-the-box with ASP.NET Web API. The good news is: it almost works out of the box.
The only thing required is adding one simple class:
1 public class HttpDomainRoute
2 : DomainRoute
4 public HttpDomainRoute(string domain, string url, RouteValueDictionary defaults)
5 : base(domain, url, defaults, HttpControllerRouteHandler.Instance)
9 public HttpDomainRoute(string domain, string url, object defaults)
10 : base(domain, url, new RouteValueDictionary(defaults), HttpControllerRouteHandler.Instance)
12 ...(Read whole news on source site)
When we set out to design the Calendar app for Windows 8, there was no shortage of directional possibilities. Given the long history of calendars in society, and the diversity of Windows customers, we asked ourselves: What are the essential attributes of a great calendaring experience and how can we bring them to life by using the uniquely rich capabilities of Windows 8?
At its heart, a great calendar should to do the following:
Show your life clearly.
You should have crystal clear visibility into what’s happening in your life – at home, at
work, and at school.
Make it easy to get around.
Moving back and forth in time should be quick and efficient. Opening events and appointments should feel natural.
Make it easy to add new items.
New things are always coming up in your life. A great calendar makes it easy to make new plans.
Keep you on time.
Well laid plans aren’t very useful if you show up late!
Be ready to do more
. As you get busier, scheduling gets more complicated. Calendar should gracefully handle your needs as they change.
...(Read whole news on source site)
In this, the third, post in my series "Windows 8: What I've learned," I'll share how the behavior of script loading and unloading in some Windows 8 Metro app templates require a different approach to using setTimeout for timers.
I recently had the opportunity to spend some more quality time with the Visual Studio 2012 release candidate, building a Windows 8 app for some of my teammates who focus on Windows Azure, Brian Hitney, Peter Laudati, and Jim O'Neil. You can see a screenshot of the app to the left.
One of the
really cool things that these guys have built on top of Windows Azure is the Rock Paper Azure Challenge
, an contest to see who can code the most effective online bot to play the game Rock, Paper, Scissors in the cloud. Cool prizes are available, from Best Buy gift cards, to Windows Phones to XBOXes and Kinects.
...(Read whole news on source site)
When a routed event is fired and the event travels up (bubbles) or down (tunnels) the logical and visual trees, corresponding event handlers will fire for any controls that have defined an event handler that matches the event. However, whether or not you have handlers defined, the event will continue to travel up (or down) [...]
This is a quick post that will compare Visual Studio and Expression Blend in regards to Windows Phone Controls customization.
You can either use Expression Blend or Visual Studio in order to customize the Style, ControlTemplate, VisualStates, add animations, etc and change the control appearance. Blend is used more by designers than developers. The reason for this is that it generates a lot of unnecessary code. That is why most developers use Blend only to get a copy of the default Style(default control template) and after that modify it in Visual Studio.
NOTE: This article assumes that you know
how to use these tools. If you are new to Windows Phone then you can download them for free here: Expression Blend
and Visual Studio
.Expression Blend Pros
It is very useful when you want to use a visual designer
you can style controls even without understanding of the Silverlight UI principles
you can see how your control will behave in different scenarios
it allows the implementation of complex Visual States animations
You can test/customize the VisualState animations and see what`s happening
you have full control over the Visual States and can see them in the States tab
It enables...(Read whole news on source site)
Just like with Facebook, sharing statuses on Twitter from Windows Phone app can be simply accomplished using ShareStatusTask launcher. A more complicated scenario is when you want to share a photo on Twitter. In order to do that, you first need to authenticate the user from your app to allow your app to communicate with Twitter and then to upload photos. This article will show you how to do the authentication part. Before doing the authentication, you need to make sure you register your app on: https://dev.twitter.com/apps
Login with your Twitter
account. Create a new application if you haven't already done so.
After that, you'll get Consumer Key and Consumer Secret keys that you'll use from your Windows Phone app. ...Read more
...(Read whole news on source site)
One of the things that we are putting into the new version of the RavenDB Website is some smarts about courses. We want to be able to figure out where a visitor is coming from, and show him relevant courses near him. This is a fairly standard feature, I guess. But I think we solved this in an interesting fashion. First, we had to figure out how to know where a visitor is coming from. This is done via geo location. There are plenty of geo location API, such as:
The problem is that a service like that
is limited to ~1000 queries per hour, and we didn’t want that. Other option include paid services, again, with either hard limits on the number of queries per hour or an open credit line. Neither option was very interesting to us. Instead, we thought we would try something out. Max Mind
is offering a database that can be used for geo location purposes. They have two options, a free database and a paid option. I took the free version for a spin. Here is the GoeLiteCity-Blocks information:
Note that we have repeated rows per location, which allows...(Read whole news on source site)
Visual Studio 2010 Web Publish Updates - Sayed Ibrahim Hashimi shares the details of the latest release of updates for Visual Studio 2010’s Web Publishing functionality which shipped as a part of the Windows Azure SDK, discussing the web publishing dialog, EF Code First Migrations support, publish profile and config transformations.
Planner | NDC2012 - [...]
If you follow my blog, you know that Sources of Insight is my blog dedicated to personal effectiveness
. It includes almost 900 articles on happiness
, personal development
, and more. Sources of Insight also features special guest stars, including best-selling authors
such as Al Ries of The 22 Immutable Laws of Branding, Dr. Rick Kirschner of Dealing with People You Can’t Stand, Gretchen Ruben of The Happiness Project, and Jim Kouzes of The Leadership Challenge. The goal of Sources of Insight is to empower