Windows Phone 8 Samples Update

WpDevCenter

The Windows Phone Developer team has updated / added new samples to help developers making great applications for Windows Phone. Each sample contains enough information for you to start learning a new feature or just get a idea for a new application. Open your Visual Studio and start downloading the samples. Here is the list of the last updated samples:

Source of the article Windows Phone Developer Blog.
All the Windows Phone samples can be found at http://code.msdn.microsoft.com/wpapps.

0  

New Windows Azure Benefits for MSDN Subscribers

AzureBenefits

Microsoft is presenting Windows 8.1 update at TechEd North America in New Orleans, LA and at the same time published information about Visual Studio 2013 and new benefits about Windows Azure for MSDN Subscribers.

Some highlights I want to share with you:

  • Microsoft is now charging Virtual Machines, Web and Worker roles, per-minute.
  • You will not be charged if your Virtual Machine is stopped. All your deployment state is preserved.

Monthly Windows Azure Credits and usage

After a first month with $200 credit for any MSDN subscriber, depending on your subscription level (Professional, Premium or Ultimate) you will get respectively $50, $100 or $150 to use for any Windows Azure service for dev/test purpose. And that’s the big point here. You are not anymore allowed to use your MSDN subscription to publish any Windows Azure service for production purpose. If you still want to be able to do so, you will need to refuse the new offer, sign into the account portal, and next to your Windows Azure MSDN subscription you will find the option to opt out of the conversion. Microsoft BizSpark Startups are not concerned by the dev/test purpose limitation. Get more information regarding the BizSpark program.

MSDN Rates for Windows Azure

On top of the new credit based account, MSDN subscribers will also benefit from lower rates for some services. A picture is more efficient that a long text, so here are the discounts you will be able to enjoy.

MsdnRates

MSDN Software

Another great thing coming with this announcement is that you are now allows to use your MSDN licenses on Windows Azure. In other words, you can publish a Virtual Machine with any software coming from your MSDN account. (except client OS)

0  

Send a web request to a Web Site periodically using Azure Mobile Services

Mobile Services

Today I’m facing a new challenge with IIS (Internet Information Service) of one of my Web Site on Windows Azure. As you probably know, after a few minutes of inactivity, IIS will go take a nap and will wake up at the next incoming request. It means after about 15 – 20 minutes, if your web site did not receive any incoming request it will pause itself. And the following request will take longer because the web server needs to start. It can be a problem for the guests visiting your web site or consuming your services. One solution is to use Windows Azure Mobile Services and more precisely the Scheduler feature.

Just to remind you, Azure Mobile Services is free, up to 10 services, using shared instances. So let’s use it!

Read more »

0  

Global Windows Azure Bootcamp – Mobile Services for Earthquakes

GWAB Mobile Services

Saturday April 27th, 2013 was the day of the Global Windows Azure Bootcamp (GWAB). With more than 90 locations all around the world, GWAB was THE world-wide event about Windows Azure. Thanks to @RobinDotNet I had the chance to give a 15 minute presentation on how I use Windows Azure Mobile Services in my application Earthquakes for Windows Phone. Today I’m going to share with you, on this blog, my presentation and at the same time, add some details and answer some questions I received after the talk.

Read more »

0  

Visual Studio 2012 Update 2 available

VS2012.2

Microsoft has released this morning Visual Studio 2012 Update 2 and Team Foundation Server 2012 Update 2. You should read the very interesting post from S. Somasegar about what’s new in this update. The development of this update was focused on five main points:

  • Agile planning
  • Quality enablement
    • Unit testing
    • UI testing
    • Microsoft Test Manager
    • Test Case Manager (Web Access)
  • Windows Store development
  • Line-Of-Business development
    • LightSwitch
    • SharePoint
    • Phone tools
  • General Developer Experience
    • Blend for Visual Studio 2012 supports Sketchflow, WPF and Silverlight
    • IDE, the Blue theme if VS 2010 is back.
    • Code map
    • Workflow designer
    • IntelliTrace
    • Performance and reliability

To learn more about the details of each improvement or features, please read the KB2797912. You will note the come back of the Blue theme of Visual Studio 2010, that was the top requested feature on the Visual Studio UserVoice. But, are you really going to use it? On my side, I’m using the plugin Visual Studio 2012 Color Theme Editor with the theme Dark with Light Editor. I’ll install the Update 2 of Team Foundation Server later today. Do not hesitate to send your feedbacks on Visual Studio UserVoice, Microsoft is using it a lot to improve their tools. It would be silly not using it. And of course, Microsoft Connect to report bugs.

Download:

Comments Off  

Microsoft BUILD Conference June 2013 in San Francisco

Build

Here we go again. Microsoft is announcing officially the next developer conference BUILD in San Francisco, CA (I’m glad to live in San Francisco :) ). This event seems to be the place were Microsoft is going to talk for the first time about the next version (or update) of Windows 8 and Windows Phone, codename “blue”. Regarding the logos on the main page of the event, the themes will be Windows, Windows Phone, Windows Azure, Internet Explorer, Office 365, Xbox and Visual Studio. I’m sure we will get some exciting news!

Reminder

As a reminder, the Microsoft PDC is an exceptional event that happen only for very important and major announcements, like Windows Azure a few years ago. The last one was in 2010. Whereas the Microsoft TechEd is the annual technical event for the IT Pros (and a little bit for developers) and the Microsoft BUILD is the annual conference for developers mainly.

Registration

The event will happen at the Moscone Center, from June 26th to June 28th and the registrations open on Tuesday April 2nd at 9am PDT. Register here: http://www.buildwindows.com. As usual, the 500 first to register will receive $500 off the registration fees.

Comments Off  

Get up to $2,000 with your Windows 8 and Windows Phone apps

Keep The Cash

Once again, Microsoft is helping developers to create new application for Windows 8 and Windows Phone. Today, it’s all about ca$h. From March 8th to June 30th 2013, you can get $100 for each new application you publish on the Windows Store or Windows Phone Store, up to 10 per store. Yes, it means you can get up to $2,000 just for building applications, then you’ll make money selling those apps and maybe monetize them using ads. Read this interesting article about how to choose your business model.
Link to the Keep The Cash contest.

Have a look again at the 50 free templates for Windows 8 applications and start building new apps today!

3  

Windows Azure – How to delete a Virtual Machine properly

Azure Virtual Machines
If like me you’re playing more and more with Windows Azure, you’ve probably faced some issues with the Windows Azure Manager. Sometimes the problem is that you can’t find easily how to do a task. The last one I’ve been exposed is that I couldn’t delete the hard drive (vhd) use by an old virtual machine. Because when you create a new Virtual Machine, you’re prompted for a storage, I was guessing that I will just have to go to the storage I’ve created to store my machine, then open the container vhds and simply delete the blob. Unfortunately, there is a lock on the file, even if there is no VM using it:

VHD Metadata

So when you try to delete this blob, you’ll get this error message in the portal:

VHD Delete Error

The reason is simple, the lock comes from the management portal. Here is the “good way” to delete a Virtual Machine and the associated resources.

  • First, delete the Virtual Machine by going to the list of Virtual Machines, select the one you want to delete, then click Delete.
  • Once the VM is deleted, go to Virtual Machines | DISKS you will notice that the vhd is still here but not attached to anything. That’s good because you can still create a new VM with the same hard drive later on. Vhd Disks
  • From this screen, and this one only, you can delete the disk. Select the disk and click DELETE in the list of actions at the bottom of the page. In the new menu, click Delete the associated VHD. Vhd Delete Disk
  • A Cloud Service has also been created with your Virtual Machine. It can be used when you have multiple machines for a single service. If you don’t use it, you can delete it.
  • If you don’t need the storage created for this Virtual Machine, you can also delete it.
  • You’re done, you have cleaned your Windows Azure from the Virtual Machine.
Comments Off  

Azure Mobile Services – Paging with REST APIs

Mobile Services
I would like to complete the code I’ve provided to call the REST APIs for Windows Azure Mobile Services in my two previous posts, Introduction to Windows Azure Mobile Services and Windows Azure Mobile Services – Update with REST APIs. Today, I’ve been facing a basic mistake I made for my application Earthquakes. You are more and more everyday to use this application, and I thank you for that :) . Each time a new user start the application, the app will register on Azure Mobile Services in order to update the Live Tile on the Phone (see the picture below). It means I store a list of URLs on Mobile Services, and I’ll contact these URLs to update the Live Tile on your phone.

Earthquakes Live Tiles
If you’ve read and use the source code I’ve provided you’ve probably noticed an issue. How do you retrieve a list of more than 50 entries in Mobile Services? You have two possibilities:

  • The first idea would be to increase the number of items you want to retrieve when you call the REST API. In order to do that you have to specify the parameter $top of the REST API. You can ask up to 1000 items in one call. But what’s going on if you have more than a thousand items in your base? You’ll simply never get them and it’s what happened to me. I was stuck with the 50 firsts items…
    URL format: https://<ServiceName>.azure-mobile.net/tables/<TableName>?$top=<Limit>
  • The other idea and probably the better in most of the cases, is to use paging. The paging capability allows you to retrieve your elements by lot, 50 at a time for example, until you have all of them. To do so, we will combine the attributes $top and $skip. Also, by using the attribute $inlinecount with the value allpages we will get the number of elements in the table at each call. It will help us to track if we need to perform more call to get more elements.
    URL format: https://<ServiceName>.azure-mobile.net/tables/<TableName>?$top=<Limit>&$skip<Skip>&$inlinecount=allpages

Let’s start coding with a class named RestResult that we will use to deserialize the elements including the number of elements in the table.

[DataContract]
public sealed class RestResult<T>
    where T : class
{
    [DataMember(Name = "results")]
    public T[] Results { get; set; }

    [DataMember(Name = "count")]
    public int Count { get; set; }
}

Now, we can update the function Get to retrieve an object RestResult<T> that will contain the list of elements we asked and the number of elements in the table.

public RestResult<T> Get<T>(string tableName, string filter = "", int skip = 0, int top = 50)
    where T : class
{
    if (!string.IsNullOrWhiteSpace(filter))
        filter = string.Concat("&$filter=", filter);

    Uri address = new Uri(string.Format("https://{0}.azure-mobile.net/tables/{1}?$inlinecount=allpages&$skip={2}&$top={3}{4}",
                                        ServiceName, tableName, skip, top, filter));

    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(address);

    request.Method = "GET";
    request.Headers = new WebHeaderCollection
                            {
                                {"X-ZUMO-APPLICATION", ApplicationId},
                                {"X-ZUMO-MASTER", MasterKey},
                            };

    RestResult<T> result;

    using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
    {
        Stream stream = response.GetResponseStream();

        result = stream.Deserialize<RestResult<T>>();
    }

    return result;
}

And to finish, here is the code that will retrieve all the elements of a table.

public IEnumerable<T> GetAll<T>(string tableName, string filter = "")
    where T : class
{
    List<T> result = new List<T>();
    bool needMore;

    do
    {
        var get = Get<T>(tableName, filter, result.Count);
        result.AddRange(get.Results);

        needMore = get.Count > result.Count;
    } while (needMore);

    return result;
}
Comments Off  

Monitoring the Cloud Services, Websites, Mobile Services and Virtual Machines

MonitorEndPoints

Windows Azure is evolving very fast. I don’t remember seen a Microsoft moving that fast. Scott Guthrie introduced a bunch of new features on his blog yesterday. Today, I’m going to focus only on the new capability to monitor an endpoint. Available for your Cloud Services, Websites, Mobile Services and Virtual Machines, you’ll able to understand how fast (or slow) are your services for your customers around the world.

Beware that the feature works only in Reserved Mode. So if you want to track your Websites or Mobile Services do not forget to switch them to Reserved Mode in the SCALE panel.

OnlyReservedMode

You can add up to two endpoints to monitor for each service and each endpoint can be monitored from 3 different locations from the following list.

  • Chicago, IL, USA
  • San Antonio, TX, USA
  • San Jose, CA, USA
  • Ashburn, VA, USA
  • Dublin, Ireland
  • Amsterdam, Netherland
  • Hong Kong
  • Singapore

Each location for each endpoint will bring you two more metrics to monitor in the MONITOR panel:
Select Metrics
I don’t have enough information on my own Virtual Machines so I’m using the picture posted by Scott Guthrie on his blog:
Result Monitoring

Comments Off