Καλώς ορίσατε στο dotNETZone.gr - Σύνδεση | Εγγραφή | Βοήθεια

Ιανουάριος 2010 - Δημοσιεύσεις


Windows Azure configuration files support an osVersion attribute where you can set which version of the Windows Azure OS should run your service.

This feature doesn’t make much sense at the moment as there is only one version WA-GUEST-OS-1.0_200912-01 but in the future it’s going to be very handy.

You can learn more about it here.

PK.

0 σχόλια
Δημοσίευση στην κατηγορία: ,


Recently at MSDN Forums there were people asking how they can detect if their web application is running on the cloud or locally (Dev Storage). Well besides the obvious part, if you have code inside a Web Role or a Worker Role Start() method, this only exists on a cloud template but what if you want to make that check somewhere else, for example inside a Page_Load method or inside a library (dll)?

If you’re trying to detect it on the “UI” level, let’s say Page_Load, you can simply check your headers. Request.Headers["Host"] will do the trick. If it’s “localhost” or whatever you like it to be to can be used to determine if it’s running local.

But how about a Library? Are there any alternatives?

Well, it’s not the most bullet proof method, but it served me well until now and I don’t think it’s going to stop working as it’s a fundamental architecture element of Windows Azure. There are specific Environment properties that are raising a SecurityException as you’re not allowed to read them. One of them is MachineName. So, if Environment.MachineName is raising an exception then you’re probably running on the cloud. As I said it’s not bullet proof because if an IT administrator applies a CAS that restricts specific properties, it can still raise an exception but you get my point. A combination of tricks can give you the desired result.

PK.

0 σχόλια
Δημοσίευση στην κατηγορία: , ,


You’re trying to create a queue on Windows Azure and you’re getting a “400 Bad Request” as an inner exception. Well, there are two possible scenarios:

1) The name of the queue is not valid. It has to be a valid DNS Name to be accepted by the service.

2) The service is down or something went wrong and you just have to re-try, so implementing a re-try logic in your service when initializing is not a bad idea. I might say it’s mandatory.

The naming rules

  • A queue name must start with a letter or number, and may contain only letters, numbers, and the dash (-) character.
  • The first and last letters in the queue name must be alphanumeric. The dash (-) character may not be the first or last letter.
  • All letters in a queue name must be lowercase.
  • A queue name must be from 3 through 63 characters long.

    More on that here.

  • Thank you,
    PK.

    0 σχόλια
    Δημοσίευση στην κατηγορία: ,


    Windows Azure training kit it the best starting point if you want to get involved in Azure development. It helps you understand the basics of Windows Azure, its components and the whereabouts of the service.

    December’s release includes some updates and samples from PDC 09 so don’t miss it.

    You can download the kit from here –> http://www.microsoft.com/downloads/details.aspx?FamilyID=413E88F8-5966-4A83-B309-53B7B77EDF78&displaylang=en

     

    PK.

    0 σχόλια
    Δημοσίευση στην κατηγορία:


    Happy new year everybody. I wish you all the best for 2010. Now that I’m back I’m going to continue posting on Windows Azure. I had some really good rest during holidays and I really enjoyed xmas this time. I hope you did too! Smile

    PK.

    0 σχόλια
    Δημοσίευση στην κατηγορία: