BizTalk Server futures-Presentations from TechEd North America

I have already relayed this information to so many, and given the links to more, that I though I’d put them up here for easy access. There is much and more to be written about the content, but I’ll settle for this. Information has been available around BizTalk Server 2010 R2 for some time, but it got much more real and saw some things unveiled not previously mentioned or detailed. In short:

  • There is innovation being done with BizTalk
  • The next version of BizTalk is currently named BizTalk Server 2010 R2
  • It will be released 6 months after Windows 8, with CTP in July and Beta in Oct
    Since Release Preview (of Win 8) was delivered in end of May Windows 8 RTM shouldn’t be far away.
  • There will be BizTalk Server delivered On-Premise, as PaaS and IaaS
  • Watch the videos from TechEd North America below to learn more.

Application Integration Futures: The Road Map and What's Next on Windows Azure: Video Slides

Building Integration Solutions Using Microsoft BizTalk On-Premises and on Windows Azure: Video Slides

Blog Post by: Johan Hedberg

BizTalk and Windows Azure Service Bus as Relay

Recently, I presented a webinar “Secure Integration Messaging with BizTalk and Windows Azure Service Bus (formerly known as AppFabric Service Bus). The webinar and slide deck and be viewed here.
I’d like to take some time and walk through creating the solution. In this webinar, I demonstrated how to process inbound orders from external trading partners […]
Blog Post by: Stan Kennedy

256 Windows Azure Worker Roles, Windows Kinect and a 90’s Text-Based Ray-Tracer

For a couple of years I have been demoing a simple render farm hosted in Windows Azure using worker roles and the Azure Storage service. At the start of the presentation I deploy an Azure application that uses 16 worker roles to render a 1,500 frame 3D ray-traced animation. At the end of the presentation, when the animation was complete, I would play the animation delete the Azure deployment. The standing joke with the audience was that it was that it was a “$2 demo”, as the compute charges for running the 16 instances for an hour was $1.92, factor in the bandwidth charges and it’s a couple of dollars. The point of the demo is that it highlights one of the great benefits of cloud computing, you pay for what you use, and if you need massive compute power for a short period of time using Windows Azure can work out very cost effective.

The “$2 demo” was great for presenting at user groups and conferences in that it could be deployed to Azure, used to render an animation, and then removed in a one hour session. I have always had the idea of doing something a bit more impressive with the demo, and scaling it from a “$2 demo” to a “$30 demo”. The challenge was to create a visually appealing animation in high definition format and keep the demo time down to one hour. This article will take a run through how I achieved this.

Ray Tracing

Ray tracing, a technique for generating high quality photorealistic images, gained popularity in the 90’s with companies like Pixar creating feature length computer animations, and also the emergence of shareware text-based ray tracers that could run on a home PC. In order to render a ray traced image, the ray of light that would pass from the view point must be tracked until it intersects with an object. At the intersection, the color, reflectiveness, transparency, and refractive index of the object are used to calculate if the ray will be reflected or refracted. Each pixel may require thousands of calculations to determine what color it will be in the rendered image.

Pin-Board Toys

Having very little artistic talent and a basic understanding of maths I decided to focus on an animation that could be modeled fairly easily and would look visually impressive. I’ve always liked the pin-board desktop toys that become popular in the 80’s and when I was working as a 3D animator back in the 90’s I always had the idea of creating a 3D ray-traced animation of a pin-board, but never found the energy to do it. Even if I had a go at it, the render time to produce an animation that would look respectable on a 486 would have been measured in months.

PolyRay

Back in 1995 I landed my first real job, after spending three years being a beach-ski-climbing-paragliding-bum, and was employed to create 3D ray-traced animations for a CD-ROM that school kids would use to learn physics. I had got into the strange and wonderful world of text-based ray tracing, and was using a shareware ray-tracer called PolyRay. PolyRay takes a text file describing a scene as input and, after a few hours processing on a 486, produced a high quality ray-traced image.

The following is an example of a basic PolyRay scene file.

background Midnight_Blue

static define matte surface { ambient 0.1 diffuse 0.7 }

define matte_white texture { matte { color white } }

define matte_black texture { matte { color dark_slate_gray } }

define position_cylindrical 3

define lookup_sawtooth 1

define light_wood <0.6, 0.24, 0.1>

define median_wood <0.3, 0.12, 0.03>

define dark_wood <0.05, 0.01, 0.005>

define wooden texture { noise surface { ambient 0.2 diffuse 0.7 specular white, 0.5 microfacet Reitz 10 position_fn position_cylindrical position_scale 1 lookup_fn lookup_sawtooth octaves 1 turbulence 1 color_map( [0.0, 0.2, light_wood, light_wood] [0.2, 0.3, light_wood, median_wood] [0.3, 0.4, median_wood, light_wood] [0.4, 0.7, light_wood, light_wood] [0.7, 0.8, light_wood, median_wood] [0.8, 0.9, median_wood, light_wood] [0.9, 1.0, light_wood, dark_wood]) } }

define glass texture { surface { ambient 0 diffuse 0 specular 0.2 reflection white, 0.1 transmission white, 1, 1.5 }}

define shiny surface { ambient 0.1 diffuse 0.6 specular white, 0.6 microfacet Phong 7 }

define steely_blue texture { shiny { color black } }

define chrome texture { surface { color white ambient 0.0 diffuse 0.2 specular 0.4 microfacet Phong 10 reflection 0.8 } }

viewpoint

{

from <4.000, -1.000, 1.000> at <0.000, 0.000, 0.000> up <0, 1, 0> angle 60

resolution 640, 480 aspect 1.6 image_format 0

}

light <-10, 30, 20>

light <-10, 30, -20>

object { disc <0, -2, 0>, <0, 1, 0>, 30 wooden }

object { sphere <0.000, 0.000, 0.000>, 1.00 chrome }

object { cylinder <0.000, 0.000, 0.000>, <0.000, 0.000, -4.000>, 0.50 chrome }

After setting up the background and defining colors and textures, the viewpoint is specified. The “camera” is located at a point in 3D space, and it looks towards another point. The angle, image resolution, and aspect ratio are specified. Two lights are present in the image at defined coordinates.

The three objects in the image are a wooden disc to represent a table top, and a sphere and cylinder that intersect to form a pin that will be used for the pin board toy in the final animation. When the image is rendered, the following image is produced.

The pins are modeled with a chrome surface, so they reflect the environment around them. Note that the scale of the pin shaft is not correct, this will be fixed later.

Modeling the Pin Board

The frame of the pin-board is made up of three boxes, and six cylinders, the front box is modeled using a clear, slightly reflective solid, with the same refractive index of glass. The other shapes are modeled as metal.

object { box <-5.5, -1.5, 1>, <5.5, 5.5, 1.2> glass }

object { box <-5.5, -1.5, -0.04>, <5.5, 5.5, -0.09> steely_blue }

object { box <-5.5, -1.5, -0.52>, <5.5, 5.5, -0.59> steely_blue }

object { cylinder <-5.2, -1.2, 1.4>, <-5.2, -1.2, -0.74>, 0.2 steely_blue }

object { cylinder <5.2, -1.2, 1.4>, <5.2, -1.2, -0.74>, 0.2 steely_blue }

object { cylinder <-5.2, 5.2, 1.4>, <-5.2, 5.2, -0.74>, 0.2 steely_blue }

object { cylinder <5.2, 5.2, 1.4>, <5.2, 5.2, -0.74>, 0.2 steely_blue }

object { cylinder <0, -1.2, 1.4>, <0, -1.2, -0.74>, 0.2 steely_blue }

object { cylinder <0, 5.2, 1.4>, <0, 5.2, -0.74>, 0.2 steely_blue }

In order to create the matrix of pins that make up the pin board I used a basic console application with a few nested loops to create two intersecting matrixes of pins, which models the layout used in the pin boards. The resulting image is shown below.

The pin board contains 11,481 pins, with the scene file containing 23,709 lines of code. For the complete animation 2,000 scene files will be created, which is over 47 million lines of code.

Each pin in the pin-board will slide out a specific distance when an object is pressed into the back of the board. This is easily modeled by setting the Z coordinate of the pin to a specific value. In order to set all of the pins in the pin-board to the correct position, a bitmap image can be used. The position of the pin can be set based on the color of the pixel at the appropriate position in the image.

When the Windows Azure logo is used to set the Z coordinate of the pins, the following image is generated.

The challenge now was to make a cool animation. The Azure Logo is fine, but it is static. Using a normal video to animate the pins would not work; the colors in the video would not be the same as the depth of the objects from the camera. In order to simulate the pin board accurately a series of frames from a depth camera could be used.

Windows Kinect

The Kenect controllers for the X-Box 360 and Windows feature a depth camera. The Kinect SDK for Windows provides a programming interface for Kenect, providing easy access for .NET developers to the Kinect sensors. The Kinect Explorer provided with the Kinect SDK is a great starting point for exploring Kinect from a developers perspective. Both the X-Box 360 Kinect and the Windows Kinect will work with the Kinect SDK, the Windows Kinect is required for commercial applications, but the X-Box Kinect can be used for hobby projects. The Windows Kinect has the advantage of providing a mode to allow depth capture with objects closer to the camera, which makes for a more accurate depth image for setting the pin positions.

Creating a Depth Field Animation

The depth field animation used to set the positions of the pin in the pin board was created using a modified version of the Kinect Explorer sample application. In order to simulate the pin board accurately, a small section of the depth range from the depth sensor will be used. Any part of the object in front of the depth range will result in a white pixel; anything behind the depth range will be black. Within the depth range the pixels in the image will be set to RGB values from 0,0,0 to 255,255,255.

A screen shot of the modified Kinect Explorer application is shown below.

The Kinect Explorer sample application was modified to include slider controls that are used to set the depth range that forms the image from the depth stream. This allows the fine tuning of the depth image that is required for simulating the position of the pins in the pin board. The Kinect Explorer was also modified to record a series of images from the depth camera and save them as a sequence JPEG files that will be used to animate the pins in the animation the Start and Stop buttons are used to start and stop the image recording.

En example of one of the depth images is shown below.

Once a series of 2,000 depth images has been captured, the task of creating the animation can begin.

Rendering a Test Frame

In order to test the creation of frames and get an approximation of the time required to render each frame a test frame was rendered on-premise using PolyRay. The output of the rendering process is shown below.

The test frame contained 23,629 primitive shapes, most of which are the spheres and cylinders that are used for the 11,800 or so pins in the pin board. The 1280×720 image contains 921,600 pixels, but as anti-aliasing was used the number of rays that were calculated was 4,235,777, with 3,478,754,073 object boundaries checked. The test frame of the pin board with the depth field image applied is shown below.

The tracing time for the test frame was 4 minutes 27 seconds, which means rendering the2,000 frames in the animation would take over 148 hours, or a little over 6 days. Although this is much faster that an old 486, waiting almost a week to see the results of an animation would make it challenging for animators to create, view, and refine their animations. It would be much better if the animation could be rendered in less than one hour.

Windows Azure Worker Roles

The cost of creating an on-premise render farm to render animations increases in proportion to the number of servers. The table below shows the cost of servers for creating a render farm, assuming a cost of $500 per server.

Number of Servers

Cost

1

$500

16

$8,000

256

$128,000

As well as the cost of the servers, there would be additional costs for networking, racks etc. Hosting an environment of 256 servers on-premise would require a server room with cooling, and some pretty hefty power cabling.

The Windows Azure compute services provide worker roles, which are ideal for performing processor intensive compute tasks. With the scalability available in Windows Azure a job that takes 256 hours to complete could be perfumed using different numbers of worker roles. The time and cost of using 1, 16 or 256 worker roles is shown below.

Number of Worker Roles

Render Time

Cost

1

256 hours

$30.72

16

16 hours

$30.72

256

1 hour

$30.72

Using worker roles in Windows Azure provides the same cost for the 256 hour job, irrespective of the number of worker roles used. Provided the compute task can be broken down into many small units, and the worker role compute power can be used effectively, it makes sense to scale the application so that the task is completed quickly, making the results available in a timely fashion. The task of rendering 2,000 frames in an animation is one that can easily be broken down into 2,000 individual pieces, which can be performed by a number of worker roles.

Creating a Render Farm in Windows Azure

The architecture of the render farm is shown in the following diagram.

The render farm is a hybrid application with the following components:

%u00b7 On-Premise

o Windows Kinect – Used combined with the Kinect Explorer to create a stream of depth images.

o Animation Creator – This application uses the depth images from the Kinect sensor to create scene description files for PolyRay. These files are then uploaded to the jobs blob container, and job messages added to the jobs queue.

o Process Monitor – This application queries the role instance lifecycle table and displays statistics about the render farm environment and render process.

o Image Downloader – This application polls the image queue and downloads the rendered animation files once they are complete.

%u00b7 Windows Azure

o Azure Storage – Queues and blobs are used for the scene description files and completed frames. A table is used to store the statistics about the rendering environment.

The architecture of each worker role is shown below.

The worker role is configured to use local storage, which provides file storage on the worker role instance that can be use by the applications to render the image and transform the format of the image.

The service definition for the worker role with the local storage configuration highlighted is shown below.

<?xml version=”1.0″ encoding=”utf-8″?>

<ServiceDefinition name=”CloudRay” xmlns=”http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition”>

<WorkerRole name=”CloudRayWorkerRole” vmsize=”Small”>

<Imports>

</Imports>

<ConfigurationSettings>

<Setting name=”DataConnectionString” />

</ConfigurationSettings>

<LocalResources>

<LocalStorage name=RayFolder cleanOnRoleRecycle=true />

</LocalResources>

</WorkerRole>

</ServiceDefinition>

The two executable programs, PolyRay.exe and DTA.exe are included in the Azure project, with Copy Always set as the property. PolyRay will take the scene description file and render it to a Truevision TGA file. As the TGA format has not seen much use since the mid 90’s it is converted to a JPG image using Dave’s Targa Animator, another shareware application from the 90’s.

Each worker roll will use the following process to render the animation frames.

1. The worker process polls the job queue, if a job is available the scene description file is downloaded from blob storage to local storage.

2. PolyRay.exe is started in a process with the appropriate command line arguments to render the image as a TGA file.

3. DTA.exe is started in a process with the appropriate command line arguments convert the TGA file to a JPG file.

4. The JPG file is uploaded from local storage to the images blob container.

5. A message is placed on the images queue to indicate a new image is available for download.

6. The job message is deleted from the job queue.

7. The role instance lifecycle table is updated with statistics on the number of frames rendered by the worker role instance, and the CPU time used.

The code for this is shown below.

public override void Run()

{

// Set environment variables

string polyRayPath = Path.Combine(Environment.GetEnvironmentVariable(“RoleRoot”), PolyRayLocation);

string dtaPath = Path.Combine(Environment.GetEnvironmentVariable(“RoleRoot”), DTALocation);

LocalResource rayStorage = RoleEnvironment.GetLocalResource(“RayFolder”);

string localStorageRootPath = rayStorage.RootPath;

JobQueue jobQueue = new JobQueue(“renderjobs”);

JobQueue downloadQueue = new JobQueue(“renderimagedownloadjobs”);

CloudRayBlob sceneBlob = new CloudRayBlob(“scenes”);

CloudRayBlob imageBlob = new CloudRayBlob(“images”);

RoleLifecycleDataSource roleLifecycleDataSource = new RoleLifecycleDataSource();

Frames = 0;

while (true)

{

// Get the render job from the queue

CloudQueueMessage jobMsg = jobQueue.Get();

if (jobMsg != null)

{

// Get the file details

string sceneFile = jobMsg.AsString;

string tgaFile = sceneFile.Replace(“.pi”, “.tga”);

string jpgFile = sceneFile.Replace(“.pi”, “.jpg”);

string sceneFilePath = Path.Combine(localStorageRootPath, sceneFile);

string tgaFilePath = Path.Combine(localStorageRootPath, tgaFile);

string jpgFilePath = Path.Combine(localStorageRootPath, jpgFile);

// Copy the scene file to local storage

sceneBlob.DownloadFile(sceneFilePath);

// Run the ray tracer.

string polyrayArguments =

string.Format(“\”{0}\” -o \”{1}\” -a 2″, sceneFilePath, tgaFilePath);

Process polyRayProcess = new Process();

polyRayProcess.StartInfo.FileName =

Path.Combine(Environment.GetEnvironmentVariable(“RoleRoot”), polyRayPath);

polyRayProcess.StartInfo.Arguments = polyrayArguments;

polyRayProcess.Start();

polyRayProcess.WaitForExit();

// Convert the image

string dtaArguments =

string.Format(” {0} /FJ /P{1}”, tgaFilePath, Path.GetDirectoryName (jpgFilePath));

Process dtaProcess = new Process();

dtaProcess.StartInfo.FileName =

Path.Combine(Environment.GetEnvironmentVariable(“RoleRoot”), dtaPath);

dtaProcess.StartInfo.Arguments = dtaArguments;

dtaProcess.Start();

dtaProcess.WaitForExit();

// Upload the image to blob storage

imageBlob.UploadFile(jpgFilePath);

// Add a download job.

downloadQueue.Add(jpgFile);

// Delete the render job message

jobQueue.Delete(jobMsg);

Frames++;

}

else

{

Thread.Sleep(1000);

}

// Log the worker role activity.

roleLifecycleDataSource.Alive

(“CloudRayWorker”, RoleLifecycleDataSource.RoleLifecycleId, Frames);

}

}

Monitoring Worker Role Instance Lifecycle

In order to get more accurate statistics about the lifecycle of the worker role instances used to render the animation data was tracked in an Azure storage table. The following class was used to track the worker role lifecycles in Azure storage.

public class RoleLifecycle : TableServiceEntity

{

public string ServerName { get; set; }

public string Status { get; set; }

public DateTime StartTime { get; set; }

public DateTime EndTime { get; set; }

public long SecondsRunning { get; set; }

public DateTime LastActiveTime { get; set; }

public int Frames { get; set; }

public string Comment { get; set; }

public RoleLifecycle()

{

}

public RoleLifecycle(string roleName)

{

PartitionKey = roleName;

RowKey = Utils.GetAscendingRowKey();

Status = “Started”;

StartTime = DateTime.UtcNow;

LastActiveTime = StartTime;

EndTime = StartTime;

SecondsRunning = 0;

Frames = 0;

}

}

A new instance of this class is created and added to the storage table when the role starts. It is then updated each time the worker renders a frame to record the total number of frames rendered and the total processing time. These statistics are used be the monitoring application to determine the effectiveness of use of resources in the render farm.

Rendering the Animation

The Azure solution was deployed to Windows Azure with the service configuration set to 16 worker role instances. This allows for the application to be tested in the cloud environment, and the performance of the application determined. When I demo the application at conferences and user groups I often start with 16 instances, and then scale up the application to the full 256 instances. The configuration to run 16 instances is shown below.

<?xml version=”1.0″ encoding=”utf-8″?>

<ServiceConfiguration serviceName=”CloudRay” xmlns=”http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration” osFamily=”1″ osVersion=”*”>

<Role name=CloudRayWorkerRole>

<Instances count=16 />

<ConfigurationSettings>

<Setting name=”DataConnectionString”

value=”DefaultEndpointsProtocol=https;AccountName=cloudraydata;AccountKey=…” />

</ConfigurationSettings>

</Role>

</ServiceConfiguration>

About six minutes after deploying the application the first worker roles become active and start to render the first frames of the animation. The CloudRay Monitor application displays an icon for each worker role instance, with a number indicating the number of frames that the worker role has rendered. The statistics on the left show the number of active worker roles and statistics about the render process. The render time is the time since the first worker role became active; the CPU time is the total amount of processing time used by all worker role instances to render the frames.

Five minutes after the first worker role became active the last of the 16 worker roles activated. By this time the first seven worker roles had each rendered one frame of the animation.

With 16 worker roles u and running it can be seen that one hour and 45 minutes CPU time has been used to render 32 frames with a render time of just under 10 minutes.

At this rate it would take over 10 hours to render the 2,000 frames of the full animation. In order to complete the animation in under an hour more processing power will be required.

Scaling the render farm from 16 instances to 256 instances is easy using the new management portal. The slider is set to 256 instances, and the configuration saved. We do not need to re-deploy the application, and the 16 instances that are up and running will not be affected.

Alternatively, the configuration file for the Azure service could be modified to specify 256 instances.

<?xml version=”1.0″ encoding=”utf-8″?>

<ServiceConfiguration serviceName=”CloudRay” xmlns=”http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration” osFamily=”1″ osVersion=”*”>

<Role name=”CloudRayWorkerRole”>

<Instances count=256 />

<ConfigurationSettings>

<Setting name=”DataConnectionString”

value=”DefaultEndpointsProtocol=https;AccountName=cloudraydata;AccountKey=…” />

</ConfigurationSettings>

</Role>

</ServiceConfiguration>

Six minutes after the new configuration has been applied 75 new worker roles have activated and are processing their first frames.

Five minutes later the full configuration of 256 worker roles is up and running. We can see that the average rate of frame rendering has increased from 3 to 12 frames per minute, and that over 17 hours of CPU time has been utilized in 23 minutes. In this test the time to provision 140 worker roles was about 11 minutes, which works out at about one every five seconds.

We are now half way through the rendering, with 1,000 frames complete. This has utilized just under three days of CPU time in a little over 35 minutes.

The animation is now complete, with 2,000 frames rendered in a little over 52 minutes. The CPU time used by the 256 worker roles is 6 days, 7 hours and 22 minutes with an average frame rate of 38 frames per minute. The rendering of the last 1,000 frames took 16 minutes 27 seconds, which works out at a rendering rate of 60 frames per minute.

The frame counts in the server instances indicate that the use of a queue to distribute the workload has been very effective in distributing the load across the 256 worker role instances. The first 16 instances that were deployed first have rendered between 11 and 13 frames each, whilst the 240 instances that were added when the application was scaled have rendered between 6 and 9 frames each.

Completed Animation

I’ve uploaded the completed animation to YouTube, a low resolution preview is shown below.

Pin Board Animation Created using Windows Kinect and 256 Windows Azure Worker Roles

The animation can be viewed in 1280×720 resolution at the following link:

http://www.youtube.com/watch?v=n5jy6bvSxWc

Effective Use of Resources

According to the CloudRay monitor statistics the animation took 6 days, 7 hours and 22 minutes CPU to render, this works out at 152 hours of compute time, rounded up to the nearest hour. As the usage for the worker role instances are billed for the full hour, it may have been possible to render the animation using fewer than 256 worker roles. When deciding the optimal usage of resources, the time required to provision and start the worker roles must also be considered. In the demo I started with 16 worker roles, and then scaled the application to 256 worker roles. It would have been more optimal to start the application with maybe 200 worker roles, and utilized the full hour that I was being billed for. This would, however, have prevented showing the ease of scalability of the application.

The new management portal displays the CPU usage across the worker roles in the deployment.

The average CPU usage across all instances is 93.27%, with over 99% used when all the instances are up and running. This shows that the worker role resources are being used very effectively.

Grid Computing Scenarios

Although I am using this scenario for a hobby project, there are many scenarios where a large amount of compute power is required for a short period of time. Windows Azure provides a great platform for developing these types of grid computing applications, and can work out very cost effective.

%u00b7 Windows Azure can provide massive compute power, on demand, in a matter of minutes.

%u00b7 The use of queues to manage the load balancing of jobs between role instances is a simple and effective solution.

%u00b7 Using a cloud-computing platform like Windows Azure allows proof-of-concept scenarios to be tested and evaluated on a very low budget.

%u00b7 No charges for inbound data transfer makes the uploading of large data sets to Windows Azure Storage services cost effective. (Transaction charges still apply.)

Tips for using Windows Azure for Grid Computing Scenarios

I found the implementation of a render farm using Windows Azure a fairly simple scenario to implement. I was impressed by ease of scalability that Azure provides, and by the short time that the application took to scale from 16 to 256 worker role instances. In this case it was around 13 minutes, in other tests it took between 10 and 20 minutes.

The following tips may be useful when implementing a grid computing project in Windows Azure.

%u00b7 Using an Azure Storage queue to load-balance the units of work across multiple worker roles is simple and very effective. The design I have used in this scenario could easily scale to many thousands of worker role instances.

%u00b7 Windows Azure accounts are typically limited to 20 cores. If you need to use more than this, a call to support and a credit card check will be required.

%u00b7 Be aware of how the billing model works. You will be charged for worker role instances for the full clock our in which the instance is deployed. Schedule the workload to start just after the clock hour has started.

%u00b7 Monitor the utilization of the resources you are provisioning, ensure that you are not paying for worker roles that are idle.

%u00b7 If you are deploying third party applications to worker roles, you may well run into licensing issues. Purchasing software licenses on a per-processor basis when using hundreds of processors for a short time period would not be cost effective.

%u00b7 Third party software may also require installation onto the worker roles, which can be accomplished using start-up tasks. Bear in mind that adding a startup task and possible re-boot will add to the time required for the worker role instance to start and activate. An alternative may be to use a prepared VM and use VM roles.

%u00b7 Consider using the Windows Azure Autoscaling Application Block (WASABi) to autoscale the worker roles in your application. When using a large number of worker roles, the utilization must be carefully monitored, if the scaling algorithms are not optimal it could get very expensive!

Creating a new BizTalk machine from a sysprep image in Windows Azure Virtual Machines, and making it work

In its simplest single machine using default configuration BizTalk Server 2010 comes with a sample of how to use sysprep, that resides in the C:\Program Files (x86)\Microsoft BizTalk Server 2010\SDK\Samples\Admin\Sysprep folder. It uses an unattended installation answer file that among other things tells windows to run a number of scripts that updates the database, SSO, BAM etc, where references to the machine name exists. Full description of that “sample” is described here.

Windows Azure on the other hand does not (as far as I can figure out) support running sysprep and supplying an unattend file. The way to properly sysprep a Windows Server VHD running on Windows Azure Virtual Machines is described here. If developing a machine locally the same general steps apply.

The problem with this is that they clash, they mix like cream and lemon – not at all. (I am sure there are ways to combine these, but its not openly apparent how, but if someone knows feel free to Comment on that).

To make a BizTalk Server image created on Windows Azure fully usable we can run the scripts and commands that the unattended configuration would have. When running these scripts you need to know the name the computer had when sysprep was used and the image captured.

There are three steps to this:

  1. Update SQL Server User Groups
  2. Update SQL Server metadata
  3. Update BizTalk Server (including SSO and other components)

Update SQL Server User Groups

Simply rename the groups.

Updating SQL Server Metadata

The problem when logging on to SQL Server after the name change is that you no longer have access with the administrative account, Administrator, since this is really oldmachine\administrator. So you need another administrative account, ie SYSTEM to fix your login for you.

One way to run as system and do the things described for step 1 is to add a Scheduled Task. Set it to run as SYSTEM, since that account will be sysadmin in the database and set it to run a script that fixes the things necessary, ie:

REM UpdateSqlLogins.bat

SET oldcomputername=JEHBTS5
pushd %programfiles(x86)%\Microsoft BizTalk Server 2010\SDK\Samples\Admin\Sysprep\scripts

SqlCmd -s . -d master -A -Q "sp_dropserver %oldcomputername%" -o UpdateSQLLogins.log
SqlCmd -s . -d master -A -Q "sp_addserver %computername%, local" -o UpdateSQLLogins.log
SqlCmd -s . -d master -A -Q "drop login [%oldcomputername%\Administrator]" -o UpdateSQLLogins.log
SqlCmd -s . -d master -A -Q "create login [%computername%\Administrator] from windows" -o UpdateSQLLogins.log
REM SqlCmd -s . -d master -A -Q "EXEC sp_changedbowner [%computername%\Administrator]" -o UpdateSQLLogins.log
SqlCmd -s . -A -Q "EXEC sp_addsrvrolemember @loginame = N'%computername%\Administrator', @rolename = N'sysadmin'" -o UpdateSQLLogins.log

popd

Update BizTalk Server

As the start of the article mentions, Microsoft has briefly covered applying sysprep to a BizTalk Server machine, but since that procedure does not map to this we need to take a somewhat different approach.

  1. Update the file UpdateInfo.xml. In particular remove the <DeploymentUnit Name="Alert"> section, since I am not using BAM Alerts.
  2. Create a file called Replace.vbs and insert the following code.

    .csharpcode, .csharpcode pre
    {
    font-size: small;
    color: black;
    font-family: consolas, "Courier New", courier, monospace;
    background-color: #ffffff;
    /*white-space: pre;*/
    }
    .csharpcode pre { margin: 0em; }
    .csharpcode .rem { color: #008000; }
    .csharpcode .kwrd { color: #0000ff; }
    .csharpcode .str { color: #006080; }
    .csharpcode .op { color: #0000c0; }
    .csharpcode .preproc { color: #cc6633; }
    .csharpcode .asp { background-color: #ffff00; }
    .csharpcode .html { color: #800000; }
    .csharpcode .attr { color: #ff0000; }
    .csharpcode .alt
    {
    background-color: #f4f4f4;
    width: 100%;
    margin: 0em;
    }
    .csharpcode .lnum { color: #606060; }

    'Usage: Replace.vbs <text file to open> <string to be replaced> <string to replace it with>
    
    Dim sOutput, reader, readerStream, writer, writerStream, Wshell
    
    set WshShell = WScript.CreateObject("WScript.Shell")
    
    Set reader = CreateObject("Scripting.FileSystemObject")
    set readerStream = reader.OpenTextFile(WScript.Arguments(0), 1, , -2)
    
    sOutput = Replace(readerStream.ReadAll, WScript.Arguments(1), WScript.Arguments(2))
    sOutput = Replace(sOutput, UCase(WScript.Arguments(1)), WScript.Arguments(2))
    sOutput = Replace(sOutput, LCase(WScript.Arguments(1)), WScript.Arguments(2))
    
    readerStream.Close
    
    Set writer = CreateObject("Scripting.FileSystemObject")
    Set writerStream = writer.CreateTextFile(WScript.Arguments(0), true, False) ''Write the file in ASCII
    writerStream.Write(sOutput)
    writerStream.Close
  3. Create a file called BizTalkSysPrepRestore.bat and place the following code in it.

    REM BizTalkSysPrepRestore.bat
    
    REM SET /P oldcomputername=<test.txt
    SET oldcomputername=JEHBTS5
    pushd %programfiles(x86)%\Microsoft BizTalk Server 2010\SDK\Samples\Admin\Sysprep\scripts
    
    REM First run UpdateSQLLogins.bat. Once. To provision the account as Admin to be allowed to do the below.
    
    net stop BTSSvc$BizTalkServerApplication
    
    net stop RuleEngineUpdateService
    
    net stop ENTSSO
    
    cscript.exe "Replace.vbs" "UpdateInfo.xml" $(NEWCOMPUTERNAME) %computername%
    cscript.exe "Replace.vbs" "UpdateInfo.xml" $(OLDCOMPUTERNAME) %oldcomputername%
    cscript.exe "Replace.vbs" "UpdateInfo.xml" $(OLDCOMPUTERENAME) %oldcomputername%
    
    cscript.exe "UpdateRegistry.vbs" "UpdateInfo.xml" > "UpdateRegistry.log"
    cscript.exe "UpdateDatabase.vbs" "UpdateInfo.xml" > "UpdateSqlServerDatabase.log"
    cscript.exe "UpdateBAMDb.vbs" "UpdateInfo.xml" > "UpdateBAMDb.log"
    
    "UpdateSSO.cmd" > "SSO.log"
    
    REM Update path to SSOXXXX.bak or place in local folder with this name
    "%CommonProgramFiles%\Enterprise Single Sign-On\ssoconfig.exe -restoreSecret SSO.bak
    
    net stop SQLAgent$SQLEXPRESS
    net stop sqlserveragent
    
    net stop MSSQL$SQLEXPRESS
    net stop mssqlserver
    
    cscript.exe "Replace.vbs" "%programfiles(x86)%\Microsoft BizTalk Server 2010\Tracking\bm.exe.config" %oldcomputername% %computername%
    
    net start mssqlserver
    net start MSSQL$SQLEXPRESS
    
    net start sqlserveragent
    net start SQLAgent$SQLEXPRESS
    
    net start RuleEngineUpdateService
    
    net start BTSSvc$BizTalkServerApplication
    
    popd
    
    pause
  4. Run the BizTalkSysPrepRestore.bat as Administrator.
  5. Open SQL Server Management Studio and runt the following SQL script to update Agent jobs.

    USE [msdb]
    GO
    EXEC msdb.dbo.sp_update_job @job_name=N'Backup BizTalk Server (BizTalkMgmtDb)', @owner_login_name=N'sa'
    EXEC msdb.dbo.sp_update_job @job_name=N'CleanupBTFExpiredEntriesJob_BizTalkMgmtDb', @owner_login_name=N'sa'
    EXEC msdb.dbo.sp_update_job @job_name=N'DTA Purge and Archive (BizTalkDTADb)', @owner_login_name=N'sa'
    EXEC msdb.dbo.sp_update_job @job_name=N'MessageBox_DeadProcesses_Cleanup_BizTalkMsgBoxDb', @owner_login_name=N'sa'
    EXEC msdb.dbo.sp_update_job @job_name=N'MessageBox_Message_Cleanup_BizTalkMsgBoxDb', @owner_login_name=N'sa'
    EXEC msdb.dbo.sp_update_job @job_name=N'MessageBox_Message_ManageRefCountLog_BizTalkMsgBoxDb', @owner_login_name=N'sa'
    EXEC msdb.dbo.sp_update_job @job_name=N'MessageBox_Parts_Cleanup_BizTalkMsgBoxDb', @owner_login_name=N'sa'
    EXEC msdb.dbo.sp_update_job @job_name=N'MessageBox_UpdateStats_BizTalkMsgBoxDb', @owner_login_name=N'sa'
    EXEC msdb.dbo.sp_update_job @job_name=N'Monitor BizTalk Server (BizTalkMgmtDb)', @owner_login_name=N'sa'
    EXEC msdb.dbo.sp_update_job @job_name=N'Operations_OperateOnInstances_OnMaster_BizTalkMsgBoxDb', @owner_login_name=N'sa'
    EXEC msdb.dbo.sp_update_job @job_name=N'PurgeSubscriptionsJob_BizTalkMsgBoxDb', @owner_login_name=N'sa'
    EXEC msdb.dbo.sp_update_job @job_name=N'Rules_Database_Cleanup_BizTalkRuleEngineDb', @owner_login_name=N'sa'
    EXEC msdb.dbo.sp_update_job @job_name=N'TrackedMessages_Copy_BizTalkMsgBoxDb', @owner_login_name=N'sa'
    GO
  6. You should now be set to run BizTalk.

In Summary

I am sure there are better ways to do some of these things. This was a PoC of exactly this, and nothing else. I know there are ways to simplify and automate further. I am sure this is not the best possible solution, but it is one possible solution. It is also a work in progress. I do not have time to take it further right now, but I still wanted to release this post to perhaps help someone else along.

I have hardcoded the old computer name in these scripts, you need to replace that with whatever your original machines name was when you created the image.

There are a couple of things here where I have taken the easy road. All services are run by Administrator, which of course is an administrator. The same is a a member of the groups SSO Administrator, SSO Affiliate Administrator, BizTalk Server Application Users and BizTalk Server Administrator, as well as being assigned sysadmin in the scripts above. So not the ideal best practice security there, and it was outside my scope to make it that.

For the moment, you can also create an image from a virtual machine in Windows Azure without using sysprep. This will work as well, but it’s a quirk, not really what we want here for several reasons.

Since the sysprep support for BizTalk Server is a SAMPLE, I am not sure how “supported” using sysprep on BizTalk Server really is at the moment. The team will have to solve this on their way to offering BizTalk Server as stock images on Windows Azure Virtual Machines, but we are not there yet.

SQL Server does not officially support sysprep in this manner. Instead another procedure is detailed, which includes not fully installing SQL at all before you sysprep. This does not seem to have changed with SQL Server 2012. It will be interesting to see how the team works around this limitation for BizTalk Server 2010 R2. I am guessing that is what the “provisioning” stage that virtual machines go through is for – finalizing installations.

Perhaps not really installing SQL, and following that products offical way to do it, as well as just installing but not configuring BizTalk Server, is the easiest way to do it at the moment. You be the judge.

Blog Post by: Johan Hedberg

Visual Studio Service Bus Explorer versus Standalone Service Bus Explorer

Visual Studio Service Bus Explorer versus Standalone Service Bus Explorer

In a previous post I explored a new feature of the Windows Azure SDK 1.7. in Visual Studio, the Service Bus Explorer. I demonstrated the capabilities of this feature in Visual Studio, creating new queues, topics, subscriptions and rules. The same capabilities are present in the Service Bus Standalone tool (Windows Forms Application) built by Paolo Salvatori.

INTRODUCTION

The stand alone tool can be download from MSDN Code Gallery. You can then open the compressed file. Subsequently open the solution in Visual Studio 2010 or 2012 RC. Build and run it. To use the tool you need to connect to the Service Bus. In menu bar you select Menu -> Connect. In dialog that pops up you fill in the details.

image

You click Ok an connection with the Service Bus will be made.

image

You can now start creating and using queues, topics and subscriptions similar as with explorer in Visual Studio. However, the user experience is different as the Standalone version offers more functions when you right click the queues, topics, and subscriptions.

TESTING QUEUES CAPABILITY

To test one of the capabilities I started with creating a Queue. Select Queues and then right click. Select Create Queue.

image

Fill in the details (in this case only name) and click Create. As soon as you click Create you see in the Log what happens on Service Bus.

image

If you look at log closely you see that I made an error the first time calling the Queue MySecond Queue (with space) in the name. All the actions are logged. Next I select my created Queue and right clicked. Select Send Messages. A dialog pops up and I can fill in details, create a custom message, load message, and so.

image

When I click Start a message will be send.Again you will see this in the log.

image

When I refresh MySecondQueue I can see the message count is 3, and spot other property values.

image

If I right click this Queue and select Receive All Messages than all messages from the queue will be received and that is visible in the log.

image

If you refresh the Queue again you will see that the message count has dropped and some other values have changed too.

image

CONCLUSION

In my short survey/exploration I can conclude that the standalone Service Bus Explorer offers more capabilities than the one built in Visual Studio. Second the stand alone offers better User Experience in opinion. Last but not least the stand alone brings more flexibility and control. I have not finished yet with my exploration and testing the stand alone version of the Service Bus Explorer. However, I can recommend you using this tool over the built in Visual Studio one. In case you want to control the Service Bus from Visual Studio only than you have to live with limitations it has compared to the Stand alone version. I must say I am impressed and I wondered why I did not look at this tool before.

Cheers,

– Steef-Jan

SQL Server VC++ Installation voes

I’ve installed SQL Server any number of times over any number of versions, but I have never had this problem before, and I am not sure why I got it now. However, since searching the web gave me very little in the way of a direct, working, solution I thought I’d write mine down. I was using Windows Server 2008 R2 Datacenter edition, SP1, patched to May 2012 standard, aka The Windows Server 2008 R2 image available in the Windows Azure Virtual Machine preview and installing SQL Server 2008 R2 Developer edition onto it. Now, I don’t think they are related, but I am not ruling it out that there is an issue in some way with that image. Since I am not doing anything but starting the image and running the installation which I have previous downloaded and un-packed from its ISO on a separately attached data drive.

The error I am getting is this:

The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail. (Exception from HRESULT: 0x800736B1).

I tried several times, and often this error would occur during install, but on the fifth (or so) attempt the install was successful and all looked to have installed fine, until I tried opening SQL Server Management Studio (SSMS). And got the exception there instead.

Now following the instructions in the exception text I did two thing, first – check the event log, where I found this:

Activation context generation failed for "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe".Error in manifest or policy file "C:\Windows\WinSxS\manifests\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.4053_none_d1c738ec43578ea1.manifest" on line 0. Invalid Xml syntax.

Now looking through the event log I could see that I got this error for a number of other applications and services as well, and that ssms wasn’t alone in this.

Next, I ran sxstrace, ie (from an elevated command prompt):

sxstrace trace -logfile:trace.log

The I tried to start ssms to produce the error, which it did. So then I ran:

sxstrace parse -logfile:trace.log -outfile:trace.txt

(More on the sxstrace tool here).

The trace file, among other things, gave me this (similar) information:

INFO: Parsing Manifest File C:\Windows\WinSxS\manifests\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.4053_none_d1c738ec43578ea1.manifest.
    INFO: Manifest Definition Identity is (null).
    ERROR: Line 0: XML Syntax error.
ERROR: Activation Context generation failed.

This file is from the Visual Studio C++ 2005 Service Pack (SP) 1 Redistributable Package. So I proceeded to download and install both the original 2005 Redistributable (x86, x64) and SP1 (x86, x64), hoping that would fix the problem and correct the manifest file. Not so for me.

I still wanted to see if the error could be fixed by “normal” procedures so I ran System File Checker (SFC). It produced the following result:

sfc /scannow

Beginning system scan.  This process will take some time.

Beginning verification phase of system scan.
Verification 100% complete.
Windows Resource Protection found corrupt files but was unable to fix some of th
em.
Details are included in the CBS.Log windir\Logs\CBS\CBS.log. For example
C:\Windows\Logs\CBS\CBS.log

The log file contain this (snipped somewhat for readability):

Manifest hash for component [ml:280{140},l:152{76}]"x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.4053_none_d1c738ec43578ea1" does not match expected value.
Expected:{l:32 b:43e8b1d9f404eb67105ab15282fd01f5bf4cd30f7f0c5d1250d11e9384ae9cc5}
Found:{l:32 b:d47fec989a9ad0351d4effd5984343181925f15919245da2a0609e1c5d68f280}.
Unable to load manifest for component [ml:280{140},l:152{76}]"x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.4053_none_d1c738ec43578ea1"
[SR] Cannot verify component files for Microsoft.VC80.ATL, Version = 8.0.50727.4053, pA = PROCESSOR_ARCHITECTURE_INTEL (0), Culture neutral, VersionScope neutral, PublicKeyToken = {l:8 b:1fc8b3b9a1e18e3b}, Type = [l:10{5}]"win32", TypeName neutral, PublicKey neutral, manifest is damaged (TRUE)

At this point I gave up on any form of allowing installers or the system to fix the problem for me and went at the file myself. Now the file is readable (although empty), but I cannot edit it (even if I am an administrator). Only SYSTEM has access to the file. So to be able to edit it I must first take ownership of it and grant ACLs:

>takeown /f C:\Windows\winsxs\Manifests\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.1833_none_d1c5318643596706.manifest

SUCCESS: The file (or folder): "C:\Windows\winsxs\Manifests\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.1833_none_d1c5318643596706.manifest" now owned by user "JEHBTS5\Administrator".

>icacls C:\Windows\winsxs\Manifests\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.1833_none_d1c5318643596706.manifest /grant administrators:F
processed file: C:\Windows\winsxs\Manifests\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.1833_none_d1c5318643596706.manifest
Successfully processed 1 files; Failed processing 0 files

>takeown /f C:\Windows\winsxs\Manifests\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.4053_none_d1c738ec43578ea1.manifest

SUCCESS: The file (or folder): "C:\Windows\winsxs\Manifests\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.4053_none_d1c738ec43578ea1.manifest" now owned by user "JEHBTS5\Administrator".

>icacls C:\Windows\winsxs\Manifests\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.4053_none_d1c738ec43578ea1.manifest /grant administrators:F
processed file: C:\Windows\winsxs\Manifests\x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.4053_none_d1c738ec43578ea1.manifest
Successfully processed 1 files; Failed processing 0 files

Now I can edit the file. As for the content I simply took it of another machine in which it existed and did not seem to have any issues. The content is this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Copyright %u00a9 1981-2001 Microsoft Corporation -->
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <noInheritable/>
    <assemblyIdentity type="win32" name="Microsoft.VC80.ATL" version="8.0.50727.4053" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"/>
    <file name="ATL80.dll" hash="6d7ce37b5753aa3f8b6c2c8170011b000bbed2e9" hashalg="SHA1"/>
</assembly>

After saving the file I am (at least seemingly to this point) rid of the problems.
Blog Post by: Johan Hedberg

Microsoft Cloud Day – the ups and downs

The term ’cloud’ can sometimes obscure the obvious. Today’s Microsoft Cloud Day conference in
London provided a good example. Scott
Guthrie was halfway through what was an excellent keynote when he lost network connectivity. This proved very disruptive to his
presentation which centred on a series of demonstrations of the Azure platform
in action. Great efforts were made to find
a solution, but no quick fix presented itself.
The venue’s IT facilities were dreadful – no WiFi, poor 3G reception
(forget 4Gthis is the UK) and, unbelievably, no-one on hand from the venue staff
to help with infrastructure issues.
Eventually, after an unscheduled break, a solution was found and Scott
managed to complete his demonstrations.
Further connectivity issues occurred during the day.

I can say that the cause was prosaic. A member of the venue staff had interfered
with a patch board and inadvertently disconnected Scott Guthrie’s machine from
the network by pulling out a cable.

I need to state the obvious here. If your PC is disconnected from the network it
can’t communicate with other systems. This
could include a machine under someone’s desk, a mail server located down the
hall, a server in the local data centre, an Internet search engine or even,
heaven forbid, a role running on Azure.

Inadvertently disconnecting a PC from the network does not
imply a fundamental problem with the cloud or any specific cloud platform. Some of the tweeted comments I’ve seen today
are analogous to suggesting that, if you accidently unplug your microwave from
the mains, this suggests some fundamental flaw with the electricity supply to
your house. This is poor reasoning, to
say the least.

As far as the conference was concerned, the connectivity
issue in the keynote, coupled with some later problems in a couple of presentations,
served to exaggerate the perception of poor organisation. Software problems encountered before the
conference prevented the correct set-up of a smartphone app intended to convey
agenda information to attendees.
Although some information was available via this app, the organisers
decided to print out an agenda at the last moment. Unfortunately, the agenda sheet did not
convey enough information, and attendees were forced to approach conference
staff through the day to clarify locations of the various presentations.

Despite these problems, the overwhelming feedback from conference
attendees was very positive. There was a
real sense of excitement in the morning keynote. For many, this was their first sight of new
Azure features delivered in the ’spring’ release. The most common reaction I heard was
amazement and appreciation that Azure’s new IaaS features deliver built-in
template support for several flavours of Linux from day one. This coupled with open source SDKs and several
presentations on Azure’s support for Java, node.js, PHP, MongoDB and Hadoop
served to communicate that the Azure platform is maturing quickly. The new virtual network capabilities also
surprised many attendees, and the much improved portal experience went down
very well.

So, despite some very irritating and disruptive
problems, the event served its purpose well, communicating the breadth and
depth of the newly upgraded Azure platform.
I enjoyed the day very much.

Deploying the Need Facebook canvas app. to Windows Azure Web Sites |Déploiement de l’appli. canvas Facebook dans les Web Sites Windows Azure

With the new release of Windows Azure Web Sites in June 2012, it is now possible to have free ASP.NET hosting for simple usage. Avec la sortie des sites Web Windows Azure en Juin 2012, il est maintenant possible d’avoir de l’h%u00e9bergement gratuit d’ASP.NET pour une utilisation simple.
This blog post explains how to deploy Need application to Windows Azure Web Sites instead of Cloud Services. Ce billet explique comment d%u00e9ployer l’application Need vers les sites Web Windows Azure plut%u00f4t que dans les “Cloud Services”.
You may find information about that new June 2012 Windows Azure release in Episode 83 of the Cloud Cover Show, or in French in Episode 8 of “Le bulletin Azure”. Vous trouverez des informations sur cette nouvelle version Windows Azure de juin 2012 dans l’Le Bulletin Azure, %u00e9pisode 8, ou en anglais dans l’%u00e9pisode 83 de “The Cloud Cover Show”.

 

In a previous post, I explained what the sample app Need is, and how to deploy it to Windows Azure Cloud Services. Prior to June 7th 2012, Cloud Services were named “hosted services” and it was the unique way to deploy to Windows Azure. Dans un billet pr%u00e9c%u00e9dent, j’ai expliqu%u00e9 ce qu’%u00e9tait l’application Need, et comment la d%u00e9ployer dans les “Cloud Services” Windows Azure. Avant le 7 juin 2012, les “Cloud Services” Windows Azure s’appelaient “hosted services” et %u00e9tait l’unique mode de d%u00e9ploiement Windows Azure.
As Need app. may be deployed many times for small communities inside Facebook, it makes sense to use Windows Azure Web Sites for the following reasons:
– It is free for low usage
– It can scale when usage grows
Comme l’appli. Need peut %u00eatre d%u00e9ploy%u00e9 un certain nombre de fois pour des petites communaut%u00e9s au sein de Facebook, cela peut avoir du sens d’utiliser des sites Web Windows Azure pour les raisons suivantes:
– c’est gratuit pour un usage faible
– cela peut monter en charge en fonction des besoins
Another interesting thing about Windows Azure Web Sites and Facebook canvas applications is that an SSL certificate is provided. Un autre aspect int%u00e9ressant des sites Web Windows Azure dans le cadre d’applications canvas Facebook est qu’un certificat SSL est fourni.
Currently, Windows Azure Web Sites don’t provide the ability to use your own SSL certificate on your own domain name (you can provide your own domain name in reserved mode). With Facebook canvas applications, this is not an issue as end users won’t use directly the web site’s URL; they will see apps.facebook.com/<app namespace>.
In the following screen shot, user sees https://apps.facebook.com/need-sample/ while the canvas app is at https://need.azurewebsites.net.
Actuellement, les sites Web Windows Azure ne proposent pas la possibilit%u00e9 d’utiliser son propre certificat SSL sur son propre domaine (on peut tout de m%u00eame utiliser son propre nom de domaine en mode r%u00e9serv%u00e9). Avec les applications canvas Facebook, cela n’est pas un probl%u00e8me du tout puis que les utilisateurs finaux ne vont pas utiliser l’URL du site Web directement; ils vont voir apps.facebook.com/<espace de noms de l’appli>. Dans la copie d’%u00e9cran suivante, l’utilisateur voit https://apps.facebook.com/need-sample/ et l’appli canvas est %u00e0 https://need.azurewebsites.net

 

So, le’t’s publish the App to Windows Azure Web Sites. Publions donc l’appli vers les sites Web Windows Azure.

 

First step is to create a new Web Site with a Windows Azure SQL Database (was SQL Azure). La premi%u00e8re %u00e9tape est de cr%u00e9er un site Web avec une base de donn%u00e9es SQL Windows Azure (pr%u00e9c%u00e9demment SQL Azure).

Then you can go to the newly created web site administration in the portal to download a publish settings file: Puis on peut aller vers l’administration du nouveau site Web ainsi cr%u00e9%u00e9 pour t%u00e9l%u00e9charger le fichier des param%u00e8tres de publication:

store the file on your local disk enregistrer le fichier sur le disque local
From Visual Studio, right click on the Web Site project (the Azure Cloud Service deployment project is useless for Azure Web Sites) and choose Publish. Depuis Visual Studio, cliquer droit sur le projet Web (le projet de d%u00e9ploiement Windows Azure vers les “cloud services” est inutile pour le d%u00e9ploiement vers les sites Web Windows Azure) et choisir “Publish”.

Import the file you just downloaded  
set the connection string for NeedContext from the drop down box: choisir la cha%u00eene de connexion pour NeedContext depuis le liste combin%u00e9e d%u00e9roulante:
Then publish on next page. Start Preview button will optionally show the files that needs to be updated when publishing for the n-th time. Puis publier sur la page d’apr%u00e8s. Le bouton “Start Preview” montre optionellement les fichiers qui ont besoin d’%u00eatre remplac%u00e9s %u00e0 destination quand on publie pour la n-i%u00e8me fois.
This will show the Web Site in the browser. An error like this shows up in Windows Azure Web Sites: Cela va montrer le site Web dans le navigateur. Une erreur telle que celle-ci appara%u00eet avec les Sites Web Windows Azure:

Could not load file or assembly ‘Microsoft.WindowsAzure.ServiceRuntime, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified.

This is because the Need application uses Windows Azure API that are not deployed by default in Azure Web Sites. They are deployed by default in Windows Azure Cloud Services so Visual Studio adds the reference with the copy local option set to false. Cela vient du fait que l’appli Need utilise les API Windows Azure qui ne sont pas d%u00e9ploy%u00e9es par d%u00e9faut dans les sites Web Windows Azure. Elles sont d%u00e9ploy%u00e9s par d%u00e9faut dans les “Cloud Services” Windows Azure et Visual Studio ajoute donc la r%u00e9f%u00e9rence avec l’option “copy local” %u00e0 “false”.
The copy local option, when set to true, includes the DLL to the deployment destination . So let’s set it to true for the two assemblies we need. L’option “copy local”, quand mise %u00e0 “true”, inclut les DLL dans la destination du d%u00e9ploiement.Positionnons donc cette valeur %u00e0 “true” pour les deux assemblys dont nous avons besoin.
Then you just have to deploy again to Windows Azure Web Sites and you’ll have the site running. Puis il suffit de red%u00e9ployer vers les sites Web Windows Azure et le site fonctionnera.
Another important step is to change the parameters of the App in Facebook so that the canvas is at <yourapp>.azurewebsites.net: Une %u00e9tape importante est de changer les param%u00e8tres de l’appli Facebook de fa%u00e7on %u00e0 ce que l’appli Canvas soit %u00e0 <votreappli>.azurewebsites.net

 

An instance of the app is deployed on a Windows Azure Web Site and you can try it. Just connect with you Facebook account and go to the following URL: Une instance de l’appli est d%u00e9ploy%u00e9e sur un site Web Windows Azure et vous pouvez l’essayer. Connectez-vous simplement %u00e0 Facebook avec votre compte et allez %u00e0 l’URL suivante:

https://apps.facebook.com/need-sample/

Once you’ve accepted the App, the App must accept you. As it is deployed in demo mode, you just have to enter the demo invitation code which is the following: Une fois que vous avez accept%u00e9 l’appli, l’appli doit vous accepter. Comme elle est d%u00e9ploy%u00e9e en mode d%u00e9mo, vous avez juste %u00e0 entrer le code d’invitation qui est le suivant:

data-may-be-deleted

 

Benjamin

Blog Post by: Benjamin GUINEBERTIERE

FAST Search 2010: Multi-Valued Crawled Property Only Returns Single Values In Search Results

Overview
In a recent client solution we were utilizing a multi-valued Managed Metadata field to classify documents in a organizational taxonomy.  Our search and navigation relied on being able to retrieve documents by supplying any one of the possibly multiple values stored in the Managed Metadata field. 
We determined however, that even though many documents had […]
Blog Post by: Michael Gerety

Solution: FAST Search Crawls Stop Working Unexpectedly

Problem Description
Crawls in our Fast Search content all of the sudden started “hanging”, and reporting reporting 0 successful crawls, with some errors. 

We were seeing no errors to speak of in the event logs or in the ULS logs on either SharePoint server, and the FAST Server was reporting no errors.
Expired Self Signed Certificate for […]
Blog Post by: Michael Gerety