[#SIGNALR] FIX: #WindowsPhone and the delayed messages (goes slow slow slow the delivery of messages in WP)


SignalR is a platform to real time communications. When you begin creating apps go like a shot, and the truth is that the level of abstraction that gives you is great. Customers .net having to WPF, Win8 and Html work seamlessly, however (isn’t a but) If you think app Windows Phone (8.1 for example), you can find with the strange situation in which the emulator everything is perfect and in the device, not so much.

Note, is not not work but that messages are quite slow in coming (from 5 seconds up to minutes). The test scenario also includes complex authentication methods, is a Website of Azure, which plays the role of SignalRHub.

If we activate the trace in the WP client we can see that the pattern of behavior of the connection is

Connecting, Connected, Reconnecting, Connected, Reconnecting, Connected,…

In few seconds the client connects and disconnected several times. This leads us to think that management of connections (ping that bad say you) it may be wrong, and that the solution is to change the type of transport.

If we look at the problem from a perspective more ampluica, we can find troubleshooting (link), the next solution for Silverlight apps in SignalR :

Messages are delayed when using server sent events on Silverlight. To force long polling to be used instead, use the following when starting the connection:

connection.Start(new LongPollingTransport());

Luckily this solution works also for Windows Phone apps. Now, if you see why this type of transport if works, intuition leads you to MSDN. The amazing thing is that this class is not documented or anything like that (link)


So now using touch using LongPollingTransport() , wait for the friends of MSDN to complete documentation or view within the code of SignalR operation of this kind.

Those options or… use a debugger such as Fiddler to make differences there are between the transport by default and LongPollingTransportBut that is for another post Winking smile

Resources: http://www.asp.net/signalr/overview/signalr-20/troubleshooting-and-debugging/troubleshooting#azure

Greetings @ Somewhere around

The Bruno

image image image Google

[#SIGNALR] Fix: #WindowsPhone y los delayed messages (va lento lento lento el delivery de mensajes en WP)


SignalR es una plataforma increíble para real time communications. Cuando comienzas ha crear apps vas como un tiro, y la verdad es que el nivel de abstracción que te da es grandioso. Los clientes .Net que tiene para WPF, Win8 y Html funcionan a la perfección, sin embargo (no es un pero)  si creas un app Windows Phone (8.1 por ejemplo), te puedes encontrar con la extraña situación en la que en el emulador todo va perfecto y en el device, no tanto.

Ojo!, no es que no funcione sino que los mensajes tardan bastante en llegar (desde 5 segundos hasta minutos). El escenario de prueba tampoco incluye complejos métodos de autenticación, es un Website de Azure que cumple el papel de SignalR Hub.

Si activamos las trazas en el cliente de WP podemos ver que el patrón de comportamiento de la conexión es

Connecting, Connected, Reconnecting, Connected, Reconnecting, Connected, …

En pocos segundos el cliente, se conecta y desconecta varias veces. Esto nos lleva a pensar en que la gestion de conexiones (el ping que mal le decimos) puede estar mal, y que la solución es cambiar el tipo de transporte.

Si vemos el problema con una perspectiva más ampluica, podemos encontrar en SignalR troubleshooting (link), la siguiente solución para apps Silverlight:

Messages are delayed when using server sent events on Silverlight. To force long polling to be used instead, use the following when starting the connection:

connection.Start(new LongPollingTransport());

Por suerte esta solución funciona también para apps Windows Phone. Ahora, si se te da por ver porqué este tipo de transporte SI FUNCIONA, la intuición te lleva hacia MSDN. Lo increíble es que esta clase no está documentada ni nada parecido (link)


Asi que a usar ahora toca usar LongPollingTransport() , esperar que los amigos de MSDN completen la documentación o ver dentro del código de SignalR que funcionamiento de esta clase.

Esas opciones o … usar un debugger como Fiddler para que diferencias hay entre el transporte por defecto y el LongPollingTransport. Aunque eso va para otro post Winking smile

Recursos: http://www.asp.net/signalr/overview/signalr-20/troubleshooting-and-debugging/troubleshooting#azure

Saludos @ Somewhere around

El Bruno

image image image Google

[#NUGET] FIX: One or more packages could not be completely uninstalled. Restart Visual Studio to finish uninstall


When I remember my first days programming with the amazing COM dlls and DLL Hell, the arriving of .Net was the best thing that could happen to a lot of developers. However, when some projects became more complex, the management of dependencies also became a little more complicated and that’s why in the path NuGet emerge. Today Visual Studio and NuGet are a great tool for dependency management.

That doesn’t mean that still are to improve a bit NuGet within Visual Studio integration. A common mistake that you can find is the following:

One or more packages could not be completely uninstalled.Restart Visual Studio to finish uninstall


And the problem is that even if you restart Visual Studio, this “error” is still there. If you get a little on the insides of the IDE see IDE could not release these packages because they have dependencies on some Visual Studio artifacts. For example, Entity Framework editor.

The solution is quite simple, locate the packages in your solution directory and delete invalid packets manually (of course the IDE is closed). I know is not a beautiful solution Winking smile


Saludos @ Home

El Bruno

image image image Google

[#NUGET] Fix: One or more packages could not be completely uninstalled. Restart Visual Studio to finish uninstall

Hola !

Si lo comparo el principio de los tiempos con el fabuloso DLL Hell, .Net fue de lo mejor que nos pudo pasar. Luego claro, la gestión de dependencias se complicó un poco más y llegó NuGet. Hoy Visual Studio y NuGet son una alegría para la gestión de dependencias.

Eso no quita que todavía se pueda mejorar un poco la integración de NuGet dentro de Visual Studio. Un error frecuente que te puedes encontrar es el siguiente:

One or more packages could not be completely uninstalled. Restart Visual Studio to finish uninstall


Y el problema está en que por más que reinicies Visual Studio, este “error” queda allí. Si te metes un poco en las tripas del IDE verás que el IDE no pude liberar estos paquetes porque tienen dependencias con artefactos propios de Visual Studio. Por ejemplo, el editor de Entity Framework.

Pues bien la solución, es localizar el directorio de paquetes de tu solución y eliminar a mano los paquetes inválidos. Lo sé es una solución artesanal Winking smile



Saludos @ Una casa de campo con 2 bytes de internet

El Bruno

image image image Google

[#IOT] Windows on Devices, all for IoT (Internet of Things)



A couple of days ago I wrote a post where redirected people to the program “Windows on Devices” from Microsoft. Many people have signed up in it just to get a free Intel Galileo, however the program is something much broader. I had put aside some extra time to extend a bit the original content.

  • The first thing to notice is that this program is a program for DEVELOPERS.

If you already know platforms such as Arduino, the transition to the new tools (both hw and sw) will be almost natural. Of course, you can use Visual Studio as a tool for development (would have said that this is of the most cool of the program?)

  • Another interesting detail is that all of the existing code of Arduino it will be compatible with a Galileo .

Hmmmmmmm … I have my doubts. The code example of a Blinky is the same in Arduino, so OK here. What happens is that we all know that the “Hello World” run always, we will see what happens when you move more complex code.


Note: if you have created very complex code in Arduino is to kill you. How complicated is not migration but some specific libraries for sensors not standard.

Just go to the main page of the program to be able to see everything.

  • The Galileo as it comes does not work, you have to “iron” a special image through a SD.

Beware, if you have a Galileo before, can not install the VS plugIn and give the keyboard and whisky. You will first have to “prepare” the Galileo with a few simple steps (link)

Note: welcome back telnet.

  • This program is brother or part of ISS, Intelligence System Services.

Now wonder, and this? queloque? This, ISS is a series of services assembled in Azure to work specifically with IoT projects. And behind this thing, .net Compact Fwk? not… Windows Embedded! Now lightens everything somewhat, Galileo will execute a WE in order to have everything more controlled.

If we add you compatibility with Arduino, with Azure integration and support from ISS, this program is really


Finally, if your head sound like words like “universal Apps”, “C#”, etc. Gives you a tour of the FAQ to see that still nothing.

Home: http://dev.windows.com/en-us/featured/Windows-Developer-Program-for-IoT

Git: http://ms-iot.github.io/content/SampleApps.htm 

FAQ: http://ms-iot.github.io/content/WelcomeAndFAQ.htm

Saludos @ Home

El Bruno

image image image Google