BizTalk Adapter Service allows an application in the cloud to communicate with an on-premise Line-of-Business (LOB) system behind a firewall. Using the LOB adapters in BizTalk Adapter Pack (BAP), a BizTalk Adapter Service application can execute LOB operations to the following on-premise LOB systems:
There is an on-premise SQL Server that stores Customer data, including Name, Shipping Address, Order History, and Payment Methods. You want to develop a purchasing application. When the order is being placed, this application retrieves the Name, Shipping Address, Order History, and Payment Methods from this SQL Server database. The goal is to host the application in the cloud and have it retrieve the customer data from this on-premise SQL Server.
BizTalk Adapter Service is your answer. You continue to maintain your on-premise SQL Server and allow the cloud to host your application. You can execute any LOB operation, like DELETE, INSERT, SELECT, UPDATE, from your cloud application.
For further information please refer here.
BAS Architecture provides information on BizTalk Adapter Service Architecture.
Missing Pre-Requisites can cause issues in BAS installation. Please make sure you install all the required Pre-Reqs.
Here's the list of pre-requisites for BAS. There's a smaller list if the user is installing only runtime/tools but excluding that from this section.
Note: For Win 8/ Win Server 2012 machine, ASP.NET4.5 has to be enabled at 2 separate places.
7. ISAPI Extensions
8. ISAPI Filters
While anything missing from above list would prevent installation from succeeding, there are some additional pre-requisites for BAS to work correctly. The list includes
If the user is running into issues installing BAS, we should ask the user to run the setup with extended logging option "msiexec /i BizTalkAdapterService .msi /l*vx logFile.txt". The log file will have more details on the exact cause of the failure.
Common errors observed and reason for the same
In the setup, it prompts for the SQL server/instance name, Make sure it correctly maps to the SQL server on your local machine/ the server you are targeting.
This error generally prompts on Windows 8, 32-BIT machine. Please ensure ASP.NET 4.5 is installed on the machine. Please Install ASP.NET 4.5 and try re-installing the BAS setup.
Enable ISAPI/CGI filters: Enter
ERROR: System.UnauthorizedAccessException: Filename: redirection.config
Error: Cannot read configuration file due to insufficient permissions”
Please try running the setup with Administrator Privileges. Right Click on the Setup file and “Run as Administrator”
Please make sure that these three windows features are turned on your machine. These are required to serve the WCF .svc files.
1) After you have the BAS (BizTalk Adapter Service) setup installed in your machine. In Visual Studio, you can see a Server Explorer Component “BizTalk Adapter Services”
2) Right click on BizTalk Adapter Service and click on “Add BizTalk Adapter Service…”
Specify the server name on which your SQL data exists.
If you are targeting the local system specify “localhost” in the highlighted.
3) After establishing the connection you can see the following 5 LOB types.
Right click on the LOB type you want to connect to, SQL for instance.
4) Right click -> Add SQL target..
It throws this wizard and helps you in creating services for your on-premise LOB systems that can be accessed from the cloud.
Here specify the respective Sql Server database details:
Server: The server you want to target
Instance: The sql server instance you have in your machine, ex: sqlexpress
Catalog: The Name of the Database you want to access.
After entering these details Specify the respective credentials and click next..
Here I can select all the operations I can expose.
Consider the following EmpData table, here I want to expose all the 4 operations “Delete”, “Insert”, “Select”, “Update”.
Click on the desired operation and add it.
6) Runtime Security:
This is the critical part. This is the runtime security. The authentication that we specified in the Connection parameters is just the design time security. But this authentication specified here will be validated when we try connect to on-prem sql database. This Is the credentials that will be verified when a message come from the cloud.
We have 4 different options:
Select the respective secutiry type and click next.
A single LOB relay can host multiple LOB targets.
If you have an existing LOB Relay you can use that. You can select an existing relay.
You can create an entirely new relay.
If you want to create a new realy specify the 4 required fields: Namespace, Issuer name, Issuer Secret, Relay Path.
You need to provide a sub path to identify your target.
it shows the runtime URL based on the details we enter:
It shows a summary of details you entered cross check them and click create to create the relay on the service.. Congratulations J
You can see the LOB Target in the server explorer.
Now create a BizTalk Services project and In the MessageFlowItinerary.bcs file just drag the required LobTarget..
Any message sent to the runtime Address path, shown in the propeties of the LobTarget properties, will be targeted to the On-Premise SQL DataBase you are connected to.
PowerShell is a Windows command-line shell typically used by system administrators. The BizTalk Adapter Service Runtime Server utilizes the cmdlet (command-let) ability of PowerShell to expose the LOB Relay and LOB Target entities. Using PowerShell, BizTalk Adapter Service Administrators can manage the BizTalk Adapter Service Runtime Service and these LOB entities. The BizTalk Adapter Service PowerShell cmdlets can be executed directly on the BizTalk Adapter Service Runtime server or on any other server.
For further information on BAS PowerShell Cmdlets please refer here.