Materiales del CodeCamp BA 2011 – Datos en la nube (Azure) y Business Intelligence (PowerPivot)
Hola a todos, les dejamos disponible los materiales de las charlas del codecamp que estuvimos dando Leandro y yo (Adrian)
- Haciendo BI rápido y flexible
- Datos en la nube: colas, caché, topics y otras yerbas
Descarga de los materiales:
- Haciendo BI rápido y flexible (52)
- Datos en la nube: colas, caché, topics y otras yerbas (40)
Using Azure AppFabric Labs without servicebus.config
Azure has been offering a preview of possible future features for a long time now. SQL Azure has SQLAzureLabs (http://www.sqlazurelabs.com), and AppFabric has AppFabricLabs (http://portal.appfabriclabs.com).
You download the latest SDK CTP for AppFabric Labs, you create an AppFabric Labs account at their portal and you can work with it inmediately… well… almost!
There’s an issue regarding the service URL, you don’t need to assign the AppFabric Services URL for it to work with production Azure AppFabric, but to work with Labs you are forced to specify it. Some information about it is available here: http://blogs.msdn.com/b/piyushjo/archive/2011/09/27/azure-service-bus-working-with-the-appfabriclabs-account.aspx
It requires modifying (or creating a new one) ServiceBus.config file and drop it into your .NET Framework config directory. The problem with this approach is that it forces you to use labs in ALL your Azure AppFabric applications. And you may want to use both Labs and Production Azure AppFabric at the same time. As it says in that post, if you try to change the URL manually, you end up in this error:
AppFabric ServiceBus Error: “can’t support more than 1 level subdomain”
I read that another possibility is setting environment variables for this, so there’s an even easier way and you don’t have to go through all the config directories, which can create confusion. And when you are done with labs, you will probably run into an issue when trying to run in Azure Production environment, when you forget to delete the ServiceBus.config configuration.
So, the easy way is to put this at the beginning of your application, service, website (in global.asax), etc.:
Environment.SetEnvironmentVariable("RELAYENV", "Custom");
Environment.SetEnvironmentVariable("RELAYHOST", "servicebus.appfabriclabs.com");
Environment.SetEnvironmentVariable("STSHOST", "accesscontrol.appfabriclabs.com");
Tellago Technology Updates
My experiencia con Nook de Barnes & Noble
Buenas, esta vez quería aprovechar para compartir experiencia con mi Nook para todos aquellos que no vivimos en USA o Canadá.
En un principio cuando recién lo había adquirido, muy felizmente cargué algunos textos, previa conversión a PDF (el modelo blanco y negro no lee archivos de Office), y me dispuse a comenzar a leer, todo bien con la tapa y el indice, y cuando llegamos a la primera linea de código todo cambio… El formateo del código imposible de leer en tamañao Medium, pasándolo a Small todo hermoso y perfectamente formateado, listo para usar, eso si, solo con lupa en mano, la verdad otra decepción, no sé para que Small no tiene un tamaño suficiente como para poder leer cómo, ni hablar de Extra Small… calculo que esta solo para que quede simétrico con la opción Extra Large, aunqe Extra extra large no tiene su par
Bueno, por el lado de las tools todo muy lindo, Calibre pintaba bien, pero otra vez, por mas maña que he probado, reduciendo los margenes, aplicando todo tipo de opciones de formateo, etc no logré tener un resultado como la gente. Para comparar como les contaba, solo en Norte América, acá empieza toda la historieta de: tratar con tarjetas virtuales, rootear el Nook (siempre y cuando no corresponda el numero de seria del suyo a ciertos rangos, como me pasó a mi).
Y bueno, como para cerrar trato telefonico fue malismo, hasta me llegaron a decir en un caso fue que llame despues, que ya se estaba yendo de la oficina quien me había atendido.
Si no van a leer libros técnicos puede que la historia sea completamente distinta, no lo vamos a negar,
Saludos, y decidan con mas cuidado que yo.
Call REST services from BizTalk Server 2010
I was having some trouble consuming REST services from Biztalk Server 2010.
The first and easy thing to try is creating a Send Port with WCF-Custom adapter and configuring webHttpBinding as the binding and webHttpBehavior as the behavior.
But it doesn’t work inmediately, when you send a message with this configuration, you’ll get the following error:
The adapter failed to transmit message going to send port "SampleSendPort" with URL "http://localhost/SampleSite". It will be retransmitted after the retry interval specified for this Send Port. Details:"System.InvalidOperationException: Manual addressing is enabled on this factory, so all messages sent must be pre-addressed."
So, I tried another solution that I read around, use webHttpBehavior but instead of webHttpBinding, use a custom binding just like webHttpBinding but with manual addressing turned off. This looks like this:

The problem is that webHttpBehavior expects ManualAddressing to be turned on, so it throws this error:
The adapter failed to transmit message going to send port "SampleSendPort" with URL "http://localhost/SampleSite". It will be retransmitted after the retry interval specified for this Send Port. Details:"System.InvalidOperationException: In the endpoint at 'http://localhost/SampleSite', in order to use 'System.ServiceModel.Description.WebHttpBehavior', the 'HttpTransportBindingElement' of the binding must have ManualAddressing set to true."
So, I got rid of webHttpBehavior, and the messages were being sent without issues. If the endpoint couldn’t be reached, it would throw an error correctly in Biztalk and the message instance would get suspended. But when the server threw a 500 error (Internal Server Error), the message would dissappear and no error would show up.
Finally I decided to use webHttpBinding, webHttpBehavior but also add a custom behavior that configures the address and the method for the call. I took the code for this from here: http://social.msdn.microsoft.com/Forums/eu/biztalkesb/thread/c19d7486-0705-433f-8e1a-a9088d076ed7. And it ends up looking like this:
WebManualAddressingBehavior.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel.Description;
using System.ServiceModel.Dispatcher;
using System.ServiceModel.Channels;
using System.ServiceModel;
using System.ServiceModel.Configuration;
using System.Configuration;
namespace Logue.Library.WebManualAddressingBehavior
{
public class WebManualAddressingBehavior : IEndpointBehavior, IClientMessageInspector
{
public string Method { get; set; }
public Uri ManualAddress { get; set; }
public WebManualAddressingBehavior()
{
}
public WebManualAddressingBehavior(string _method, Uri manualAddress)
{
Method = _method;
ManualAddress = manualAddress;
}
public void AddBindingParameters(ServiceEndpoint endpoint, System.ServiceModel.Channels.BindingParameterCollection bindingParameters)
{
}
public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime)
{
clientRuntime.MessageInspectors.Add(this);
}
public void ApplyDispatchBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.EndpointDispatcher endpointDispatcher)
{
}
public void Validate(ServiceEndpoint endpoint)
{
}
public void AfterReceiveReply(ref Message reply, object correlationState)
{
}
public object BeforeSendRequest(ref Message request, IClientChannel channel)
{
request.Headers.To = ManualAddress;
HttpRequestMessageProperty property = new HttpRequestMessageProperty();
property.Method = Method;
property.SuppressEntityBody = true;
request.Properties.Add(HttpRequestMessageProperty.Name, property);
return request;
}
}
}
WebManualAddressingBehaviorExtensionElement.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel.Description;
using System.ServiceModel.Dispatcher;
using System.ServiceModel.Channels;
using System.ServiceModel;
using System.ServiceModel.Configuration;
using System.Configuration;
namespace Logue.Library.WebManualAddressingBehavior
{
public class WebManualAddressingBehaviorExtensionElement : BehaviorExtensionElement
{
//Constructor to create instance of endpoint behavior and initialize with two property values.
protected override object CreateBehavior()
{
return new WebManualAddressingBehavior(Method, ManualAddress);
}
public override Type BehaviorType
{
//Return configuration element type to be used in the behavior.
get
{
return typeof(WebManualAddressingBehavior);
}
}
[ConfigurationProperty("Method", DefaultValue = "GET", IsRequired = true)]
public string Method
{
get
{
return (string)base["Method"];
}
set { base["Method"] = value; }
}
[ConfigurationProperty("ManualAddress", DefaultValue = "", IsRequired = true)]
public Uri ManualAddress
{
get
{
return (Uri)base["ManualAddress"];
}
set { base["ManualAddress"] = value; }
}
//Copies the content of the specified configuration element to this configuration element
public override void CopyFrom(ServiceModelExtensionElement extFrom)
{
base.CopyFrom(extFrom);
WebManualAddressingBehaviorExtensionElement element = (WebManualAddressingBehaviorExtensionElement)extFrom;
Method = element.Method;
}
//Represents a collection of configuration-element properties
private ConfigurationPropertyCollection _properties;
/// Both properties are returned as a collection.
protected override ConfigurationPropertyCollection Properties
{
get
{
if (_properties == null)
{
_properties = new ConfigurationPropertyCollection();
_properties.Add(new ConfigurationProperty("Method", typeof(string), "", ConfigurationPropertyOptions.IsRequired));
_properties.Add(new ConfigurationProperty("ManualAddress", typeof(Uri), "", ConfigurationPropertyOptions.IsRequired));
}
return _properties;
}
}
}
}
You need to GAC this behavior assembly and modify both 32-bit and 64-bit machine.configs, in the following paths: “%WINDIR%Microsoft.NETFrameworkv4.0.30319Configmachine.config” and “%WINDIR%Microsoft.NETFramework64v4.0.30319Configmachine.config”.
In the system.serviceModel/extensions/behaviorExtensions section, add the following line:
<add name="webManualAddressingBehavior" type="Logue.Library.WebManualAddressingBehavior.WebManualAddressingBehaviorExtensionElement, Logue.Library.WebManualAddressingBehavior, Version=1.0.0.0, Culture=neutral, PublicKeyToken=be30eb01119b89a8" />
And then, you should be able to add it to the send port configuration, so you can set the method and the address:

When configured like this, an error on server side will generate an exception on Biztalk send port as expected, like this:
The adapter failed to transmit message going to send port "SampleSendPort" with URL "http://localhost/SampleSite". It will be retransmitted after the retry interval specified for this Send Port. Details:"System.ServiceModel.CommunicationException: Internal Server Error
Downloads:
WebManualAddressingBehavior Source Code (74)
WebManualAddressingBehavior Binaries (53)
