In my BizTalk server, I would like to create custom orchestrations for fetching data from various sources such as REST APIs, SFTP folders, etc. I would like to store the parameters of the REST API requests or SFTP access requests in a DB and use them in the Orchestration when making the request. I am aware BizTalk has a built-in SQL Server. Does it have a DB that can be used for storing such parameters or reference data or metadata?
For this need, there are wo options
Option 1:
If you are dealing with only few values, you can add them to BTSNTSvc.exe.config and read your appSettings like a .Net config file
Option 2 :
Using SSO config. refer to Biztalk config in SSO
Related
We have several app service APIs which will read from same Cosmos DB. We want each API use different connection string for security reason. But from Azure portal, seems we can only have 2 master connection strings and 2 read-only connection strings.
Can I generate more read-only connection strings?
That is not directly supported, but there are other ways to achieve what you're looking for.
Essentially, you are now using the 'Master Keys' approach to define your connection string. You are building it by specifying the account and one of the 2 master keys to access your data.
The only other approach available is the 'Resource Token' approach. In this architecture you'd have a middleware tier that is configured with a secure connection to your Cosmos account using one of the master keys, and all the applications (that need to be individually secured) call on to this layer for an access token.
In this approach you will have to manage authentication of your clients to your middleware so it's definitely more involved, but ultimately more secure, especially if your APIs are deployed outside of your environment.
See the official docs page for all the details about Resource Tokens.
I have to integrate third party system through BizTalk 2013. The third party providing below two option for integration:
Flat files (File Adapter)
Web Service API (WCF-BasicHttp Adapter)
What is the best way to integrate and what are the pros and cons of these? I am a beginner and want an expert opinion.
It is usually preferable to use a web service over a flat file.
With a web service you can
Retain the order the messages were received in (you cannot guarantee that with the file adapter)
It is more secure (especially if you use HTTPS) rather than having files sitting in a folder.
You can give a synchronous response to the caller, either just a receipt or even the results from the downstream system.
Advantages of the File adapater
If you know a downstream system is going to be off for a while, you can disable the File adapater and stop picking up the incoming files until you are ready to resume processing. If there is a large number you may wish to move some of the files out and submit them in batches to prevent BizTalk throttling.
If you create an archive of files, you can easily re-submit messages when needed.
You can debatch large files into individual messages easily.
So in conclusion, there is no best way, it depends on the capabilities of the system you are integrating with and the nature of the messaging.
Consider following factors to decide between Web Service and File Adapter.
How much data you want to send and Is it batched or real time? if its batched and data size could be large, consider using File adapter unless third party system has capability to support SOAP with attachments (Mtom)
Want to receive a response/acknowledgment of message(s) sent - this you can only achieve using web services
Is third party system hosted within network or outside your company network - its easy to call a public web service rather than configuring File adapter
Security - you get always better security with web services such as SSL and much more.
I need to implement a file upload service, which may include some larger files. I initially used a WCF service and was using non streamed (i.e. I sent a byte[]), but would get out of memory exception (reading a file into the byte[] on the client).
I then tried using Streams in the WCF. This seemed to work fine for large files, but the huge restriction is that you seem to need to only send the Stream by itself. I don't seem to be able to also send the file metadata (e.g. filename, timestamp etc)
This service may have many client apps uploading, so I can't really see how to match up file meta data sent in a separate call to just a stream with no other information.
I am wondering if Web API may be a better way. I haven't tried it yet, but in some samples I have seen, you appear to be able to send other data along with the stream.
If using Web API, it will be self hosted (not running, in IIS, it will be running in a Windows service).
So, to me it is starting to look like Web API may be a better choice here? Or is there a way to send metadata with a file Stream in WCF?
Thanks in advance for any ideas!
You can achieve it using WCF by wrapping necessary metadata in a data contract or message contract object. You can refer the implementation on: http://www.codeproject.com/Articles/166763/WCF-Streaming-Upload-Download-Files-Over-HTTP
Web API is an alternative if your clients prefer to communicate in JSON/XML and you do not want to worry about the serialization/deserialization of JSON/XML in WCF. Your client can send a HTTP POST request with multipart/form-data content type to upload the file using Web API.
i m having two databases in different environments but both are having same data.Presently my application connecting one database .I need to disconnect that database and i want to connect another database .Is it possible to connect to another database? If Its possible then what are things i have to modify in the application code.
Is it possible to connect to another database?
Yes.
If it is possible then what are things I have to modify in the application code.
You need to change the Data provider APIs especially if you are working with the database specific API e.g Ms-Sql server (SqlClient) or ODP.net (oracle).
For further, read - Data Access Application Block and .NET Data Access Architecture Guide.
I am building a web app for which I need a bit of guidance in design. We have one application from vendor which uses SQL Server 2005 as database. Let’s say vendor’s application provides details on Order etc.
The web app that I am building will have its own database (SQL Server 2005). For my application to get any details about “Orders”, it needs to go thru BizTalk. So the flow would as below
a. User will type the order id in
TextBox (Web App), click submit
button.
b. Biztalk needs to receive this
order id, give this order id to
Vendor’s SQL Server Database to
retrieve the order details.
c. Order details should be sent back
to the Web App.
d. I also want to make sure that this
whole process (from a-c ) should be
real quick, as we do postback to
retrieve the information from
database.
Adding BizTalk into the application flow that you described will add a lot of overhead. It would be simpler, run faster, and likely be cheaper to create a WCF service that sits between the web app and the vendor's database for Orders.
BizTalk provides reliable messaging. So the application flow, as described in the question, would look something like this:
Web App Submit/Postback (IIS)
BizTalk Receive (IIS or MSMQ or whatever adapter you want)
BizTalk SQL Database
BizTalk Send (Request)
SQL Server Query Result
BizTalk Receive (Response)
BizTalk Database
BizTalk Send
Web App Receives Response (IIS)
With that you get message persistence and reliability. If something breaks (e.g., the vendor's SQL database is offline) there will be a suspended message in BizTalk and the web app will time out waiting for the synchronous response from BizTalk. Or you could also capture the error and pass it back to the web app using BizTalk and add more overhead to the process.
If you are only getting existing orders (i.e., not creating/updating/deleting orders), then you do not need your messages/transactions to be so reliable or expensive. If something fails the user will see an error and just submit again until it works (you can log the errors on the server to notify an admin, if desired).
Using something like a WCF service—perhaps with Entity Framework sitting atop the vendor's database—would still allow you to abstract the vendor's database from your web app and also provide:
Faster response times
No additional infrastructure (e.g., additional BizTalk services and SQL Server databases) since just runs in IIS
Less additional training for a developer who is already familiar with ASP.NET and not with BizTalk
This is really not an appropriate use for BizTalk. It would be more appropriate to write a WCF Serivce on your web server to expose the SQL Data. Have the app call the service directly. This will meet your requirement for real quick. BizTalk's reliable messaging comes at a cost... peristence points. By the time you request and receive the data, BizTalk will be writing and reading the data to the database many times. If the user was submitting an order, BizTalk would be preferrable for this as once the web app passes the order to BizTalk, you're guaranteed it will not be lost.
As another quick note, I am not up to date on all the cool new features in SQL Server, but I believe there is a way to have SQL exposes your data directly as a web service for consumption by your web app.