Un paseo por las nubes

Un blog acerca de Cloud Computing...
Rebuilding SQL Database indexes using Azure Automation

Some days back I had a discussion with an Azure SQL Database engineer about the need of rebuilding indexes on SQL Database. I thought that was a best practice but the engineer told me that the task was accomplished automatically as part of the managed service, in the same way you haven’t had to execute any file related task.

I remembered the thing today and found two interesting articles from Alexandre Brisebois just confirming my initial thoughts, that the indexing management is under your responsibility, and you need to pay attention to how fragmented they are.

There are three good blog posts from Alexandre on the matter I found interesting:

Running the following T-SQL on a SQL Database, you can get the index fragmentation on a specific table in percent:

SELECT name, avg_fragmentation_in_percent

FROM sys.dm_db_index_physical_stats (


     , OBJECT_ID('MyTableName')

     , NULL

     , NULL

     , NULL) AS a

JOIN sys.indexes AS b

ON a.object_id = b.object_id AND a.index_id = b.index_id

If you want to get all the indexes in a database with more than a 30% of fragmentation, you can run this other one:

SELECT name, avg_fragmentation_in_percent

FROM sys.dm_db_index_physical_stats (


     , NULL

     , NULL

     , NULL

     , NULL) AS a

JOIN sys.indexes AS b

ON a.object_id = b.object_id AND a.index_id = b.index_id

WHERE avg_fragmentation_in_percent > 30


And now don’t be scared when seeing the results. The good news is that you are going to get better performance after rebuilding the indexes without having to scale to another SQL Database tier. Alexandre itself commented something about the possibility of using Azure Automation to do the task.

Reindexing using Azure Automation

I’m in love with Azure Automation and all the small things that can be automated to do our daily job easier, mostly based on running a small script on a schedule. Curiously there is a PowerShell Workflow Runbook on the Automation Gallery that allows to fully automate the SQL Database reindexing. Let’s see how to configure it step by step:

1) Provision an Automation Account if you don’t have any, by going to https://portal.azure.com and select New > Management > Automation Account


2) After creating the Automation Account, open the details and now click on Runbooks > Browse Gallery


3) Type on the search box the word “indexes” and the runbook “Indexes tables in an Azure database if they have a high fragmentation” appears:


4) Note that the author of the runbook is the SC Automation Product Team at Microsoft. Click on Import:


5) After importing the runbook, now let’s add the database credentials to the assets. Click on Assets > Credentials and then on “Add a credential…” button.


6) Set a Credential name (that will be used later on the runbook), the database user name and password:


7) Now click again on Runbooks and then select the “Update-SQLIndexRunbook” from the list, and click on the “Edit…” button. You will be able to see the PowerShell script that will be executed:


8) If you want to test the script, just click on the “Test Pane” button, and the test window opens. Introduce the required parameters and click on Start to execute the index rebuild. If any error occurs, the error is logged on the results window. Note that depending on the database and the other parameters, this can take a long time to complete:


9) Now go back to the editor, and click on the “Publish” button enable the runbook. If we click on “Start”, a window appears asking for the parameters. But as we want to schedule this task, we will click on the “Schedule” button instead:


10) Click on the Schedule link to create a new Schedule for the runbook. I have specified once a week, but that will depend on your workload and how your indexes increase their fragmentation over time. You will need to tweak the schedule based on your needs and by executing the initial queries between executions:


11) Now introduce the parameters and run settings:


NOTE: you can play with having different schedules with different settings, i.e. having a specific schedule for a specific table.

With that, you have finished. Remember to change the Logging settings as desired:




Un saludo y happy coding!

Azure Web Apps: Kudu REST API is a box of surprises

VitorinoxAfter working with Azure Websites Web Apps for a long time, I have noticed that every day I use some tips and tricks that surprise people in some way. Normally the tips are nothing spectacullar, but when you use them your daily productivity is enhanced. I’m going to start posting some of these tips in order to have my own “notebook” to revisit when needed, but also to share and make easier small tasks like working with files, website management, getting alerts, etc.

So let’s start with a simple tip:

How to download the website contents of a site hosted on Azure Web Apps

There are many ways to answer this question coming to my mind: FTP, MS Deploy, uploading 7zip command line tool via Kudu, ...but is there something more simple than that just for downloading the content?

Answer is YES.

Azure Web Apps ZIP API

After spending some time working with Azure Web Apps, you have probably noticed that “behind” your website, there is a lot of tools being served by the SCM (Service Control Manager, also known as Kudu).

You can direclty access this service by simply browsing the “https://mywebsite.scm.azurewebsites.net” URL, where “mywebsite” is your site name, and then introducing your Azure credentials (using an Azure AD or Microsoft Account). You can also use Basic Authentication by browsing “https://mywebsite.scm.azurewebsites.net/basicauth” and then introduce the deployment credentials you can get from your website settings at the Azure Management portal.

Kudu offers you an user interface full of tools to manage and diagnostic your web app:


And if you dig into the Kudu documentation, you will notice that some REST APIs come out-of-the-box. One of these REST APIs is the ZIP, that allows downloading folders as zip files or expanding zip files into folders:


Download website contents using a simple URL in your browser

Enough! With just introducing this URL in your browser and typing your credentials, you can download your full website contents:


If you want to download a subfolder of your website, you could use something like:


Note that you can download anything inside the “D:\home” folder where the “/api/zip” is relative, so if for example, you want to download all your site log files, including IIS log files, you can use the following URL:


NOTE: an equivalent one would be to use the “dump” API:


Adding some Azure PowerShell sauce

Is quite normal to download these log files to your PC and then run your favourite log parsing tool like Log Parser and Log Parser Studio. It’s easy to manually download them from Kudu but it’s not funny when you have to do the same task almost every day over some hundreds of websites.

So why not to use PowerShell to automate the task?

After installing Azure PowerShell, you can run the following script to download the files and folders using the Kudu ZIP REST API. You can tweak it a little by iterating between all your websites, and also iterating all your subscriptions, so you could download the IIS logs of all the websites you own just with some lines of code.

In the following script, I’ve changed the folder to download to a specific one where DNN Platform stores their Log4Net daily logs, that BTW, you can then review on-premises using Log4View.

NOTE: I used PowerShell 5.0 available on Windows 10, with “wget” and “Invoke-RestMethod” support what simplifies the script.

# Input parameters

$subscriptionName = "MySubscriptionName"

$websiteName = "MyWebsitename"

$slotName = "Production"

$folderToDownload = "site/wwwroot/Portals/_default/logs/" # must end with / for folders or you will get a 401

$outputZipFile = "D:\Temp\LogFiles.zip"


# Ask for Azure credentials to obtain the publishing credentials


Select-AzureSubscription $subscriptionName


# Build the basic authentication header

$website = Get-AzureWebsite $websiteName -Slot $slotName

$publishingUsername = $website.PublishingUsername

$publishingPassword = $website.PublishingPassword

$base64AuthInfo = [System.Convert]::ToBase64String( `

                    [System.Text.Encoding]::ASCII.GetBytes(( `

                    "{0}:{1}" -f $publishingUsername, $publishingPassword)))


# Download the log files using wget or Invoke-RestMethod, available in Windows Powershell 5.0 :)

Invoke-RestMethod -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} `

                  -Uri "https://$websiteName.scm.azurewebsites.net/api/zip/$folderToDownload" `

                  -OutFile $outputZipFile


And don’t forget other Kudu APIs available!

I have some other tips I use in a daily basis I will be posting soon. Don’t forget to take a look to other APIs available, because they are a box of surprises:

  • api/vfs: allows you to execute files and folder operations
  • api/command: allows you to execute something (one of my favourites when combined with the previous one)
  • api/settings: allows you to change the site settings
  • api/dump, api/diagnostics, api/logs: for diagnostics, tracing, etc.
  • api/scm, api/deployments, api/sshkey: for repository and deployment management;
  • api/siteextensions: enable or diable other site extensions like Visual Studio Monaco. The available extensions grow in a monthly basis, don’t forget to revisit from time to time

Un saludo and Happy Coding!

Próximos eventos TenerifeDev

Después de un Agosto sofocante y aún con la resaca de la Tenerife LAN Party, ya estamos de vuelta! Y esta vez vamos a programar los eventos de los próximos cuatro meses en un flash, donde hablaremos de todo un poco: Xamarin, Machine Learning, Windows 10 IoT Core, Raspberry Pi, y hasta una sesión que nos pareció la mar de interesante dedicada íntegramente al personal branding.

¿Cuándo? ¿Dónde?

A continuación mostramos la lista de eventos y sus fechas, que en principio se desarrollarán en el Salón de Grados de la ETSII como viene siendo habitual. Lo más recomendable es que os registréis en http://www.meetup.com/es/tenerifedev/ para estar al tanto de cualquier modificación y del contenido de cada sesión:

  • Jueves 17 de septiembre de 18:00 a 19:30 - Xamarin Forms
  • Jueves 15 de octubre de 18:00 a 19:30 - Machine Learning
  • Jueves 19 de Noviembre de 18:00 a 19:30 - Automatizando la oficina con Raspberry Pi, Windows 10 y Azure
  • Jueves 17 de diciembre de 18:00 a 19:30 - Personal branding: Por qué y cómo convertirnos en marca

¡Corred insensatos!

Posted: 9/9/2015 16:42 por David Rodríguez | con no comments
Archivado en:
[TenerifeDev] Se acerca TLP Innova con muchas novedades

LogoTenerifeDevQueda una semana para que comience TLP Innova, el espacio dedicado a la innovación tecnológica donde profesionales y estudiantes podremos compartir conocimientos y novedades en forma de charlas técnicas y talleres y así mejorar nuestras capacidades y poder aplicarlas a nuestro entorno laboral o de investigación.

Como ya os hemos adelantado, TenerifeDev participa este año más activamente que nunca colaborando para que Microsoft esté presente, con dos miembros del equipo de Microsoft DX que os informarán de todo lo que necesitéis y que además estarán apoyando a los ponentes que hablaremos sobre sus tecnologías, ahora más abiertas que nunca ya que .NET se ha declarado Open Source al igual que otros proyectos.

En cuanto a nuestra agenda, tendremos la oportunidad de contar con sesiones y talleres técnicos muy variados y de los que podréis sacar mucha experiencia y conocimiento y que serán impartidos por algunos de los profesionales más reconocidos en el territorio nacional e incluso algunos de talla internacional como Bruno Capuano, Alberto Díaz y Josué Yeray, todos MVP de Microsoft, Alejandro Campos Magencio miembro de Microsoft DX y otros ponentes de renombre a nivel nacional como Javier Suárez Ruiz y Santiago Porras también MVP de Microsoft, Vanessa Estorach fundadora de e-Growing, César Abreu y Javi Medina Azure Advisors.




11:00 – 14:00 | Taller: Microsoft Azure, la nube más potente al alcance de todos


10:00 – 13:00 | Taller: Xamarin.Forms, un código para unirlos a todos!

16:00 – 19:00 | Taller: Desarrolla para todos los dispositivos Microsoft con Windows 10



Este año viene cargado de sesiones que pueden tener interés para Startups y Apps multiplataforma, además de que en pocos días será el lanzamiento oficial de Windows 10 que viene con más novedades que nunca y sobre todo, abierto a nuevas plataformas como Xbox para las que se podrá desarrollar con aplicaciones universales. Este año, por encima de cualquier otro os interesará lo que podamos contaros.

Ni qué decir, que necesitamos que nos ayudes a correr la voz, así que si conoces a alguien interesado en asistir, no dudes en contárselo.

TLP-Innova 2015: las sesiones de TenerifeDev que no te puedes perder

highres_435020085Como todos sabéis, la Tenerife LAN Party 2015 está a la vuelta de la esquina. En menos de dos semanas, del 14 al 19 de Julio, podremos comenzar a disfrutar en el Recinto Ferial de Santa Cruz de Tenerife de uno de los mayores eventos en España relacionados con los eSports por no decir nada de cómo ha ido creciendo año tras año la sección Summer-Con.

Otra de las áreas que también ha ido creciendo es el área profesional denominada TLP-Innova, que desde la edición anterior se celebra en el Auditorio de Tenerife Adán Martín, a pocos metros de la TLP ofreciendo un ambiente algo más formal y facilitando el desplazamiento de los asistentes entre uno y otro evento.

highres_435020106 highres_435020071

TenerifeDev, desde que comenzó su andadura hace 5 años atrás, no ha querido perderse este evento participando con charlas y talleres relacionados con tecnologías Microsoft, y este año nos hemos estado dejando la piel para poder ofrecer las mejores sesiones y talleres de la mano de los mejores cracks del mundillo. Por cierto, no te pierdas la entrevista a Santiago Porras para Conéctate al Día que tuvo lugar el pasado viernes 26 de junio (el programa completo lo podréis escuchar aquí).

Microsoft is in da house! Everybody is in da house!

¿Qué sesiones y talleres? Si bien a través de la propia web de la TLP podréis acceder a una agenda que ahora mismo está en construcción, desde YA podéis ver en https://tlpinnova.eventday.com/ las sesiones que os estamos preparando desde TenerifeDev para el viernes 17 de Julio. Atentos a los talleres, actualización en breve para indicar el día, lugar y hora.

highres_435020069 highres_435020089

Dentro de estas sesiones podréis ver la cantidad de cracks que tenemos este año en cartel: Bruno Capuano, Josue Yeray Julián Ferreiro, Javier Suárez, Alberto Díaz, Santiago Porras, César Abreu, Javi Medina, Vanessa Estorach, Andreas Wendl, …y además, contamos con la presencia de su majestad don Alejandro Campos Magencio de Microsoft, con el que también pasamos un buen rato en el pasado Web & Cloud tour hace unos meses.

Y aparte de pasar un buen rato con los ponentes (aquí más de uno parece sacado del club de la comedia), pues qué mejor si además se va a hablar de temas tan variados, desde desarrollo de aplicaciones multiplataforma hasta los entresijos del Machine Learning y el Proyecto Oxford (sí, eso que usaste en https://how-old.net/ para vacilar a sobre la edad que aparentabas tener por una foto), sin dejar atrás temas de actualidad como monetización, engagement y el despliegue de servicios en Azure. Incluso hay alguna sesión para los más geeks como el despliegue de un servidor de Minecraft en la nube o cómo montar la web de una guild. Aunque para geek, la sesión de Coding4Fun de Bruno Capuano con la que todos acabaréis encantados.


Importante: ¡¡regístrate!!

El tema importante: regístrate para el evento en este enlace:


Simplemente tenéis que pulsar el botón de la página principal y rellenar los campos solicitados. Esto nos facilitará la gestión de este y próximos eventos.


Por supuesto muchas gracias a los sponsors de estas sesiones, sin los que no sería posible el desarrollo de las mismas. Colaboran:


Encamina_250  intelequia  LogoDevsDNA


[Released] DNN Azure Active Directory provider

DNNADHi all! Since long time ago I was trying to implement an Azure Active Directory provider for DNN Platform, and you know what? This weekend I got time for it, mostly because a pull request brought to my attention a change on the platform (thanks to Evan Smith for it! https://github.com/dnnsoftware/Dnn.Platform/pull/250).

So after spending some time coding and configuring the applications on Azure, I have built the first release of a DNN Azure Authentication provider that I have made available at Github.

Download and Code:


Here all the configuration and installation steps at glance.

DNN Azure Active Directory provider

The DNN Azure Active Directory Provider is an Authentication provider for DNN Platform that uses Azure Active Directory OAuth2 authentication to authenticate users.

alt text

alt text

alt text


Installation and configuration guide

The installation and configuration guide has two parts: one referred to the Azure Active Directory setup; and a second one where we install the authorization provider on our DNN deployment and setup the AD parameters we created before.

Following the guide before, you will give access to all your Azure AD users to register and sign-in into your DNN application. You can go later and harden your security settings like only allow to access the DNN Web Application to certain users on the Azure Management portal. Also note that depending on you have "Public" or "Private" user account registration on your DNN portal, you will need to approve the registered user before allowing him to access the site.

Azure Active Directory setup
  1. Go to https://manage.windowsazure.com to setup the required applications on your Azure Active Directory. You need to use the user credentials of an user having at least "Service Admin" role.
  2. From the Azure Active Directory list, select the Directory you are going to setup
  3. Select the applications tab to create the two needed applications. On the scenario we are going to deploy we have a client application (the DNN web application) that will make requests to a Web API (the "resource" on the OAuth webflow). First of all we will setup the Web API app with permissions to read the AD, and then setup the second DNN Web app that has permissions to access the first app.
    1. Click on "Add" button from the bottom bar to start the application setup wizard
    2. Click on "Add an application my organization is developing"
    3. Set the "name" of your Web API application. This can be any name you want and is simply how you will identify the application in your Azure Active Directory (i.e. "My Contoso WebAPI").
    4. Set the type of application to "Web application and/or Web API" (notice that Web Applications and Web API’s are considered the same type of application as far as Azure AD is concerned), and click Next.
    5. Set the "Sign-on URL". This is the URL where users will access your application. There is no verification of this URL so even if the application hasn’t been developed yet the portal will still let you add it. (i.e. "https://mycontoso.com/login")
    6. Set the "App Id URI". Notice this is a URI and not a URL. This is what Azure AD will use to identify your application when authentication users requesting access to it. It can be practically anything you want as long as it is unique in your directory and a valid URI. (i.e. "https://mycontoso.com/mywebapi"). Click Finish to create the application.
    7. Ensure that on the "Configure" tab, under the "permissions to other applications", at least "Windows Azure Active Directory>Delegated Permissions>Enable sign-on and read users' profiles" is checked.
  4. Now create the DNN Client Web App on Active Directory following the next steps:
    1. Again, from the "Applications" tab, click on "Add" button at the bottom bar to start the application setup wizard
    2. Click on "Add an application my organization is developing"
    3. Set the "name" of your Web API application. (i.e. "My Contoso Web App")
    4. Set the "Sign-on URL". (i.e. "https://mycontoso.com/login")
    5. Set the "App Id URI". (i.e. "https://mycontoso.com/mywebapp"). Click Finish to create the application.
    6. Now on the "Configure" tab, under the "keys" section, create a new key with the desired expiration (currently 1 or 2 years). Click on Save and then copy the key to a secure location. IMPORTANT: you won't be able to copy this key later, so copy it now or generate a new one when needed.
    7. Under the "single sign-on" section, fill the "Reply URL" textbox with the REAL and valid URL you are using in your DNN portal. Note that you can specify more than one if you have different login pages. (i.e. https://azuread.dnndev.me/Login)
    8. Now let's go and give permissions to the DNN Client Web App to access the Web API application we created before:
    9. Under the "permissions to other applications", click on the "Add Application" button
    10. On the "Show" dropdown list, select "All Apps" and then type on the "Starting with" textbox the name you specified when creating the Web API application (i.e. "My Contoso WebAPI"), and click on the search button
    11. Select the "My Contoso WebAPI" from the list below by clicking on the "+" icon and then click on the Finish button
    12. On the "My Contoso WebAPI" permissions row, check "Access MyContosoWebAPI" from the delegated permissions dropdown list.
    13. Click Save to finish.
DNN provider installation and configuration

It's important to remember that you need a DNN deployment with version 7.4.1 or later to continue.

  1. Download the DNN Azure AD provider from the Releases folder (i.e. AzureADProvider_01.00.00_Install.resources)https://github.com/davidjrh/dnn.azureadprovider/tree/master/Releases
  2. Login into your DNN Platform website as a host user and install the provider from the "Host > Extensions" page
  3. Use the "Install Extension Wizard" to upload and install the file you downloaded on step 1. Once installed, you will see the auth provider listed under the "Authentication Systems" section.
  4. To setup the Azure AD provider for the current portal, go to "Admin > Extensions", and under the "Authentication Systems" click on the "Edit" module. A popup dialog opens to specify all the needed parameters:
    1. Go to the Azure Management portal, and selecting the My Contoso Web App, click on the "View Endpoints" on the bottom bar to view the app endpoints.alt text alt text
    2. TokenEndpoint: copy and paste the "OAuth 2.0 Token Endpoint"
    3. AuthorizationEndpoint: copy and paste the "OAuth 2.0 Authorization Endpoint"
    4. GraphEndpoint: copy and paste the "Windows Azure AD Graph API Endpoint" (this is not in use yet on this version, but will be used on new provider versions)
  5. Now fill the other fields:
    1. APIKey: from the DNN Web Application you created on Azure, copy and paste the Client ID field that s under the "Configuration" section
    2. APISecret: from the same DNN Web Application, copy and paste the key secret that you wrote down on a secure place. If you didn't, you can generate another one, remember that are only shown once
    3. AppIdUri: copy and paste your WebAPI App ID Uri (IMPORTANT: this is not the WebApp ID Uri, is the WebAPI ID Uri you created before. On this example, ishttps://mycontoso.com/mywebapi). It's the unique parameter you need to specify from the first WebAPI you created, all the other ones are from the DNN Web App application.
    4. Enable: check to enable the provider

alt text


Global Azure Bootcamp: el evento que no debes perderte


Falta ya menos de una semana para el Global Azure Bootcamp 2015, el mayor evento global organizado por miembros de la comunidad: MVPs, Insiders, geeks y demás adictos al autoescalado y al Big Data. Se trata de la tercera edición de un evento que no hace más que crecer en cifras edición tras edición, con algunas que son para dejar la boca abierta, como los 27.000 servidores que se crearon en un solo día para participar en una investigación colaborativa para la detección temprana de la diabetes Tipo 2.

¿Cómo es el formato de este evento?

El evento se desarrollará durante el sábado 25 de Abril de 2015, en 190 localizaciones alrededor del globo. Desde hace algunos meses, el que tuviera ganas de participar en este evento global simplemente tenía que proponer su localización para montar una “sede” del evento, cumpliendo con algunos requerimientos mínimos para asegurar el éxito del evento: una sala acondicionada para la ocasión, agua, etc.

Como se puede observar en el mapa inferior, el evento al final tendrá una duración real de más de 24h al cubrir casi todos los usos horarios del planeta.


Luego el formato dentro de cada localización podría adaptarse según la capacidad o intereses de los asistentes, yendo desde charlas técnicas a hands-on labs, pero sobretodo sintiendo que se forma parte de un evento global a través de un “Global Lab” en el que todos los asistentes de todas las ubicaciones participan a la vez, sacando a relucir lo que es capaz de ofrecer una plataforma de nube pública como Azure y obtener todo su jugo.

El Global Lab como eje central del evento

En el año 2013, en la primera edición del evento, este lab global consistía en el procesamiento y renderizado de imágenes a través de una super-granja de servidores: cada participante podía desplegar un Azure Cloud Service que descargaba los datos a procesar y una vez generada la imagen resultante la almacenaba en una ubicación temporal; otro proceso finalmente se encargaba de unir cada una de las imágenes para componer la película final.

El resultado en números fue espectacular: sobre 9.000 servidores desplegados en diversos centros de datos de Azure durante el mismo día, procesando alrededor de 725K imágenes, lo que casi viene a ser como generar una película de animación en tiempo real. 


Si bien el resultado dejó bien claro la capacidad de la plataforma de Azure con esta prueba de concepto, en la edición de 2014 se quiso llegar algo más lejos y no desaprovechar la capacidad de procesamiento desplegada durante ese día, así que se optó por buscar algún campo de investigación real y que beneficiara finalmente a toda la humanidad.

Después de un proceso de selección entre varias investigaciones en curso alrededor del planeta, se llegó a la conclusión que una de las más interesantes era la investigación que estaba haciendo un Instituto de Investigación de California para la detección temprana de la diabetes Tipo 2. Los resultados de este trabajo no sólo ayudarían a entender el estado de la diabetes en humanos a nivel molecular sino que también redundarían en su detección en estados iniciales. Para más información sobre este lab, visita este enlace.


El resultado de ese día: más de 27.000 servidores desplegados alrededor de 136 localizaciones a nivel global, procesando datos en un sólo día que equivalían a 3 años. Todo un avance del que todos pudimos salir orgullosos de haber puesto nuestro granito de arena en este esfuerzo titánico.

El Lab Global de 2015: dos por uno

Si bien esta participación en el lab global de ediciones anteriores, daba esa sensación de la globalidad e importancia del evento, en esta edición de 2015, se ha querido incrementar esa sensación de pertenencia al planeta Tierra escalando el número de labs globales a dos!

De este modo los asistentes al evento podrán participar, además de las otras actividades llevadas a cabo en cada sede (ver más abajo), en dos labs:


  • Science Lab: de una forma muy similar al que se llevó a cabo en la edición anterior, se desarrollará una investigación global alrededor del cáncer de mama. Los asistentes al evento podrán desplegar máquinas virtuales en Azure para ayudar a analizar los datos necesarios para esta investigación, ayudando a conocer cómo la respuesta de la enfermedad es alterada basándose en las moléculas presentes en las células afectadas por el cáncer. Los resultados de este trabajo podrían llevar a nuevas terapias para atacar directamente diversas formas de cáncer con el mínimo de efectos colaterales. Puedes encontrar más detalles científicos sobre esta investigación en la web global del evento. 
  • Racing Game Lab: el segundo de estos labs, y para añadir algo de diversión una vez que hemos echado a andar nuestros “minions” en el Science Lab, es sobre la participación activa en un juego de carreras en el que podrás poner a prueba tanto tus habilidades al volante como las de programación, ya que no sólo podrás divertirte consiguiendo logros como la vuelta rápida para tu país o picándote a entrar en el podio global, sino que también aprenderás cómo está implementado este juego en Azure explotando en tiempo real los datos de tiempos y telemetría de cada uno de los participantes. De hecho, se anima a que a cada 4 horas, todos participemos a la vez en el denominado “Hammer Time!”, para estresar y poner a prueba la capacidad de Azure con 10.000 jugadores a la vez alrededor del globo.

IMPORTANTE: Recuerda que si quieres participar en estos labs tienes que tener habilitada tu propia suscripción de Azure. Tienes disponible una prueba gratuita de 30 días que tiene 150€ de crédito que es ideal para el día del evento. Aunque no es obligatorio, llevar pre-instalado Visual Studio facilitará las tareas la parte de desarrollo del hands-on lab del Racing Game. Siempre quedará el Notepad.exe para los más valientes.

Crear prueba gratuita de Azure  de 30 días

Lo que te vas a encontrar en Madrid

Debido al rotundo éxito de la edición anterior, este año hemos tenido la cosa complicada para componer la agenda de entre más de 50 sesiones propuestas.

Finalmente, contaremos con 2 tracks (uno orientado a Dev y otro a IT) con 7 sesiones cada uno, más el tercer track sobre los Global Lab. En la preparación del desarrollo han participado de un modo u otro más de 30 profesionales del sector. Creo que en ninguna otra parte del globo se juntarán más de 20 MVPs con los que podrás aprender los últimos detalles de la plataforma Azure: Machine Learning, App Service, y mucho más!

Global Azure Bootcamp Madrid 2014

Ah! Y regalos para todos los asistentes!!!

Por supuesto, todo esto no sería posible sin la inestimable ayuda de nuestros patrocinadores, a los que agradecemos todo su esfuerzo e implicación en que este tipo de eventos, que recordemos que está siendo organizado por la comunidad, salga adelante.


Así que ya sabes, si aún no te has registrado al evento, no puedes dejar pasar esta oportunidad. Va a ser algo grande, muy grande, y queremos que formes parte.

Registro Global Azure Bootcamp 2015 – Madrid

P.D. ¿No he hablado de minions aún? ¡Pues te vas a hartar! Sonrisa

El Web & Cloud Tour pasa por Tenerife


¡Muy buenas! ¿Sabías que Microsoft está preparando para finales de este mes de marzo una gira por toda España visitando varias comunidades técnicas en un evento de día completo? Un evento donde tendrás la posibilidad de conocer de primera mano las últimas novedades en desarrollo Web y Cloud de Microsoft. Aprenderás a desarrollar sitios web modernos, interactivos y rápidos con ASP.NET y Webtools de Visual Studio 2013 para después desplegarlos e implementarlos con Microsoft Azure. Descubrirás las nuevas características y los servicios que incluye como Microsoft Azure Virtual Machines, Websites y Visual Studio 2013 para construir y mover una gran variedad de aplicaciones al Cloud.

¡Esta jornada es un buen lugar para empezar a construir tu proyecto!


En Tenerife, el evento será el miércoles 25 de marzo, tanto por la mañana como por la tarde. ¡Ojo, si quieres asistir a mañana y tarde debes registrarte a ambos eventos!


En el caso de Tenerife, el evento se desarrollará en el Aula Magna de la Facultad de Física de la Universidad de La Laguna


¿Qué es lo que voy a aprender?

Este evento se compone de uno de mañana, relacionado a todo sobre la nube, y otro de tarde donde nos centraremos en el desarrollo web.

Horario - Sesión Cloud

09:00 - 09:30 - Registro

09:30 - 10:30 - Introducción a Microsoft Azure

10:30 - 11:30 - Soluciones PaaS con servicios en el Cloud y Azure WebSites

11:30 - 12:00 - Descanso

12:00 - 13:00 - Datos, SQL Azure y Azure Storage

13:00 - 14:00 - Gestión masiva de datos en la era IoT

Horario - Sesión Web

15:00 - 16:00 - Introducción a ASP.NET y Visual Studio Web Tooling

16:00 - 17:00 - Construyendo aplicaciones web con ASP.NET MVC

17:00 - 17:30 - Descanso

17:30 - 18:30 - Creación de API REST con WebAPI

18:30 - 19:30 - Aplicaciones en tiempo real con SignalR


¡Qué levante la mano quien quiera ir!


Using the Azure Websites Migration Assistant to migrate a DNN website

Last October the Azure Websites team released a new tool to run the migration of local websites to Azure in a super-super-easy way: just following an assistant that analyzes and migrates your website to the cloud, including local database dependencies, all in a few clicks.

Using Apurva’s words:

Now you can easily migrate to Azure Websites from your existing websites that run on Internet Information Service (IIS) 6 or later. Azure Websites Migration Assistant can analyze your IIS server installation, identify which sites can be migrated to Azure Websites, highlight any elements that cannot be migrated or are unsupported on the platform, and then migrate your websites and associated databases to Azure with just a few clicks.

So what came immediately to my mind was if the assistant would work correctly when trying to migrate a DNN website to Azure and how would be the experience. Two months later, finally I got time to run a test, and has been amazing!!

Let’s summarize the steps to follow in the case you want to move your website as well. Check the Tips and Tricks section before running the assistant for lessons learned, so perhaps you can avoid to fall into some known errors. Note that this tool is also open source and the code is available at CodePlex, so fixes and improvements are welcome!


Moving your DNN site to the cloud in 3 steps

To start the process, you will need to browse https://www.movemetothecloud.net and follow the instructions. The migration process has 3 steps:

1. Install the Migration Assistant tool (available at https://www.movemetothecloud.net/)

2. Run the readiness assessment

3. Migrate your site(s) (hey! You can move more than one site at time!)

The website I used for this test was a DNN Platform 7.3.4 default installation. Before starting the assistant I double checked that the site was working fine (see tips and tricks section to save time on known issues).


So after downloading the assistant the first screen appears to ask for the onpremise IIS server hosting the website to migrate. Since mine was my own laptop, I used the default option:


So after clicking next, the assistant contacts the IIS server and looks for possible candidates to migrate. I selected only the website I wanted to migrate unchecking all the others. You need to do it one by one, no unselect all option, but remember that you can contribute to the project!


The next step shows a readiness report where the verification results are shown. My report was not showing anything scary so I simply continued with the following step by clicking on the Upload button.


And now started the cool part, because all the website provisioning, SQL Database server, database, etc. it’s automatically created during by the assistant just by clicking some buttons. This remembered me the DNN Azure Accelerator project that does the same but deploying on Azure by using the Cloud Services flavor.


So when clicking on the “Begin Migration” button, the Azure AAD/Micosoft Account login page was shown to introduce my Azure subscription credentials:


After signing in, I selected the subscription I wanted to use and the datacenter location. I’m not sure if there is a bug on the tool or the datacenter location is not fully populated with all the options, but I could only deploy on Central US, no other option appeared. As this was a migration test was OK for me, but I would need to revisit this in the future when migrating other websites so I can choose the desired datacenter location.


In the next step you can select the SQL Server settings, so can choose between an existent one or just create a new one what is the default option. I also left the database name setting as default as well, but I manually set the website name to avoid portal alias issues after deploying on Azure (check Tip #2 under the Tips and Tricks section at the end of the post).


By clicking on the Customize settings link, you can also choose the website mode, the worker size, the web hosting plan (server farm) as well as the database edition. You can just use the defaults, but by my experience I would recommend at least a S1 database edition for performance reasons.


After clicking on the Create Website button, the migration process started by provisioning the needed resources, all smooth:


So once created, we start with the publish process by clicking on the Begin Publish button in order to start the website content upload as well as the database migration. By the logs being shown in this process and without confirming seeing the code at CodePlex, I suspect that this process is executed on two parallel threads, one uploading the content via webdeploy and the second by exporting/importing a .bacpac. It’s interesting because I’m very familiar running this type of migrations using just the same technique (note for myself: satisfy my curiosity spending a while reviewing the code at CodePlex).

Depending on the size of your site and the available bandwidth, this can take a long time. It is just a good moment for taking that cup of coffee.


And just after the long wait, the site apparently finished without issues!


Browsing the Azure Website for the first time brought the website fully migrated to Azure. The assistant did the corresponding modifications in the web.config to target the new database (curiously, the change was done directly on the web.config file and not using the website connection string settings).


Who wants more?


Tips and tricks

Tip #1: check your local database for SQL Database incompatibilities

The wizard runs really smooth and it’s awesome to see it working just by specifying some settings, but be aware that the assistant has its limitations and probably does not analyze all what your website needs. The list of elements verified during the analysis are listed at http://azure.microsoft.com/en-us/documentation/articles/web-sites-migration-from-iis-server and while the checks done are awesome, seems that is not running any check on the database, so when I tried to migrate a website that I knew that had SQL Database incompatibility issues, the problem arose very late, just when all the website was migrated and the data was being inserted (this was after an hour of data transfer).

NOTE: SQL Database Update V12 (Preview) has been announced which provides nearly complete compatibility with the Microsoft SQL Server engine, so the mentioned below does not apply by the time you are reading this post.


After a few minutes more the process stopped and gave a full error report, but no helpful info on the error or how to solve it.


So before running the Azure Websites Migration assistant, if you are going to move a website that has a database dependency like DNN, I strongly recommend to you to verify that the database is SQL Database compatible. There are several ways to accomplish that objective, here some suggestions:

1) Use the SSMS database migration wizard targeting a SQL Database as destination. I believe a similar process is used under the covers (export/import a .bacpac), so the same errors appears without having to wait for the last step

2) Use the always free SQL Azure Migration wizard available at CodePlex (https://sqlazuremw.codeplex.com/)

3) Use RedGate’s SQL Compare, my favorite! Check here for a free trial (http://www.red-gate.com/products/sql-development/sql-compare/)

Tip #2: Adding a cloud portal alias before the migration

After migrating your DNN website to Azure you can get a 404 error if you have more than one portal in your local install or you have set the “Add Automatic Portal Alias” to false. I have wrote more info about the issue at https://serverfault.com/questions/655441/iis-website-works-on-only-one-port-in-localhost-settings/657915#657915

To avoid the issue, just add a portal alias BEFORE running the migration wizard, so it’s already configured when migrated to the cloud. If you are going to use a website name “MyDNNWebsite” on the wizard, just add the portal alias “MyDNNWebsite.azurewebsites.net”



Other problems can arise, but I have to say that for DNN projects the assistant works like a charm. Congratulations to the Azure Websites team for this jewel, I’m excited with the promised improvements coming in the future.

Hope this helps!

Redis Caching Provider for DNN Platform

redis-300dpiTwo months ago I promised a gift for the friends at the DNNCon, a new open sourced DNN caching provider based on Redis. Today, I’m pleased to announce that I have implemented a first version of the provider and tested it on both on-premise and Azure environments.

This caching provider allows you to use a Redis cache server/cluster within DNN Platform, using a hybrid in-memory approach to increase cache performance (items are cached in the local memory and on Redis cache), and the publisher/subscriber feature to keep in sync all the in-memory caches from the webfarm. You must use Redis 2.8.17 or higher for an on-premises deployment. The caching provider is also Azure Redis cache compatible.

If you want to contribute to the caching provider, just go to https://github.com/davidjrh/dnn.rediscachingprovider and clone the repository.


Quick Start

  1. Provision a Redis cache to be used by your DNN instance. Perhaps one of the fastest ways to do it is to provision an Azure Redis cache by following the steps described at http://msdn.microsoft.com/en-us/library/dn690516.aspx, remember to provision the DNN instance on the same datacenter location to improve performance. You can also provision your Redis cache on your premises by following instructions provided at http://redis.io/download. The caching provider has been tested with the Win64 Redis port. Note that the DNN Redis Caching provider supports working with a shared Redis cache deployment, so you can reuse the same Redis cache deployment on several DNN websites.
  2. Download from the https://github.com/davidjrh/dnn.rediscachingprovider/tree/master/Release folder the latest version of the DNN Redis Caching provider
  3. Using the Extensions page of your DNN instance, upload and install the Redis caching provider. Once installed, will be the default caching provider.
  4. Open your web.config file and specify the RedisCachingProvider connection string in the ConnectionStrings section. If you are using Azure Redis cache, your connection string should look like this:


<add name="RedisCachingProvider" connectionString="mycache.redis.cache.windows.net,password={base64password},ssl=True" providerName="DotNetNuke.Providers.RedisCachingProvider" />



Advanced configuration

There are some attributes you can use to tweak or debug the caching provider. The initial set of configurable attributes are:

  • keyPrefix (default string.Empty): this attribute is used to add a prefix to each key stored on the Redis cache. This can be used to share the Redis cache between different DNN deployments. When no prefix is specified (default empty string), the current DNN Host Guid will be used so by default, the cached keys are partitioned by the Host identifier.
  • useCompression (boolean, default false): before inserting on the Redis cache, the value is compressed in order to save memory. The values are deflated when retrieved from the Redis cache. While using this parameter can save resources on the Redis server has a performance penalty because of the compression operations
  • silentMode (boolean, default true): when the silent mode is set to true and an exception occurs, is logged on the DNN instance log files under "/Portals/_default/Logs" and not raising an exception. Note that the in-memory cache is used before the Redis cache, so the site normally will continue working, but can end in out of sync caches. Keep an eye on the log files to verify that everything is working fine.

Hope this helps. Happy coding, and happy new year!!

La hora del código: ASP.net vNext

imageLlegó la hora de cerrar los eventos que tenemos programados desde TenerifeDev para este año, y hemos hecho unos cambios de última hora para el evento de este jueves aprovechando  el evento global “La Hora del Código”. Para los que no sepáis de que va, es “un movimiento mundial, llegando a decenas de millones de estudiantes en más de 180 países. Cualquier persona, en cualquier lugar puede organizar un evento Hora de Código. No se necesita experiencia y está destinado para edades entre 4 y 104 años”.

Por este motivo, hemos cambiado la sesión sobre SharePoint por una más general de mayor audiencia de Introducción a ASP.net vNext, en el mismo sitio y misma hora. Esta sesión iba a ser impartida por Tiberiu Covaci (MVP de ASP.net), pero por razones de última hora hemos cambiado su sesión para principios del año que viene. En esta ocasión, Santiago Porras (MVP Windows Platform) y David Rodriguez (MVP Azure) serán los encargados de conducir la sesión.

Ir a la página de registro gratuito

  • Evento: Introducción a ASP.net vNext
  • Descripción: Ven y conoce de primera mano cómo será la próxima versión de ASP.net, qué cosas cambian, dónde quedan los WebForms, cómo funcionan los controladores y qué le ha pasado al web.config. Santiago Porras, MVP de Windows Platform (@saintwukong) y David Rodriguez, MVP de Azure (@davidjrh) nos harán un recorrido por cada una de las novedades de la nueva plataforma para aplicaciones web y cloud. ASP.net vNext (aka ASP.NET 5), es completamente Open Source y está disponible en GitHub. ASP.NET 5 está actualmente en Preview.
  • Dónde: Salón de Grados de la ETSII
  • Cuándo: Jueves 11 de diciembre a las 18:00 GMT+0
  • Registro: registro gratuito en Eventbrite

Nos vemos el jueves!!

Posted: 9/12/2014 11:14 por David Rodríguez | con no comments
Archivado en: ,
TenerifeDev: eventos para cerrar el año

TenerifeDev250Hacía algo de tiempo, desde la LAN Party de verano, que desde TenerifeDev no hemos preparado ninguna sesión de esas que nos gustan, donde vamos a pasar una tarde compartiendo experiencias de desarrollo sobre tecnologías innovadoras.

Si aún no conoces nuestro grupo de usuarios, se trata de un grupo sin ánimo de lucro en el que  nos reunimos para compartir experiencias de desarrollo de software sobre tecnologías Microsoft, siendo nuestro punto de encuentro habitual la sala de Grados de la ETSII de San Cristóbal de La Laguna, Tenerife. Este año hemos estado algo liados y no nos hemos las veces que nos hubiera gustado, pero nos hemos puesto un  objetivo de reunirnos al menos una vez al mes con diversas temáticas de alto grado de interés tanto para los alumnos como para gente como nosotros, que seguimos en el ámbito del desarrollo de software de forma profesional, facilitando un punto de encuentro entre alumnos y empresas.


Próximos eventos

Después de hacer un hueco en la agenda, hemos conseguido cerrar las siguientes fechas y temáticas, para lo que resta de año:

  • 16 de Octubre de 18:00 a 19:30 - Introducción a Azure Websites y Responsive Design:
    no te pierdas de la mano de Santiago Porras (MVP en Windows Platform Development) y David Rodríguez (MVP en Microsoft Azure) una sesión de introducción al desarrollo sobre Azure Websites, viendo distintos aspectos como la creación del site, integración con GitHub y Visual Studio, copias de seguridad, así como la forma de implementar tus sitios web mediante un diseño responsivo que sea adapte a cualquier dispositivo. Como no, veremos algo de Windows 10 para abrir boca.
    Lugar: Aula de la FEULL, antigua torre de Químicas
  • 19 de Noviembre de 18:00 a 19:30 - Introducción a Azure Mobile Services y Aplicaciones Universales:
    no te pierdas de la mano de Santiago Porras (MVP en Windows Platform Development) y David Rodríguez (MVP en Microsoft Azure) una sesión de introducción al desarrollo de apps para dispositivos móviles, integrando notificaciones push, bases de datos en backend, uso de proveedores de identidad como Facebook o Twitter, y todo ello compartiendo código mediante la creación de aplicaciones universales, el nuevo modelo de desarrollo de apps multi-plataforma.
    Lugar: Salón de Grados de la ETSII
  • 11 de Diciembre de 18:00 a 19:30 - Desplegando SharePoint en la nube:
    no te pierdas de la mano de Alberto Díaz (MVP de SharePoint Server), una sesión sobre cómo desplegar una granja de servidores SharePoint sobre Microsoft Azure, con tips & tricks sobre rendimiento y manual de buenas prácticas, y todo en menos de 10 clicks.
    Lugar: Salón de Grados de la ETSII

TenerifeDev también eres tú

No olvides que tú también puedes dar una sesión y compartir tus inquietudes y tus experiencias. ¿Que te gustó lo que hiciste el fin de semana y quieres compartirlo? Adelante. ¿Que estás en un proyecto que crees que sería interesante para mostrarlo? ¡Todos queremos verlo!

Para ello es muy fácil, ponte en contacto con nosotros a través de cualquiera de los siguientes medios y lo organizamos sobre la marcha.

I got a new laptop: where is my Break key?

This post is in memoriam to those cool keyboard designers that happily remove keys from laptops, just because they run out of space or because they think that key is no longer being used, doing things more funny for IT guys that they don’t have anything to do but spend their time on looking how to change now from full screen mode while doing a Remote Desktop session.

Raiders of the lost key

I have to say that I am very happy with my DELL M3800 laptop, it’s a real black beast workstation (16GB RAM, two SSD disks, UHD touch screen with the weight, etc.) with a very low weight, only 1,88Kg, what it does ideal for having opened several Visual Studio sessions, some Hyper-V machines running and a lot of other tasks in background. Cool!

I normally have the laptop connected via USB 3.0 to the dock station so I normally use an external keyboard during working hours, and was yesterday while running my awesome Windows 10 Technical Preview using Hyper-V and went to full-screen mode and unpinned the top bar to hide the remote session options (wanted a more immersive experience). To go to full-screen mode I used the menu “Full-Screen” from the Hyper-V window, but when I tried to came back to my real desktop by using the “Ctrl+Alt+Break” key combination, where in the hell was my Break/Pause key?


DELL M3800 Keyboard Layout

And then, I discovered a world of frustrated DELL customers asking for the same thing. How this can happen? How can I solve this?


I’m going to post here the solution so you can use it as well, but I’m really writing this because I’m sure I will need to revisit this post in a near future after reinstalling my OS for whatever reason.

I first tried to use a simple PowerShell cmdlets by sending the keys combination, but this was not working because the keyboard hooks just sends the keys to the Guest OS, and not to the “hosting Hyper-V window”.

Then I tried to use AutoHotKey in my local session, and while it’s a highly recommended piece of software for other tasks, has the same problem than using PowerShell, the keys are not sent to the hosting Hyper-V process (there are some attempts of resolving it by looking for the process handle, but after spending some time on that path, anything worked).

I gave a try to On Screen Keyboard (run osk.exe in a command line), in both the host OS and the Guest OS, but had the same issue, didn’t work!

So the solution: remap a key in my keyboard. This comes from a DELL support forums thread but I’m going to complement the answer because the procedure explained there is not easy to follow and does not explain how to map whatever key you want. 

WARNING Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Modify the registry at your own risk.

Remapping a key by using Scancodes: the hard way

I noticed that I was never using the key “Insert” (must be a key that keyboard designers use a lot), so I decided to convert that key as my new “Break” key. To do this remap, you must to do some modifications in your registry and then logoff/login again into your profile (restarting the laptop also works, but the first method is faster).

To change a key for another, you must open your registry editor by running regedit.exe and finding the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout. There you can manually change the keyboard mappings but this is not an easy task since you will need to start wasting your time looking for the scancodes documentation:


If you want to go that path, I recommend you to visit this link with a good keyboard scancodes reference: http://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html

Remapping a key by using Scancodes: the easy way

I was getting a headache reading all these documentation and then found an awesome Open Source tool called Sharpkeys and available at CodePlex that allows you to do this task without diving into any keyboard code reference. So here the final steps I followed:

  1. Download and install SharpKeys from CodePlex
  2. Run the app and click on the “Add” button to add a new key mapping
  3. From the left list, select the key you want to map in your keyboard (I used “Insert”). You can easily find another one by clicking on the “Type Key” button
  4. From the right list, select the key you want to target. In our case, and for the purpose of this post in pro of a human race with happy IT guys, we are going to specify “Unknown: 0xE046”, that is the Scancode for the <Pause/Break> key
  5. Click on OK and that will save the entry in your registry
  6. Logoff and logon again, and you will see now that by using <Ctrl>+<Alt>+<Insert> is now working as <Ctrl>+<Alt>+<Break>


Remapping a key by using Scancodes: the faster way

I have exported the registry key so if you want to use just the same mapping, changing the “Insert” key for the “Break” key without doing anything else, just download this file and open it to import it into your registry.

Hope this helps!

Solving OneDrive for Business 2013 synchronization issues

If you are reading this is probably because you have suffered synchronization issues while using OneDrive for Business 2013 to sync a SharePoint document library to your local file system, something really useful to work with offline files while disconnected from the network and allowing the utility to sync when coming online.

Which type of issues? Well, sounds bad, but one of the worst things I have experienced is that if a problem occurs when the sync starts, no sync is done at all, getting a popup window telling that somebody in your organization used, for example, a long file path. If OneDrive for Business founds something like this issue, it simply stops, does not continue with the other files. Bad.


So you go to the document library, and trying to figure out the full path that the bubble is omitting, you change the file name or folder to shorten it and solve the issue…and then another popup, and other, until you have solved all these issues. No way of knowing all the possible issues to fix them at the same time.

And solving all the issues can be a hard task, if you see the sync restrictions available at http://support.microsoft.com/kb/2933738, from long path names to illegal characters and well… files of 2GB in size (who is storing 2GB files on SharePoint Online? BTW, who is storing 1,9GB files on SharePoint Online?)

Anyway, I was tired of following this procedure to solve the items one by one and decided to build a PowerShell script to analyse the document library structure returning all the conflictive files in a single operation.

PowerShell to the rescue

I have built a PowerShell script available at https://github.com/davidjrh/o365tools/ that uses the SharePoint Server 2013 Client SDK assemblies to connect to a SharePoint Online site and start doing the analysis. You can specify a document library or let the cmdlet to look all the document libraries in the site. You can pass the credentials as a PSCredential parameter or introduce them in a secure popup window when requested. Also enabling the Verbose switch will show the full progress of the analyzed files.

.\Get-SPOInvalidFilesForSync.ps1 -SiteName "https://mytenant.sharepoint.com" 
                                 -DocumentLibraryName "My Documents" 
                                 -Credential $credentials 

-SiteName The SharePoint Online site's URL. Ensure to specify https

-DocumentLibraryName Optional. The name of the library to process

-Credential Optional. The credentials to be used to connect to SharePoint Online. If omitted, the script will pop up for input

-Verbose Optional. If specified, all verbose messages will be shown


Now you can go and customize this script and, for example, send an e-mail to the owner of that file asking for renaming it to fix the issue. Running this in an scheduled task is what I’ve finally do it.


SharePoint is good and OneDrive for Business is not bad. But PowerShell rulez.

Posted: 26/9/2014 16:51 por David Rodríguez | con no comments
Archivado en:
TenerifeDev en la TLP-Innova con Azure y aplicaciones universales

EntradaTLPComo much@s sabrán, la Tenerife LAN Party está a la vuelta de la esquina celebrándose del 15 al 20 de Julio, un evento que no hace más que crecer y crecer edición tras edición, y esta no ha sido menos. Las 2.000 entradas para el acceso al recinto ferial se agotaron en…2 minutos!!


Quizás una de las secciones que más atraen al mundo profesional es la TLP-Innova, un encuentro de comunicadores, programadores y profesionales que viven y trabajan en el entorno tecnológico. En esta edición hay dos novedades a destacar en cuanto la organización:

  • El evento tendrá lugar en el Auditorio de Tenerife Adán Martín del 16 al 19 de julio (cerca del recinto ferial donde se desarrolla la TLP, pero en un ambiente más profesional)
  • La entrada a todas las jornadas es totalmente GRATUITA

Las charlas y sesiones que se están cociendo están, creedme, para no perderse ni una. Podéis acceder al listado completo a través de este enlace: http://tlp-innova.com/actividades/

TenerifeDev quería poner su granito de arena y os hemos preparado un monográfico de tres sesiones sobre Azure donde podrás aprender las características más importantes de la plataforma, además de una sesión adicional sobre el desarrollo de aplicaciones universales. Os dejamos el detalles de las mismas:


Microsoft Azure

Fecha: Jueves 17, de 10:00am a 12:55pm
Ubicación: Sala de Cámara del Auditorio de Tenerife

10:00 – 10:55 - Microsoft Azure (I): todo lo que un desarrollador debería saber

Conoce las características que pueden hacer que el desarrollo de tus aplicaciones sea un juego de niños gracias a los Azure WebSites y Mobile Services y domina el los despliegues y el código con Visual Studio Online.

11:00 – 11:55 - Microsoft Azure (II): el cielo para IT Pros

A la hora de llevar tu solución a la nube es necesario pensar anteriormente las diferencias existentes entre esta y el escenario al que estamos acostumbrado dentro de nuestro datacenter. En esta sesión presentaremos las respuestas a las preguntas más comunes que recibimos: ¿en qué datacenter podemos colocar nuestras máquinas virtuales?, ¿cómo garantizamos la alta disponibilidad de nuestros servicios frente a posible fallos del hardware o actualizaciones del host?, ¿cómo gestionamos altas cargas de tráfico mediante el balanceador? ¿cómo podemos controlar el acceso a nuestras aplicaciones mediante el filtrado y ACLs? Y lo más importante, ¿cómo podemos prever el coste mensual de la infraestructura desplegada en la nube?

12:00 – 12:55 - Microsoft Azure (III): últimas novedades presentadas en el TechEd 2014

Desde su lanzamiento oficial en febrero de 2010, la plataforma Azure no ha parado de crecer tanto en el número de servicios para la construcción de soluciones basadas en la nube, como en la disponibilidad de la misma a lo largo de todo el globo. El pasado mes de mayo se presentaron en el TechEd de USA un gran número de nuevos servicios y actualizaciones que han dejado con la boca abierta a la comunidad técnica. ¿Te imaginas poder desplegar una aplicación que fue desarrollada en los años 90 en la nube y accesible desde un iPad o una tablet Android, todo sin tener que tocar una línea de código de la aplicación? Esta y muchas otras serán las cosas que veremos en esta sesión para concluir con las sesiones sobre Microsoft Azure.


Universal Apps para dominarlos a todos

Fecha: Jueves 17, de 10:00am a 12:50pm
Ubicación: Sala Multiusos B del Auditorio de Tenerife

13:00 – 13:50 - Universal Apps para dominarlos a todos

Las Universal Apps son el último paso que ha dado Microsoft para desarrollo de aplicaciones para Windows Phone 8.1 y Windows 8.1 incluyendo, como principal cambio, poder compartir casi la totalidad del código gracias al uso del núcleo Windows Runtime. En esta sesión veremos algunas de las principales características que harán que disfrutemos creando aplicaciones.


Como es habitual, tendremos sorpresas y algunos regalitos para los más “avispados”. ¡No faltéis!

Un saludo, y happy coding!

How to easily publish your own app through Azure RemoteApp Preview without uploading an image template

If you are playing with the Azure RemoteApp Preview (you can enable the features preview here: https://account.windowsazure.com/PreviewFeatures), you would like to publish your own WinForms applications without uploading a template image. If your application can run on the default Windows Server 2012 R2 that is available when creating a new RemoteApp service, you can follow these steps.

Copying files through the Open/Save as dialogs from any application like Word, Paint, etc. is available so... why not to copy and paste my App files through them? Sounds really silly, but it works! So... why not to enable the File Explorer to allow copying/pasting files from my file system to the remote VM and then publish the applications? Easy! Let’s see how to do it.

Publish File Explorer

Once you have created your RemoteApp service, let’s go and create a new shortcut for the File Explorer:

  1. Go to your RemoteApp service and then to the RemoteApp Programs tab
  2. Click on the “Publish > Publish programs using path”
  3. In the Name textbox type “File Explorer” and in the path type “%SystemRoot%\explorer.exe”image
  4. Click on OK

Now when opening the Microsoft RemoteApp client, the file explorer is available and after opening you will notice that you can copy files from your local system and then pasting them on this File System instance.


As example, you can copy a WinForms app to the remote file system as shown below. BTW, you can also copy an installer and run it by opening it later.


Now you can go to the “RemoteApp Programs” list and just create a new shortcut for your application.


Do you need to setup something else for your RemoteApp? You can easily publish cmd.exe and powershell.exe as well. No limits!

Remember that this is a service preview and lot of new features will be available soon. This is only to make things easier while testing your own RemoteApps in this phase.

Hope this help!

How to know which Azure VM image are you consuming?

MostMM02_iDiskIconA few days ago I was wondering if one of the SQL Servers I deployed some months before was provisioned using a SQL Server “pay-per-use” image or was done by using a clean Windows Server 2012 R2 image and then manually installed the SQL Server on it. At the beginning the question seemed  trivial, and that I could easily found that by simply logging into the VM and check the version number on SQL Server (i.e. by running SELECT @@version, or similar), but I was not really happy with what I found. Another way could be to check the billing details, the VM should be there in some way, but apart of the number of records that I had on those details plus the fact that those details were grouped by cloud service name, and that in some cases I would not have access to the billing information, this didn’t seem the correct path.

How to be immediately 100% sure that I was using one image instead of another? What if I have the same question about other “pay-per-use” VM image, and trying to found symptoms is not easy?

Looking at the Azure Portal

If you go to the Azure Portal and deploy a SQL Server VM via the VM Gallery, PowerShell or another way, you will currently find that in the VM dashboard there is a lot of information about the VM but no detail of what image are you paying for. The disk area shows you the current attached disks that in some way were used to initially provision the VM, but again, there is no information about which image was used:


PowerShell to the rescue

After the initial ideas, I found in the MSDN Virtual Machine REST API documentation that in the “GetRole” operation there is a way to obtain the source image name of the image used to create the OS disk:


Ok, almost there. So if there is a REST API, almost sure that there is a Cmdlet that uses that API, so before starting to build a REST client app, just tried to find it and hurra!…was there!

# Setup the credentials using a management certificate
$subscriptionName = '<your subscription Name>'
$subscriptionId='<your subscription Id>'
$thumbprint = ‘<the thumbprint of your management certificate>’
$mgmtCert = Get-Item cert:\\CurrentUser\My\$thumbprint
Set-AzureSubscription -SubscriptionName $subscriptionName -SubscriptionId $subscriptionId -Certificate $mgmtCert

# Select the subscription
Select-AzureSubscription $subscriptionName

# Obtain the source image name
$(Get-AzureVM -ServiceName sqlcosttest).VM.OSVirtualHardDisk.SourceImageName

By running this, you get different results from a VM that was provisioned by using a SQL Server image rather than a Windows Server one. The Source Image name can give you an idea of what are you paying for (this case I was paying for a SQL Server 2014 Enterprise on Windows Server 2012 R2, the April’s release):


With the VM Source Image Name you can now use the cmdlet Get-AzureVMImage to obtain the full information of the source image:


Running the cmdlet Get-AzureVMImage without parameters gives you the full list of current VM images ready to deploy.


After thinking twice, now seems obvious how to obtain the information I was looking for, and would be more obvious for those ones using Powershell day by day. It’s not my case, and day by day I learn a new highly useful cmdlet that will never forget. In fact, my RescueTime reports tell me that I’m increasing the time I daily spend on running Powershell cmdlets. Hopefully this helps you and encourages you to learn more about Azure cmdlets.

Un saludo and Happy Coding!

Cosas que debo llevar al Global Windows Azure Bootcamp

bootcampYa sólo quedan unos cuantos días para vernos en el evento Global Windows Azure Bootcamp y parece ser que estamos que lo petamos, hemos tenido que colgar el cartel de no quedan más entradas. Aún así, puedes registrarte a la lista de espera, ya que vamos a realizar un proceso de comprobación de asistencia para liberar las plazas que no vayan a utilizarse.

Recuerda que aparte de las estupendas sesiones que transcurrirán a lo largo del día, vamos a hacer historia con la mayor granja de servidores global colaborando en un proyecto de investigación científica para el diagnóstico temprano de la diabetes Tipo 2. Va a ser algo grande y que dará mucho que hablar sobre el potencial de la computación global, algo de lo que podrás sentirte orgulloso de haber puesto tu granito de arena y haber colaborado en ello.


Pulsa aquí para conocer más acerca del Global Windows Azure Bootcamp GlyQ-IQ lab

Para poder participar y colaborar en esta investigación es necesario que te prepares para ello. ¿Ya lo tienes todo listo? ¿Te acuerdas de lo que tenías que llevar al evento?

Activar suscripción de Windows Azure

No te preocupes, que no tienes que saber nada de biología molecular ni ser ingeniero en computación distribuida. Tan sólo tienes que llevar una cosa: una suscripción activa de Windows Azure.

Hay diversas formas de conseguir una suscripción de Windows Azure te animamos a hacerlo desde ya para evitar retrasos en la activación de la misma el día del evento:

  • Activar suscripción gratuita de 30 días.- siguiendo este enlace podrás activar una suscripción gratuita de un mes con un crédito de 150€, más que suficiente para desplegar hasta 20 servidores durante el transcurso del evento sin tener que poner un céntimo de tu bolsillo;

Activar suscripción gratuita de Windows Azure

  • Activar los beneficios de tu suscripción a MSDN.- los suscriptores de MSDN tienen como beneficio una suscripción a Azure de 150$ mensuales, cuyos recursos pueden también utilizarse para este evento. Hot Tip: ¿la empresa donde trabajas es Partner de Microsoft? Comprueba los beneficios de las competencias adquiridas y activa las suscripciones MSDN asociadas a las mismas!

OPCIONAL: llevar un portátil es opcional, aunque recomendable. No necesitarás llevar nada preinstalado ni instalarás nada allí. Simplemente se tratará de desplegar un servicio en Azure a través del mismo navegador, algo de lo que daremos más detalles en el día del evento. El área de “Azk the Expert” estará disponible a lo largo del día para solucionar cualquier problema que tengas.

Vamos a hacer historia. ¡Nos vemos el sábado!

¡Ya se acerca el Global Windows Azure Bootcamp!

bootcamp-300x202El próximo 29 de Marzo se va a desarrollar a lo largo del día y en cerca de 140 localizaciones a nivel del globo el mayor evento global sobre Windows Azure. Se trata de pasar un día aprendiendo y compartiendo conocimientos sobre la plataforma en la nube de Microsoft, a la vez que de forma simultánea se realiza una investigación para el diagnóstico temprano de la diabetes tipo 2.

Desde la comunidades técnicas de España hemos querido hacer un evento muy especial y lo vamos a concentrar en Madrid en la sede de Microsoft, donde estaremos todos los especialistas y MVPs que actualmente estamos día a día trabajando con la plataforma Azure.

La realización de este evento con los líderes de la comunidad de Windows Azure en España manteniendo la asistencia gratuita no sería posible sin la dedicación y duro trabajo de los presentadores, organizadores y contribuciones económicas de otras organizaciones para ayudar a financiar la logística del mismo. Muchas gracias a todos ellos.

El registro a este evento es gratuito -¡Sí! ¡Gratis!- y se realiza a través de Microsoft World Wide Events. Regístrate en el enlace siguientepara estar en Madrid y atender en persona al Windows Azure Bootcamp 2014 en Madrid. ¡No tardes, las plazas son limitadas!

Registro al Global Windows Azure Bootcamp – Madrid

Para más información, visita los siguientes enlaces:

¡Allí nos vemos!

Looking for a Surface 2 Pro 256GB using the Azure Cloud Power

SurfaceSince some weeks ago I have been trying to find a way of buying a Surface 2 Pro 256GB to definitively replace my development laptop. Some videos I have seen on YouTube like having 4 external displays brought my attention and after asking Joe Brinkman and Alberto Diaz about their experience working with the tablet as a dev machine both answered that definitively can replace my laptop (of course with the docking station). The final decision was taken after seeing another thread in the Surface Forums about the gaming experience like playing Call of Duty Ghosts on a Surface Pro 2.If that beast can move those types of games, for sure that can replace my current laptop.

And the problem started…

Looking for a Surface 2 on the stores

I have been trying to find a Surface 2 Pro 256GB in order to have the 8GB RAM in almost all the stores on Internet, and was really surprising that this model is Out of Stock in almost all of them. When finally found that the Microsoft Store at UK, I started to evaluate the problem of not getting the correct warranty if I’m in another country, different AC plugs than Spain, etc. The price it’s not low so the risk of having a problem without a store/warranty was not an option.


So the final decision was to buy it on Spain but same problem. Out of stock. I call the Microsoft Store and they didn’t know about when they could arrive. Bad thing.

I’m a developer, I don’t like doing things twice

I have been checking the Microsoft Store website twice a day since two weeks ago, and I was starting to be tired of doing it. So I was wondering if I could automate the process and receive some type of alert when the devices were in stock again. And then I found the how to create my new minion.

Looking into how the Store page works, I noticed that a GET WebAPI call is done to show the availability of the product:


More interesting was the result of that WebAPI call, since it’s an XML with the stock status for that product:


Idea! Idea! Idea!

If I didn’t want to check the website twice a day, what I would like was just to receive an alert of when the devices were in stock again. Would be nice to receive an e-mail on such event, and would love get an SMS on my mobile!

I always compare Azure and other cloud services like a Lego store. The pieces are there to build solutions, you only need to know about them. So let’s put some pieces in place:

  • Azure Mobile Services: in order to have a scheduled task looking for the device stock at the store. There are other options but the scheduler provided by Mobile Services is sufficient for this purpose and also free when using 1 scheduled task;
  • SendGrid: in order to receive an e-mail notification for stock changes. Again, there are other options but SendGrid offers a free tier for Azure subscribers that allows to accomplish this also for free;
  • Twilio: in order to receive SMS notifications for stock changes. Again, you can signup Twilio for free –no credit card needed- and send up to 1000 SMS (Azure subscribers get $10 when adding credit later to Twilio).

Cool, I love free stuff.

Adding some code to a scheduled task

So with the pieces in mind, the API keys from SendGrid and Twilio in my Notepad++, I started to create an empty Azure Mobile service through the management console.


The only thing inside the mobile service is just an scheduled task configured to run once per hour (my minions must work harder than me!!).


Finally the script code for the scheduler task. Note that I have hidden the API keys, e-mails and phone numbers:

function CheckAvailability() {
    try {
        var url = "http://surface.microsoftstore.com/store/mseea/es_ES/DisplayPage/id.ProductInventoryStatusXmlPage/productID.287012200?_=13";
        var request = require("request");
        request(url, function(error, r, body) {
                if (error) { return console.error(error); }
                if (r.statusCode != 200) { return console.error(r); }
                var xml2js = require('xml2js');
                var parser = new xml2js.Parser();                        
                parser.parseString(body, function (err, result) {
                    if (err) { return console.error(err); } 
                    if (result.InventoryStatusResponse.availableQuantity != "0") {
                    } else {
    catch(e) {

var SendGrid = require('sendgrid').SendGrid;

function sendNotifications(inventoryStatusResponse) {

function sendSMS(inventoryStatusResponse) {
    var httpRequest = require('request');
    var account_sid = "Your_Twilio_Account_SID_here";
    var auth_token = "Your_Twilio_Auth_Token_here";
    var from = "+345550000";
    var to="+3465550001";
    var message = 'The new Surface 2 Pro 256GB is now available at Microsoft Store. Units available: ' 
                    + inventoryStatusResponse.availableQuantity;
    // Create the request body
    var body = "From=" + from + "&To=" + to + "&Body=" + message;
    // Make the HTTP request to Twilio
        url: "https://" + account_sid + ":" + auth_token +
             "@api.twilio.com/2010-04-01/Accounts/" + account_sid + "/Messages.json",
        headers: { 'content-type': 'application/x-www-form-urlencoded' },
        body: body
    }, function (err, resp, body) {
        if (err) { return console.error(err); }

function sendEMail(inventoryStatusResponse) {
    console.log('Surface 2 Pro 256GB available at Microsoft Store. Units available: ' 
        + inventoryStatusResponse.availableQuantity + '. Sending notifications...');
    var api_user = 'Your_SendGrid_ApiUser';
    var api_key = 'Your_SendGrid_ApiKey';
    var sendgrid = new SendGrid(api_user, api_key);       
        to: 'foo@mydomain.com',
        from: 'bar@mydomain.com',
        subject:  'Surface 2 Pro 256GB available at Microsoft Store!',
        text:     'The new Surface 2 Pro 26GB is now available at Microsoft Store. Units available: ' 
                    + inventoryStatusResponse.availableQuantity
    }, function(success, message) {
        // If the email failed to send, log it as an error so we can investigate
        if (!success) {
        else {
            console.log('Email notification sent!');

Finally, by commenting the line checking for the availableQuantity != “0”, I got my initial notifications arriving to my devices:




The implementation shown above can be considered a proof of concept –BTW, probably I should not use the Store WebAPI without Microsoft confirmation- of things you can you can do by integrating different cloud services available today, and start using them for free.

The world has changed and is now cloud-connected.

Have you started to think cloud?

Saludos y Happy Coding!

Más artículos Página siguiente >