iT Synergy Blogs

Growing Innovation - Soluciones a problemas reales

  • Facebook
  • Instagram
  • LinkedIn
  • Phone
  • Twitter
  • YouTube

Copyright © 2025 · iT Synergy·

Exponer un servicio usando el Relay del bus de servicios de Windows Azure
Exponer un servicio usando el Relay del bus de servicios de Windows Azure avatar

August 21, 2013 By Diana Paola Padilla Beltrán Leave a Comment

Prerequisitos:

  1. Tener creado un service bus en Windows Azure y conocer las credenciales de autenticación a este bus de servicio, nuestro bus se llama sbtestrelay:

1_createServicebus

2.  Luego seleccionar CONNECTION INFORMATION     del menú inferior para obtener las credenciales de autenticación al bus de servicios creado:

3_credentials

 

3. Copiar en un block de notas el default issuer y el Default Key ya que de aquí en adelante necesitaremos de estas credenciales.

 

En la Solución de Visual Studio del Servicio:

4. Para exponer un servicio en el bus de servicio de Windows Azure se requiere incluir a nuestra solución de visual studio, el paquete con el que trabaja Windows Azure Service Bus:

4.1.  Para instalar este paquete puede seguir los pasos de la siguiente página:

http://www.nuget.org/packages/WindowsAzure.ServiceBus/

Una vez adicionado este paquete al proyecto, en el archivo de configuración debe aparecer un tag de extensiones como la siguiente:

 

<extensions>
      <!– In this extension section we are introducing all known service bus extensions. User can remove the ones they don’t need. –>
      <behaviorExtensions>
        <addname=“connectionStatusBehavior“type=“Microsoft.ServiceBus.Configuration.ConnectionStatusElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35“ />
        <addname=“transportClientEndpointBehavior“type=“Microsoft.ServiceBus.Configuration.TransportClientEndpointBehaviorElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35“ />
        <addname=“serviceRegistrySettings“type=“Microsoft.ServiceBus.Configuration.ServiceRegistrySettingsElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35“ />
      </behaviorExtensions>
      <bindingElementExtensions>
        <addname=“netMessagingTransport“type=“Microsoft.ServiceBus.Messaging.Configuration.NetMessagingTransportExtensionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35“ />
        <addname=“tcpRelayTransport“type=“Microsoft.ServiceBus.Configuration.TcpRelayTransportElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35“ />
        <addname=“httpRelayTransport“type=“Microsoft.ServiceBus.Configuration.HttpRelayTransportElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35“ />
        <addname=“httpsRelayTransport“type=“Microsoft.ServiceBus.Configuration.HttpsRelayTransportElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35“ />
        <addname=“onewayRelayTransport“type=“Microsoft.ServiceBus.Configuration.RelayedOnewayTransportElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35“ />
      </bindingElementExtensions>
      <bindingExtensions>
        <addname=“basicHttpRelayBinding“type=“Microsoft.ServiceBus.Configuration.BasicHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35“ />
        <addname=“webHttpRelayBinding“type=“Microsoft.ServiceBus.Configuration.WebHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35“ />
        <addname=“ws2007HttpRelayBinding“type=“Microsoft.ServiceBus.Configuration.WS2007HttpRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35“ />
        <addname=“netTcpRelayBinding“type=“Microsoft.ServiceBus.Configuration.NetTcpRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35“ />
        <addname=“netOnewayRelayBinding“type=“Microsoft.ServiceBus.Configuration.NetOnewayRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35“ />
        <addname=“netEventRelayBinding“type=“Microsoft.ServiceBus.Configuration.NetEventRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35“ />
        <addname=“netMessagingBinding“type=“Microsoft.ServiceBus.Messaging.Configuration.NetMessagingBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35“ />
      </bindingExtensions>
    </extensions>

Configurar el web Config del Servicio

5. Es necesario realizar la siguiente configuración en el web config del servicio:

5.1. Ubicar los tags de Bindings <bindings></bindings> y dentro de estos tags incluir el siguiente binding:

<basicHttpRelayBinding>
        <bindingname=“NombreBinding“>
          <securitymode=“None“relayClientAuthenticationType=“None“ />
        </binding> </basicHttpRelayBinding>
    </bindings>

 

Donde,

<NombreBinding>. Es el nombre que usted le quiere asignar al binding.

Para nuestro binding de ejemplo, tendriamos lo siguiente:

<basicHttpRelayBinding>          
          <bindingname=“customBinding“>
            <securitymode=“None“relayClientAuthenticationType=“None“ />
          </binding>
      </basicHttpRelayBinding>

 

5.2. Dentro de los tags  del servicio correspondiente <service name=”NombreServicio” behaviorConfiguration=”ServiceBehaviour”> </service> , incluir el siguiente endpoint:

 

<endpointname=“NombreEndpoint“
            contract=“Namespace.InterfazDelServicio“
            binding=“TipoBinding“
            bindingConfiguration=“NombreBindingConfiguration“
            behaviorConfiguration=“NombreBehaviorConfigurationEndpoint“
            address=“http://NamespaceServiceBus.servicebus.windows.net/NombreServicioenRelay/“ />

Donde:

<NombreEndpoint>. Es el nombre con el cual se identifica el servicio.

<Namespace.InterfazDelServicio>. Nombre del contrato del servicio

<TipoBinding>. El tipo de binding que se quiere implementar. Para este ejemplo usaremos basicHttpRelayBinding

<NombreBindingConfiguration>. Es el nombre que se le asigno al binding en el punto anterior (5.1)

<NombreBehaviorConfigurationEndpoint>. Es el nombre del Behavior que se asigno. Para este ejemplo usaremos sharedSecretClientCredentials

<NamespaceServiceBus>. Es el nombre del namespace del service bus, creado en el punto 1 de los prerrequisitos que para nuestro caso sería sbtestrelay.

<NombreServicioenRelay>. Nombre con el cual se va identificar el servicio expuesto en relay, para este ejemplo sería ServicioPruebasRelay.

 

Finalmente para este ejemplo el endpoint qudaría de la siguiente manera:

 

<servicename=“TestWCF.WCFServiceTest“behaviorConfiguration=“ServiceBehaviour“>
          <endpointname=“BasicHttpRelayBinding“
                    contract=“TestWCF.IWCFServiceTest“
                    binding=“basicHttpRelayBinding“
                    bindingConfiguration=“customBinding“
                    behaviorConfiguration=“sharedSecretClientCredentials“
                    address=“http://sbtestrelay.servicebus.windows.net/ServicioPruebasRelay/“ />
        </service>

 

Con la inclusión de este endpoint se expondrá nuestro servicio  en el relay del bus de Servicios.

 

5.3. Dentro de los tags <endpointBehaviors> </endpointBehaviors>  incluir las siguientes líneas de código.

 

<behaviorname=“NombreBehaviorEndpoint“>
          <transportClientEndpointBehavior>
            <tokenProvider>
              <sharedSecretissuerName=“NombreUsuariosb“issuerSecret=“Clavesb“ />
            </tokenProvider>
          </transportClientEndpointBehavior>
        </behavior>

Donde:

<NombreBehaviorEndpoint>. Nombre del behavior para este ejemplo usaremos sharedSecretClientCredentials

<NombreUsuariosb>. Usuario (Default Issuer) del service bus obtenido en el punto 3 de los prerrequisitos. Para nuestro caso sería owner

<Clavesb>. Clave (Default key ) del services bus obtenido en el punto 3 de los prerrequisitos. Para nuestro caso seria XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.

Con este paso lo que se pretende es autenticación frente al bus de Servicios de azure para poder exponer nuestro servicio en el Relay.

Nuestro behavior quedaria de la siguiente manera:

 

<behaviorname=“sharedSecretClientCredentials“>
          <transportClientEndpointBehavior>
            <tokenProvider>
              <sharedSecretissuerName=“owner“issuerSecret=“XXXXXXXXXXXXXXXXXXXXXXXX“ />
            </tokenProvider>
          </transportClientEndpointBehavior>
        </behavior>

 

Y asi de esta manera nuestro servicio quedará expuesto en el bus de servicio de Windows Azure

 

Verificar si el servicio está expuesto en el Relay.

Cuando el servicio esta ejecutándose en el IIS automanticamente en Windows Azure en el ítem service Bus Aparecerá el service bus creado en el punto 1 (sbtestrelay) y al seleccionar este bus de servicio se desplegará un menú en el panel derecho en la parte superior que contiene:

All, Queques, Topics, Relays, Notifications, Configure

Seleccionar el item Relays y allí aparecerá nuestro servicio (ServicioPruebasRelay) expuesto en el Relay del Bus de servicio, como lo muestra la siguiente pantalla:

4_creadoServiceBus

Filed Under: Azure, BizTalk Services, Cloud Tagged With: Exponer Servicio, Relay, Service Bus

Big Data con HDInsight Server
Big Data con HDInsight Server avatar

June 21, 2013 By Bernardo Enrique Cardales Acuña Leave a Comment

Antes que nada repasemos unos conceptos necesarios para llevar a cabo el ejercicio.

Big data: En términos generales es analizar grandes volúmenes de información semi – estructurada y no estructurada de un tema en cuestión, para apoyar la toma de decisiones. Los datos pueden logs de servidores, clic de usuarios de un determinado sitio, registro de llamadas. etc.

Apache Hadoop: Framework que permite el procesamiento distribuido de grandes volúmenes de datos a través de clústeres de computadores.

HDInsight: Herramienta que utiliza Apache Hadoop para hacer “big data” en el mundo Microsoft, se puede utilizar en la nube o en un servidor on-premise.

MapReduce: Parte de la plataforma de Hadoop, encargado de gestionar tareas, errores y reintentos.

Microsoft .NET SDK For Hadoop: librerías que permiten desarrollar aplicaciones Hadoop basadas en código .NET.

Para mayor información recomiendo los siguientes links:

http://hadoop.apache.org/

https://hadoopsdk.codeplex.com/

http://www.windowsazure.com/en-us/manage/services/hdinsight/?fb=es-es

 

Para el ejercicio utilizaremos la versión standalone de HDInsight.

Si tienen inconvenientes con la instalación les recomiendo este link: http://marktab.net/datamining/2012/10/31/install-microsoft-hdinsight-server-hadoop-windows-8-professional/

Escenario: Necesito conocer la información sobre el registro de eventos de la maquina (Event Viewer).

Para ello guardo todos los eventos en un archivo de texto (.txt) en la ruta C:\temp con el nombre events_log.txt

clip_image001

Creamos un proyecto en Visual Studio de tipo ClassLibrary con el nombre de CounterEvents.

En Visual Studio TOOLS -> Library Package Manager -> Package Manager Console

En la consola escribir lo siguiente

PM> install-package Microsoft.Hadoop.MapReduce

Luego de instalar las librerías comenzamos a desarrollar.

Creamos una clase CounterEventsJobs y escribimos

clip_image002

Creamos una nueva clase encargada de recolectar los tipos de eventos del archivo

clip_image003

En la siguiente clase se suman todas las concidencias de cada uno de los eventos

image

Para hacer seguimiento y pruebas del desarrollo creamos un nuevo proyecto de tipo consola y utilizamos la clase StreamingUnit la cual permite la ejecución de pruebas unitarias para este tipo de proyecto.

image

Luego de una prueba exitosa se abre la consola de windows y escribimos los siguientes comandos

prompt> hadoop fs – mkdir In (Directorio de salida)

prompt> hadoop fs – mkdir Out (Directorio de entrada)

prompt> hadoop fs – mkdir ls  (Ver directorios)

Utilizados para crear el directorios de entrada y el directorio donde el proceso va a colocar los resultados.

Subimos el archivo a la plataforma en el directorio de entrada previamente creado (In)

clip_image005

y comprobamos que efectivamente el archivo haya subido en la siguiente ruta http://localhost:50070/dfshealth.jsp

Vamos al explorador de archivos haciendo clic en la opción Browse the filesystem y buscando el archivo en la ruta donde se creó el directorio In

clip_image006

Verificamos que exista el directorio Out creado anteriormente

clip_image001[7]

Abrimos la consola de Windows, vamos a la ruta donde se encuentra el assembly generado del proyecto CounterWords.dll y escribimos el comando para ejecutarlo

prompt> .\mrlib\mrrunner -dll CounterWords.dll

clip_image003[5]

Por ultimo en el navegador, vemos que el archivo ha sido creado con la información requerida.

clip_image004[5]

Filed Under: .NET, Azure, BigData, Cloud

Create a complete automation backup plan for your wordpress infrastructure (on the cloud)
Create a complete automation backup plan for your wordpress infrastructure (on the cloud) avatar

October 28, 2011 By Juan Camilo Zapata Montúfar Leave a Comment

If you manage a standard wordpress infrastructure ,where you have an installation of a wordpress blog  and you have two layers separated , the database layer  (in my case mysql) on the database server , and other layer for the presentation (web server) that stores the images uploaded , the themes , and the scripts , you should be aware of the backup process on these two separate layers.

Backup Database file on the database server

There is an easy way and the one i recommend , and is by using the wp-db-backup plugin that you can find here , this plugin actually make a scheduled backup of your wordpress database , you chose monthy , weekly or dayly , also you can chose the backup to be sended by mail witch is very helpful.

The problem with this configuration is that you only have the backup of the database , and the database is not everything concerning wordpress contents, you should also backup the pictures of your blogs , the themes , the uploaded files and adittional scripts.

There is already a workaround to backup ALL your content on the cloud using Amazon S3 services on site http://www.wordpressbackup.org/ which is good but you have to pay for the S3 services processing.

Combine wp-dbbackup plugin + Dropbox cloud services + Windows Task Scheduler

A free alternative i propose is by using the wp-dbbackup plugin along with the DropBox API.

For that i created a c# application(that you can download below) that do the follwing:

1.Zip the contents of the wordpress Images (optionally i can especify the scritps folder but my interest relies only on the images folder for now).

2.Using DropBox API with the SharpBox libraries and a DeveloperKey (that you can obtain here  ) and upload the zipped file to my free DropBox account.

3.Create a Task on the Task scheduler of Windows  to execute the program every week.

You should note that i did not mentioned  wp-dbplugin here , well,  that is because the wp-dbplugin just works nice , and i will “improve” this solution by adding the C# program that backups the images folder of  the wordpress webserver content.

This solution is free and is automated so you have an easy way to backup your wordpress solution easily.

Limitations

Because DropBox is free it gives you 2gb of free space , making a weekly backup of your wordpress images folder can fill that space very quickly . You should check weekly your DropBox backups and delete old backups to prevent getting out of space.

You can download the source code below:

WpZipToDropBox

Filed Under: Cloud, DropBox, SharpBox, Windows Scheduler Tagged With: Backup, C#, Cloud, DropBox, DropBox API, SharpBox, Windows, Wordpress, wordpress backup, wordpress images backup, wordpress on the cloud, wordpress to dropbox, WP-db-Backup

Team


Marco
Antonio Hernández

Jaime
Alonso Páez

Luis
Carlos Bernal

Ana
María Orozco

Juan
Camilo Zapata

Carlos
Alberto Rueda

Sonia
Elizabeth Soriano

Diana
Díaz Grijalba

Bernardo
Enrique Cardales

Alexandra
Bravo Restrepo

Juan
Alberto Vélez

Diana
Paola Padilla

Jhon
Jairo Rodriguez

Yully
Arias Castillo

Carlos
Andrés Vélez

Brayan
Ruiz

Jesús
Javier Hernández

Alejandro
Garcia Forero

Gustavo
Adolfo Echeverry

Josué
Leonardo Bohórquez

Oscar
Alberto Urrea

Odahir
Rolando Salcedo

Jimmy
Quejada Meneses

Natalia
Zartha Suárez

Mario
Andrés Cortés

Eric
Yovanny Martinez

Carolina
Torres Rodríguez

Juan
Mauricio García

Tag Cloud

.NET (9) 940px (1) Analysis Services mdx (1) An attempt was made to load a program with an incorrect format. (1) ASP.NET MVC (1) Azure (3) Backup (1) BAM (7) BAM API (1) BAMTraceException (2) BI (3) BizTalk (24) Business Intelligence (6) C# (2) caracteristicas de publicacion (2) Content Editor (3) ESB (15) ESB Toolkit (3) General (4) habilitar caracteristicas (3) indexes (2) Integration Services (2) Master Page (3) MDX (2) MSE (11) net.tcp (2) Office 365 (2) Oracle (2) Performance Point (2) Public Website (2) Receive Location (2) SDK (2) Servicio Web (2) Sharepoint 2010 (2) SharePoint 2013 (4) SharePoint Online (2) SOA (8) Soap Fault (2) Sort Months MDX (2) SQL Server (2) Visual (2) Visual Studio 2010 (2) WCF (19) Windows (3) Windows 8 (17)

Categories

  • .NET (33)
  • Analysis Services (1)
  • ASP.NET MVC (2)
  • Azure (7)
  • BAM (9)
  • BAM PrimaryImport (3)
  • BigData (1)
  • BizTalk (77)
  • BizTalk 2010 configurations (57)
  • BizTalk Application (60)
  • BizTalk Services (13)
  • Business Intelligence (4)
  • Cloud (3)
  • CMD (1)
  • CodeSmith – NetTiers (2)
  • CommandPrompt (1)
  • CRM OptionSet mapping component (1)
  • Desarrollo de software (6)
  • develop (6)
  • developers (3)
  • DropBox (1)
  • Dynamics (1)
  • Enterprise Architect (1)
  • Entity Framework (1)
  • Errores BizTalk (2)
  • ESB (27)
  • ETL (1)
  • Event Viewer (1)
  • Excel Services (1)
  • Foreach loop container (1)
  • General (4)
  • Gerencia de Proyectos (2)
  • Google (1)
  • Grouped Slices (1)
  • Human Talent (1)
  • IIS (4)
  • Integración (6)
  • Integration Services (3)
  • KingswaySoft (1)
  • Lync (1)
  • MSE (13)
  • Office 365 (2)
  • Oracle Data Adapter (2)
  • Performance Point (4)
  • Picklist (1)
  • Pivot Table (1)
  • Procesos (1)
  • Pruebas (1)
  • Public Website (2)
  • Reports (1)
  • SCRUM (1)
  • SDK (2)
  • SEO (1)
  • Servicios (2)
  • Sharepoint (9)
  • SharePoint 2010 (10)
  • SharePoint 2013 (4)
  • SharePoint Online (2)
  • SharpBox (1)
  • Shortcuts (1)
  • Sin categoría (1)
  • SOA (50)
  • SQL (5)
  • SQL Server (3)
  • SQL Server Management Studio (1)
  • SSIS (3)
  • SSL (1)
  • SSO (1)
  • Tracking Profile Editor (2)
  • Twitter (1)
  • Uncategorized (1)
  • Virtual Network (2)
  • Visual Studio 11 (1)
  • Visual Studio 2010 (2)
  • Visual Studio Online (1)
  • VMware (2)
  • WCF (24)
  • Web (1)
  • Web Api (1)
  • Windows (5)
  • Windows 8 (11)
  • Windows Azure (2)
  • Windows Live Write (1)
  • Windows Phone (7)
  • Windows Phone 8 (1)
  • Windows Scheduler (1)
  • windows8 (2)
  • WindowsRT (3)
  • WP7 SDK (1)

Manage

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org