Power of BizTalk360 (v2.0). Accessing our BizTalk environment running in UK from Amsterdam Schiphol airport

Posted at: 7/1/2011 at 7:26 AM by saravana

Recently we been blogging a lot about the new features that's coming in BizTalk360 V2.0, the main one is BizTalk360 and Azure AppFabric integration

We even got a public demo available at http://demo.biztalk360.com which allows visitors from any part of the world to access and do some basic management of one of our BizTalk environments remotely. All you need is a computer with internet connection and Silverlight plugin installed.

I was at Almere, Netherlands couple of days ago giving presentation about BizTalk360 to the Dutch BizTalk user group meeting (blog posts 1, 2, 3, photos). On our way back, I was checking my emails, on the public pc on the KPN internet booth in the Schiphol airport. Suddenly I got the thought of accessing http://demo.biztalk360.com and see how it behaves.

To my surprise, that public pc was equipped with latest version of Silverlight and BizTalk360 smoothly loaded as shown in the below pictures.

_MG_2485

_MG_2488

_MG_2490

What you are seeing on the screen is our BizTalk environment hosted and running in United Kingdom, accessed from a public PC in Amsterdam Airport.

The below picture shows the actual technology behind the scene. The front-end Silverlight application is hosted separately on Windows Azure (web role), the back-end WCF service are hosted on our on-premise BizTalk environment protected by firewall and NAT. Azure AppFabric service bus takes care of all the end-to-end connectivity between the Silverlight front-end and WCF back-end.

The end result, seamless management of on premise BizTalk environment, remotely, securely, with less investment on infrastructure. We are currently spending around $4/day to run the demo (http://demo.biztalk360.com ). We haven't done any huge initial investment to get this up and running. We can offer this service to any customers, and we can set up this infrastructure in few hours.

Nandri!

Saravana

Tags: | |  Categories: AppFabric | Azure | BizTalk 360
Actions: Email this article Email | Kick it! | DZone it! | Save to del.icio.us | Technorati Links
Post Information: Permanent LinkPermalink | CommentsComments(0) | Comments RSS

Marriage between BizTalk360 and Azure AppFabric Service Bus - Result: Birth of http://demo.biztalk360.com

Posted at: 6/27/2011 at 7:12 AM by saravana

This is an open invitation for all of you to access/manage one of our test BizTalk environment, running in our premise protected by NAT/Firewall.

http://demo.biztalk360.com

Note: The first time loading will take sometime, once the SilverLight application is downloaded, it will be quick.

Why do we need AppFabric Service Bus integration for BizTalk 360?

Even before shipping the V1.0 of BizTalk360, we started on some of the cool features requested by potential customers (coming in V2.0). Ability to manage their BizTalk environment remotely, securely, and with less investment in infrastructure changes.

There are various scenarios why a company may want to do this. One of the main reason is outsourcing your Microsoft BizTalk Server support/operations to some third party companies. Previously providing something like this required heavy investment on infrastructure like setting up VPN connections, Citrix/RDP access to your production environment etc. But thanks to BizTalk360, which by default comes with lot of features targeted for production support, things like fine grained authorization, complete governance/auditing, ability to give read only access etc. Now with the support for AppFabric service bus, it's possible to allow third party companies to securely manage your BizTalk environment. It's important to mention, you'll be able to audit/govern who did what!!.

Technology behind the scene

myImage (1)

Majority of the hard work here is taken by Microsoft Azure AppFabric Service Bus (SB from now) infrastructure. Basically AppFabric SB takes care of all the challenges around establishing the connection with the on-premise infrastructure crossing through NAT/Firewall securely. This was possible also because of the BizTalk360 architecture. The front SilverLight application merely displays the data provided by the back end 8+ WCF services. We simply introduced AppFabric Service Bus layer in-between the SilverLight front end and the WCF backend as shown in the above figure. All of our recent blog posts were related to this. There were few challenges, but once we understood the challenges and how the whole thing works, everything went very smooth.

As you can see from the picture above, the original BizTalk Environment is running in one of our internal environments. The front end is hosted on Windows Azure as a web role. The Azure AppFabric service bus puts the plumbing in-between and takes care of all the communication.

There is also a CNAME mapping, which maps http://demo.biztalk360.com to the actual Windows Azure Webrole application http://biztalk360.cloudapp.net

All the communication from the Azure Web role to the on premise BizTalk environment is fully encrypted using "https" traffic.

User simply come and hit the URL http://demo.biztalk360.com without knowing what's going on behind the scene.

Nandri

Saravana Kumar

Tags: | | |  Categories: AppFabric | Azure | BizTalk 360
Actions: Email this article Email | Kick it! | DZone it! | Save to del.icio.us | Technorati Links
Post Information: Permanent LinkPermalink | CommentsComments(0) | Comments RSS

Understand Azure AppFabric Service Bus Pricing

Posted at: 6/23/2011 at 6:56 PM by saravana

Note: This is not a definitive guide, this is just my understanding based on the research I've done and based on response I received from the Microsoft Azure support centre for some of my queries.

If you are planning to use AppFabric Service Bus, there are 3 different charges you need to be aware of

  • AppFabric Service Bus connections (of individual and pack types)
  • AppFabric Access Control transactions
  • Data transfer (in gigabytes)

In this article we'll try to address in detail about the AppFabric Service Bus charges, some of the terminologies used and slightly touch on Access Control and Data transfer charges.

Pricing:

Let's start with the advertised pricing for AppFabric Service Bus

  • $3.99 per connection on a "pay-as-you-go" basis
  • Pack of 5 connections $9.95
  • Pack of 25 connections $49.75
  • Pack of 100 connections $199.00
  • Pack of 500 connections $995.00

You can see Service bus pricing comes in 2 flavours, you can either opt in for a "pay as you go" model or you can buy a set of pre-bundled packs (5, 25, 100, and 500). Like any retail pricing model, you get almost 50% discounts for agreeing to prepay a bulk pack. For all the packs the pricing works out $1.99 per connection. The discount doesn't increase in line with bigger pack.

What is a connection?

This is the most complicated question; you need to find the answer for when it comes to Service Bus.

AppFabric Service Bus runs directly on Azure compute instances; hence it depends on the following resources from the Azure Cloud

  • Compute instance resources,
  • Storage resources, and
  • Networking resources.

The pricing model for the AppFabric Service Bus is like compute and storage pricing. That is, you pay for resources as long as you are using them. "Using them" is the keyword when it comes to cloud pricing model, you pay per usage. For compute/storage nodes, it easy to calculate the usage, as soon as you fire an Azure instance your compute meter will start, as soon as you stored some data in the storage your storage meter will start. But it's tricky to calculate the usage for Service Bus, since the connection is transient.

At end of the day, the connectivity usage should somehow relate to the usage of underlying infrastructure, i.e compute and storage in the cloud. To keep the pricing model simple, Microsoft consolidated all the underlying resource usage (compute, storage, and network) and come with term called "Connection" to represent a billable unit.

So for service bus, the usage (billing) is calculated on simultaneous concurrent active connection you hold with service bus.

When will a connection be established and charged?

A typical service bus implementation is shown below. To setup an infrastructure like this will go through series of steps like registering your service with service bus, client opening a client channel to connect to the service and accessing the endpoint (ex: http://mysb.servicebus.windows.net/service/adminsvc )

clip_image002

So doing any of the following tasks will result in a connection.

  • Opens a service on a AppFabric Service Bus endpoint
  • Opens a client channel that connects to such a service
  • Makes an HTTP request to any service opened on an AppFabric Service Bus endpoint

There are other scenarios as well like Message buffer, queues and topics released as part of CTP2 which are not considered for this article.

Concurrent (Simultaneous) Connections:

As I mentioned earlier, for AppFabric service bus you only pay for the maximum number of connections that were in simultaneous use on any given day during the billing period. So, it's important to understand what that simultaneous connection means.

Let's take this scenario, you decided to try out the Echo sample that comes with the SDK. You setup everything according to the documentation and you got 2 console windows open. One showing the server side messages, and in another console window you are going to type some message and press enter, which is going to get transmitted to your server console, get displayed. The server then responds back the same message which will eventually get displayed on the client console.

clip_image004

In this scenario you open 2 concurrent connections, one from client to AFSB and another from AFSB to server. The important thing to note here is the whole round trip would have taken only few milliseconds, once the message is echoed back on the client, you are not holding any connections to AFSB. Let's assume you are on 5 connection pack package, and in this scenario you are well within you limit. You can keep executing the sample again and again and again, still you will consume only 2 connections, since your operation is sequential.

Next, let assume you have asked 4 of your friends to open the EchoClient application in their desktops and try out the demo.

clip_image006

When all of you are trying the demo, for majority of the times the connection will be in and out quickly (since our response times are in milliseconds) without overlapping and you may be well within the original 2 connections scenario. But there is lot of possibility you might end up in more than 2 concurrent connections as 4 people are trying to access the end points. In the above picture, you can see there are 2 active concurrent connections on both directions, which will result in 4 connections.

Connection charges are per month, but calculated daily on prorate basis.

Identifying the daily connection charge:

The maximum number of open connections is used to calculate your daily charges. For the purposes of billing, a day is defined as the period from midnight to midnight, Coordinated Universal Time (UTC).Each day is divided into 5-minute intervals and for each interval the time-weighted average number of open connections is calculated. The daily maximum of these 5-minute averages is then used to calculate your daily connection charge.

All the above mentioned connection charges (ex: $3.99 for pay-as-you-go and $9.99 for 5 pack are per connection/month charges). It's interesting how it's been calculated.

Your time weighted average connections for 5 mins will look something like this. Every second there is "n" number of simultaneous connections.

clip_image008

And TWA (time weighted average) is calculated as

TWA = ((C1*T1)+...+ (Cn*Tn))/(T1+?+Tn)

Or

TWA = ((C1*T1)+....+ (Cn*Tn))/45150

45150 is derived by adding 1+2+3+...300

C ? Connection, T ? Time in seconds during 5 min interval for which connection is active. "n" will be 300 (5 minutes * 60 seconds)

If you want to take a practical example, let's assume your simultaneous connection range from 0 to 25 during any 5 minute window, using this little program will give you something like 575976 based on the random numbers generated.

int total = 0;

for (int t = 1; t <= 300; t++)

{

Random r = new Random();

int connection = r.Next(1, 25);

total = total + (connection * t);

}

So, your TWA for the above case will be 575976/45150 = 12.75 active connections. This 5 minute interval simultaneous connection will be recorded from midnight to midnight (UTC).

Next step is to calculate the daily prorate charge, which is based on the formula

Cost = (max (TWA1, TWA2,...., TWAn)* Connection Charge)/no.of days in month

Let's assume 12.75 is the maximum active connection you received in the day, for the month of June (30 days) and you are on a pay-as-you go tariff. Then your bill will be

(12.75 * 3.99)/30 = $1.69 per day

As you can see in this case you it's cheaper to go on pay-as-you go price rather than paying $1.99/day opting for a 25 connection pack. See Which model is better for me? For another example.

What does "0 Connections" mean?

When you setup a new namespace for Service Bus, you will be provided with the option as shown below to select the "Connection Pack Size"

clip_image010

The list provides an option called "0 Connection". What it means is, you are going for pay-as-you-go model, which is charged at $3.99/month. Please bear in mind, you need to wait for 7 days in order to make the switch from one pack to another (or other words, pay-as-you-go to pack model).

Service Bus Quotas:

There are capped quotas for the number of namespaces you can create and maximum connection allowed per namespace. The details are taken from http://msdn.microsoft.com/en-us/library/ee732538.aspx. These are very generic numbers, should be sufficient to support even big enterprise requirements safely.

1. The maximum number of service namespaces allowed per Windows Azure AppFabric account is 50.

2. The maximum number of connections allowed per service namespace is 2000.

What will happen if you exceed your pack limit?

I've raised support ticket to understand this question; so far this is my understanding.

There is NO explicit cap on the connections. If you got a pack of 5, and your usage crosses the limit, you will automatically be billed for rest of the connection on pay-as-you go rate ($3.99 per connection). This is something customers need to be aware of and watch out for the bills at least for the few initial days.

Which model is better for me?

Whether to go with the pay-as-you go model or connection pack model will depend on your scenario. A classic example: Your business may not have any traffic during certain days (example: weekends). In this case, if you are on a pay-as-you got model you don't incur any charges for those days. On the other hand if you are on a connection pack, you will be charged on daily prorate rate.

Here is a detailed example:

Let's assume you expect a daily peak of 15 connections. Without a pack you would get charged at the individual rate: 15 * $3.99 / 30 = $1.995 per day (in a 30 day month). If you use less on a given day (i.e. weekends) you would get charged proportionally less on those days.

Now, if you choose a 25 connection pack, your charge would be 25 * $1.99 / 30 = $1.66 per day (substantially less), but you would get charged this amount even on days where you use less connections or no connections at all. On the upside, if you used more than 15 (but less than 25) connections on some days, your charge would still be $1.66

Data Transfer Charges

Remember the charge we have discussed so far are related to connections. Once the connection is made you are going to transfer some data from A to B (Example in EchoSample: a piece of text you transmit from client to server is data), which will incur the Azure Data transfer charges. The below picture shows at high level where your $ meter will start.

clip_image012

Any data transfer throughout a given Windows Azure platform sub-region is provided at no charge. In the above diagram if all of your communication happens within Azure Data Center #1, then there is no charge.

Any data transfer outside a sub-region is subject to ingress (inbound) or egress (outbound) charges at the Windows Azure platform rates.

In the above diagram, if you use the AppFabric Service Bus to communicate between two Windows Azure applications in the same sub-region, you will not incur data transfer charges. However, if you use the AppFabric Service Bus to communicate between regions or sub-regions; for example, to send data from one Windows Azure application in the North Central sub-region (#1) to another Windows Azure application in the South Central sub-region(#2), you will incur egress charges at North Central rates and ingress charges at South Central rates.

If you use the AppFabric Service Bus to send and not receive data from a Windows Azure application to an application in your own datacenter, you will incur egress charges for your Windows Azure platform usage.

Windows Azure Access Control Charges

We are not going to see in detail about the Access control charges, but this is something you need to be aware of. Normally Azure Service bus endpoints will be protected by access control services. ACS acts like a gate keeper for the end points exposed by the Azure Service bus. So every time you try to communicate with an endpoint, it needs to go through ACS, which will incur separate charges.

Summary

I'll reiterate here, the above article is based on my own understanding of how AppFabric Service Bus pricing model works. There are lot of confusions around, and still some areas are not clear. Examples:

  • Will having multiple end points with different bindings (netTcpRelayBinding, basicHttpRelayBinding) incur additional charges?
  • Will the connection on the server side AFSB to Server kept alive all the time in active state?

Etc. I'm happy to constantly update this article if people got better feedback, or if I've made any mistakes.

Nandri
Saravana Kumar

Tags: |  Categories: Azure | AppFabric
Actions: Email this article Email | Kick it! | DZone it! | Save to del.icio.us | Technorati Links
Post Information: Permanent LinkPermalink | CommentsComments(0) | Comments RSS

AppFabric Service Bus : net:pipe needs to be specified error.

Posted at: 6/23/2011 at 6:17 AM by saravana

I'm in the process of hosting my WCF services in IIS/Windows Server AppFabric, whenever I saved the web.config file I can see the following exception in the EventViewer.

WebHost failed to process a request.
Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/61308764
Exception: System.ServiceModel.ServiceActivationException: The service '/UI.Web.V2/ServiceManagement.svc' cannot be activated due to an exception during compilation.  The exception message is: A base address with the uri scheme 'net.pipe' needs to be specified if using service management endpoint 'ServiceManagementNetPipeEndpoint'. Verify a base address exists on the site and the protocol is enabled on the application.. ---> System.Configuration.ConfigurationErrorsException: A base address with the uri scheme 'net.pipe' needs to be specified if using service management endpoint 'ServiceManagementNetPipeEndpoint'. Verify a base address exists on the site and the protocol is enabled on the application.

This is because, Windows Server AppFabric automatically adds a magic management service called ServiceManagement.svc to all the configured applications. The Service Management service enhances Windows Server AppFabric management capabilities by providing clients the ability to start services remotely. More details here: http://msdn.microsoft.com/en-us/library/ff383422.aspx

The Service Management Service supports only the net.pipe protocol for bindings. The address of a Service Management Service added to an application conforms to the following address pattern: {scheme}://hostname:port/<application>/ServiceManagement.svc. For example: net.pipe://localhost/VirtualApplicationB/ServiceManagement.svc.

Solution:

Long story short, the quick fix for this issue is to enable net:pipe as shown below in the Advanced Settings of Virtual Directory.

image

Nandri!

Saravana Kumar

Tags: |  Categories: AppFabric | Azure
Actions: Email this article Email | Kick it! | DZone it! | Save to del.icio.us | Technorati Links
Post Information: Permanent LinkPermalink | CommentsComments(0) | Comments RSS

Azure AppFabric Service bus, Silverlight Integration - End-to-End (walkthrough) - Part 2

Posted at: 6/17/2011 at 1:19 PM by saravana

Introduction

In part 1 we setup the scene by creating a simple Silverlight/WCF application. In that application the Silverlight application is initialized, it made a call to the underlying WCF service operation "GetWelcomeText" and displayed the text on the UI. We used the basicHttpBinding to establish communication between the SL client and WCF service. In this part, we are going to make some modifications to the configuration files, IIS/Windows Server AppFabric settings and make the application work across boundaries between two different geographical locations using Azure AppFabric Service Bus. The high level picture is going to look like

clip_image002

Source: http://blogs.digitaldeposit.net/saravana

Prerequisite:

One of the challenges of Silverlight and Azure AppFabric service bus integration is configuring access to the clientaccesspolicy.xml file. I've explained in detail, how you can resolve it in this blog post. It's mandatory to complete the procedure explained in that post, before you proceed further.

It's also mandatory to have IIS/Windows Server AppFabric to complete this walkthrough. Please download and install it from http://www.microsoft.com/download/en/details.aspx?id=15848

Create Service Endpoint Behaviour

Expand "Advanced" and "Endpoint Behavior" from the navigation tree and click on the link "New Endpoint Behavior Configuration" as shown below

clip_image004

Click the "Add" button, which will bring "Adding Behavior element extensions" screen as shown below. From the list select "transportClientEndpointBehavior" and click "Add".

clip_image006

Change the name to "slsb_ServiceEndpointBehavior". The final screen should look as shown below

clip_image008

Double click on transportClientEndpointBehavior from the list and make sure CredentialType is SharedSecret.

clip_image010

Create a basicHttpRelayBinding

Navigate to "Bindings" and select "New Binding Configuration.." as shown below

clip_image012

On the "Create a New Binding" window select "basicHttpRelayBinding" and click OK as shown below.

clip_image014

Change the name to slsb_basicHttpRelayBinding, the final configuration should look as shown below.

clip_image016

Create a new Endpoint

Now we are going to create a new WCF end point using the endpointBehavior and basicHttpRelayBinding we created in previous steps.

Navigate to Services\Endpoints, right-click and select "New Service Endpoint" as shown below.

clip_image018

Once the properties window is displayed, provide the configurations as shown below.

clip_image020

The modified web.config file is going to look as shown below

clip_image022

We are going to make few changes here, which we couldn't do on the SvcConfigEditor.exe tool. The modified web.config file is going to look as shown below

clip_image024

The objective for this demo is establishing communication between Silverlight application and remote WCF service via Azure AppFabric service bus. So, we are going to ignore all the security settings for now, which I'll cover in future articles. Things to note

Security is set to "None"

Endpoint address is using "http" (not "https")

Also, I commented out previous local endpoint configurations and things that are not really relevant for this demo to keep it simple.

Configure Virtual Directory in IIS/Windows Server AppFabric

You'll need Windows Server AppFabric for this demo to work, which you can download from http://www.microsoft.com/download/en/details.aspx?id=15848

We are going to host our WCF service on IIS/Windows Server AppFabric. The main reason for that is, we need to take advantage of the "Auto Start" functionality of IIS/ Windows Server AppFabric to start our WCF service automatically when IIS starts and register its namespace in the Azure AppFabric Service bus. Previously this was one of the challenges, since the WCF services hosted just on IIS (without AppFabric) won't get started until the first request hit the service. In this section we will see the configuration required on IIS/Windows Server AppFabric for our WCF service.

Start Internet Service Manager, and click on our virtual directory AppFabricSBandSLIntegration.Web.

clip_image026

On the Actions column, under "Manage WCF and WF Services", click on "Configure" as shown below

clip_image028

Select "Auto-Start" and choose the option "Enabled" as shown below.

clip_image030

After closing the window, you can Start the application, as shown in the below figure.

clip_image032

Reset IIS by opening a command prompt as administrator and typing iisreset. Navigate to our WCF service as shown below and make sure there are no errors and it displays the page as shown below

clip_image034

One of the common errors I've seen, especially while working on corporate networks where a proxy server is used is

Unable to reach watchdog.servicebus.windows.net via TCP (9351, 9352) or HTTP (80, 443)

The solution for the problem is simple, on the web.config file just configure the proxy details as shown below.

<system.net>

<defaultProxy useDefaultCredentials="true">

<proxy proxyaddress="http://<your proxy>:<your port>"/>

</defaultProxy>

</system.net>

You also need to make sure the virtual directory is configured to run under an IIS application pool, with the identity that access to proxy server.

clip_image036

Update the Silverlight application to point to Azure AppFabric service bus URL

The final change we need to make is to update the Silverlight application configuration file ServiceReference.Clientconfig.config file with url pointing to the Azure AppFabric service bus url as shown below

clip_image038

Press F5 to run the application, and now you should see the application working as before but this time via the Azure AppFabric service bus.

clip_image040

One of the key things to note here is, on the Silverlight client side, I only modified the address in the endpoint element. That's because basicHttpBinding is compatible with basicHttpRelayBinding.

The other important thing is, we relaxed the security completely and concentrated only on connectivity for this demo. So, don't use this configuration in production.

Nandri!

Saravana

Tags: | |  Categories: AppFabric | Azure | Silverlight
Actions: Email this article Email | Kick it! | DZone it! | Save to del.icio.us | Technorati Links
Post Information: Permanent LinkPermalink | CommentsComments(0) | Comments RSS

Azure AppFabric Service bus, Silverlight Integration - End-to-End (walkthrough) - Part 1

Posted at: 6/17/2011 at 1:03 PM by saravana

Introduction

In this article we are going to see the end to end integration of Azure AppFabric Service bus and Silverlight. First we are going to create a very basic "Hello World" Silverlight application that interacts with a WCF operation called "GetWelcomeText" and displays the text returned in the UI. In order to explain the core concepts clearly, we are going to keep the sample as simple as possible. The initial solution is going to look as shown below. The SL application hosted on a local IIS/AppFabric(server) web server and accessed via a browser as shown below.

 clip_image002

Next, we are going to extend the same sample "Hello World" example to introduce Azure AppFabric service bus as shown in the below picture and show the power of AppFabric Service bus platform, which enables us to use the remote WCF services hosted geographically somewhere in the wild.

clip_image004

Original Source: http://blogs.digitaldeposit.net/saravana

The first part of the article doesn't going to touch anything on Azure AppFabric service bus, it's all about creating a simple SL/WCF application.

Create a Hello World Silverlight Application

Open Visual Studio (use Run as Administrator), and Click New Project from the Start page, which will bring the "New Project" window as shown below

clip_image006

Select Silverlight from Installed Templates, and choose "Silverlight Application" from the list. Provide "AppFabricSBandSLIntegration" as the name and click OK. In the next screen ("New Silverlight Application"), just leave the default values and click OK. The solution structure will look as shown below.

clip_image008

Add a simple WCF service:

Right click on AppFabricSBandSLIntegration.Web ASP.NET application and select "Add New Item", which brings the "Add New Item" window as shown below.

clip_image010

Select "Web" from Installed templates and "WCF Service" from the list provide "AdminService.svc" as the name and click "Add".

Next, rename the default method name "DoWork" to "GetWelcomeText" and changed the return type from "void" to "string" both in IAdminService.cs and AdminService.cs files. The implementation now looks as shown below.

clip_image012

Rebuild the solution by pressing Ctrl+Shift+B.

Convert the web application to use IIS:

By default the ASP.NET web application will be configured to run on a local server (cassini), for our demo we are going to configure it to run under IIS/AppFabric(server). Right click on the AppFabricSBandSLIntegration.Web project, select "Properties". In the properties windows select "Web" from LHS and select the option "Use Local IIS Web Server". Click on "Create Virtual Directory" button to create the virtual directory and click OK on the popup window (you must have opened Visual Studio by Run as Administrator; else this step will give error.)

clip_image014

clip_image016

Build the solution by pressing Ctrl+Shift+B, and navigate to http://localhost/AppFabricSBandSLIntegration.Web/AdminService.svc and make sure no errors encountered.

Configure web.config file with appropriate WCF settings

For this step we are going to use the WCF service configuration tool SvcConfigEditor.exe. Open a Visual Studio command prompt and type SvcConfigEditor.exe. Once the application is opened, click File/Open and navigate to web.config file found under AppFabricSBandSLIntegration.Web folder.

Click on "Create a New Service" link and click the browse button. Navigate to AppFabricSBandSLIntegration.Web/bin/ AppFabricSBandSLIntegration.Web.dll and select AppFabricSBandSLIntegration.Web.AdminService once selected the screen should look as shown below

clip_image018

Click on the "Next" button in the wizard and make sure the contract is selected as shown below.

clip_image020

Click "Next", On "What communication mode is your service using?" option select "HTTP"

clip_image022

Click "Next", On "What method of interoperability do you want to use?" option select "Basic web service interoperability"

clip_image024

Click "Next", On "What's your address of your end point", clear http:// and click "Yes" on the warning.

On the final summary screen, click "Finish". Your web.config file will now look as shown below.

clip_image026

Rebuild the solution by pressing Ctrl+Shift+B. Right click on AdminService.svc file and select "View in Browser". Make sure it displays as shown below without any errors.

clip_image028

Now we have completed all the required stuff on the WCF services side, let's move on to the client side Silverlight application.

Prepare the Silverlight application to communicate with the WCF Service.

Add Service Reference:

The very first step is to create the service reference to our AdminService.svc WCF service. Right click on the AppFabricSBandSLIntegration Silverlight project and select "Add Service Reference", which will bring the window as shown below.

clip_image030

Paste the url of our AdminService.svc file and click "Go". Once the service is resolved, provide "AdvancedServiceReference" as the namespace and click "OK".

The above step should automatically add ServiceReference.ClientConfig file to the AppFabricSBandSLIntegration Silverlight project as shown below.

clip_image032

Open the MainPage.xaml file and add a TextBlock as shown in the below snippet.

clip_image034

Open the MainPage.Xaml.cs file and add the following lines of code. Basically we are instantiating the proxy client, hooking up the "Completed" event and call the asyn method GetWelcomeTextAsync. Once we receive the response from WCF service, SL runtime will automatically execute the code present in the event handler. We are simply displaying the "Hello World from WCF Service" text returned from WCF service in the text block we created in the previous step.

clip_image036

At this stage everything is completed and pressing the "F5" button should execute the ASP.NET/Silverlight application and display the following result

clip_image038

In part 2 of the article, we'll see how we can introduce Azure AppFabric Service bus in the middle between the Silverlight client and the WCF service. You may be wondering, why I have used the SvcConfigEditor.exe to configure the WCF service rather just simply asking the user to paste 4 lines of configuration Xml. The main reason for using the tool is, when we modify the configuration for Azure AppFabric Service Bus, it makes it easy to understand all the available configuration options.

Nandri

Saravana Kumar

Tags: | |  Categories: Azure | AppFabric | Silverlight | ASP .NET
Actions: Email this article Email | Kick it! | DZone it! | Save to del.icio.us | Technorati Links
Post Information: Permanent LinkPermalink | CommentsComments(0) | Comments RSS

Resolving Azure ServiceBus related errors in IIS 7.0 and 7.5

Posted at: 6/15/2011 at 11:18 AM by saravana

When you install the Windows Azure AppFabric SDK, it extends your machine configuration files with set of WCF custom extensions (behaviour, bindings, bindingElement) to help you build the AppFabric service bus based applications. Examples:

  • basicHttpRelayBinding
  • netTcpRelayBinding
  • ws2007HttpRelayBinding
  • serviceRegistrySettings
  • transportClientEndpointBehavior
  • tcpRelayTransport
  • httpRelayTransport
  • httpsRelayTransport
  • onewayRelayTransport

As soon as you start working, you will notice couple of issues.

  1. Broken Visual Studio IntelliSense, and
  2. Broken IIS 7.0/7.5 AppFabric settings.

For Broken Visual Studio IntelliSense, there is very good article (Intellisense when editing Service Bus configuration files? Yes please!) from Paolo Salvatori explaining how you fix it.

For the broken IIS 7.0/7.5 settings there are few blog posts recommending you to replace the ServiceBus_schema.xml file that comes as part of the Azure SDK samples under the "%SystemRoot%\System32\inetsrv\config\schema" folder.

Example 1:

http://www.infosysblogs.com/cloudcomputing/2011/06/basic_steps_to_expose_the_on-p.html#more

Once the Azure SDK installed, copy the ServiceBus_schema.xml file from <installation folder>\Labs\IntroServiceBus2010Part1\Source\Assets to %SystemRoot%\System32\inetsrv\config\schema directory.

Example 2:

http://msdn.microsoft.com/en-us/evalcenter/wazplatformtrainingcourse_introductiontotheappfabricservicebus2010part1_topic4

Additionally, as Windows Server AppFabric uses the Microsoft.WebAdministration (MWA) API to read and write configuration files, you will provide a custom MWA schema for some of the elements from the Web.config file to be correctly recognized. This will give you the possibility to enable the Auto-Start feature from the Internet Information Services (IIS) Manager.

  1. Copy the ServiceBus_schema.xml file located under the Source\Assets folder of this lab to the %SystemRoot%\System32\inetsrv\config\schema directory. This file contains the schema that will be used by the Windows Server App Fabric to read the configuration file for your service.

There is a better and easy way

The easy fix is to install the patch explained in this KB article http://support.microsoft.com/kb/980423

After installing the fix, I didn't encounter any issues on the AppFabric Server (IIS Manager 7.0) related to custom service bus WCF elements.

Nandri!

Saravana Kumar

Tags: |  Categories: Azure | AppFabric
Actions: Email this article Email | Kick it! | DZone it! | Save to del.icio.us | Technorati Links
Post Information: Permanent LinkPermalink | CommentsComments(0) | Comments RSS