File System permission for the BizTalk Server 2004 to 2020 File Adapters

File System permission for the BizTalk Server 2004 to 2020 File Adapters

Today, I will bring back to life another old BizTalk Server blog post, the last one, written by an old friend of mine, Thomas Canter, with his permission, that I find pretty interesting and helpful: File System permission for the BizTalk Server 2004 to 2010 File Adapters – be aware that I rename it to File System permission for the BizTalk Server 2004 to 2020 File Adapters. This was initially published on http://geekswithblogs.net/ThomasCanter, now retired.

I’m sure that over time, you’ve run into the dreaded File transport does not have read/write privileges for receive location error.

Usually, you simply go to the folder and either give the BizTalk Account Full Permission (bad) or Everyone Full Permission (really bad).

So, what are the absolute minimum permissions required for a production environment?

Receive File Adapter

For the Receive File Adapter, the explicit permissions are:

NTFS Attribute Property Name
DELETE Delete Files
FILE_READ_DATA List Folder / Read Data
FILE_WRITE_DATA Create Files / Write Data
FILE_APPEND_DATA Create Folders / Append Data
FILE_READ_EA Read Extended Attributes
FILE_WRITE_EA Write Extended Attributes
FILE_DELETE_CHILD Delete Subfolders and Files
FILE_READ_ATTRIBUTES Read Permissions
FILE_WRITE_ATTRIBUTES Write Attributes

How does this translate into what to do in the System?

Right-clicking on the folder and select Properties. In the security tab, setting Modify is not enough, though you would think so:

Strangely enough, the Delete Subfolders and Files attribute is not set when the Modify property is set. You need to add the FILE_DELETE_CHILD Delete Subfolders and Files Attribute:

Once you have added the Delete Subfolders and Files check box, you will have the minimum permissions for the file receive adapter.

Send File Adapter

The permission for the File Send adapter depends on what properties you have set in the Adapter’s Advanced properties:

If you have the Use temporary file while writing flag un-checked, then all you need are:

NTFS Attribute Property Name
FILE_WRITE_DATA Create Files / Write Data

If you have the Use temporary file while writing flag checked, then the flags you need are:

NTFS Attribute Property Name
DELETE Delete (or Delete Files)
FILE_WRITE_DATA Create Files / Write Data
FILE_DELETE_CHILD Delete Subfolders and Files
FILE_READ_ATTRIBUTES Read Permissions

Note: I couldn’t get the original pictures in good quality, so I decided to create and update the pictures to the current days but keep the essence of the original ones.

Hope you find this helpful! So, if you liked the content or found it helpful and want to help me write more content, you can buy (or help buy) my son a Star Wars Lego! 

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc.

He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

BizTalk FILE Adapter Error: File transport does not have read/write privileges for receive location

BizTalk FILE Adapter Error: File transport does not have read/write privileges for receive location

In the spirit of documenting all possible and imaginary errors, let’s address today a classic one: File transport does not have read/write privileges for receive location “DRIVE:FOLDER NAME”.

This happens more than you may think, and today after finish creating a backup port for testing a new process while I was trying to Enable the File receive location I got the following errors:

File transport does not have read/write privileges for receive location “C:BizTalkPortsIN_POLLING”.

BizTalk Server: File transport does not have read/write privileges for receive location - Error Descriptions

Followed by other similar warning messages:

The Messaging Engine failed to add a receive location “POLLING_FILE” with URL “C:BizTalkPortsIN_POLLING*.xml” to the adapter “FILE”. Reason: “File transport does not have read/write privileges for receive location “C:BizTalkPortsIN_POLLING”. “.

The receive location “POLLING_FILE” with URL “C:BizTalkPortsIN_POLLING*.xml” is shutting down. Details:”The Messaging Engine failed while notifying an adapter of its configuration. “.

Cause

As I said before this is a classic error, the reason is quite obvious and the error message clearly identifies the origin of the problem.

The problem is that the user that is running the BizTalk Server host instance(s) don’t have read/write privileges in that specific folder.

BizTalk Server: File transport does not have read/write privileges for receive location - User that is running Services

Solution

To solve this problem, you need to give readwrite privileges for the user that is running BizTalk Server Host Instance, in my case “BTSHostSrvc”, into that specific folder. For that you need to:

  • From the file system, access to the folder in question and then right-click on the folder and select the “Properties” option;
  • If attribute “Read-only (only applies to files in folder)” is enabled (selected), disable it (unselect);
  • Then go to the “Security” tab and then click “Edit…” button and then “Add…” button
    • Search for the user that is running the BizTalk Server Host Instance and then click “OK”;
    • For that specific user give read and write access;
      • In my case, because this was/is a “BizTalk process” folder, I gave “Full control”

BizTalk Server: File transport does not have read/write privileges for receive location - Give user Access

  • At the click “OK” and “OK” once again.

Once you give access to the user this classic problem is going away… until the next time!

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Flow’s to the help: How to extend SmartDocumentor OCR receive processing points (or locations) easily with Microsoft Flow

Flow’s to the help: How to extend SmartDocumentor OCR receive processing points (or locations) easily with Microsoft Flow

Following my last blog post on how to “Processing Feedback Evaluations (paper) automagically with SmartDocumentor OCR, Logic Apps, Azure Functions & Power BI”, I mention that you can try the solution yourself, at least part of the solution – the most important part – by sending an email with your survey to sandro.pereira.demos@gmail.com with the following subject “SmartDocumentorSurvey“ and that I had a very simple Microsoft Flow listening to this mailbox that:

  • Extracts the attachment;
  • Sends it to SmartDocumentor OCR
    • Send file to an on-premise folder;
  • And notifies you that the file was received;

In this post I will explain you can you use Microsoft Flow to easily extend any existing product, in my case, how I was able to easily extend SmartDocumentor OCR without me being an expert on that product – this DevScope team is super busy to spend to much time with me explaining me everything – jokes apart, I intension don’t want there help the product should be easy to use without requiring too much knowledge and I also want to see and try how people can easily extend and interact with the product in different ways.

For example, in this particular case we actually didn’t need any Flow because SmartDocumentor has the capability to listen to an Email but in that case, I confess that my knowledge of SmartDocumentor product and its tools are a little reduce and I will probably need the help for my coworkers to teach me how to do it. Nevertheless, I had my demo working in two different receive processing points (or locations):

  • Directly from the Scan device that I used on all my presentation demos;
  • Or thru a receiving folder.

I knew how to change that receive folder, I knew how I can easily connect and extract attachments using Microsoft Flow and I knew a very stupid and simple way to send that file to an “On-premise” folder using Flow… so, for me, it was a simple math operation: 1+1+1=solution!

As Logic Apps, the beauty of using Microsoft Flow’s is that provides almost all Logic Apps capabilities, once it runs on top of Logic Apps, it is part of my Office365 subscription and there for it provides a very simplify and robust way to also extend the capabilities of my OCR software but also by being very cheaper and fast to implement without requiring too much technical knowledge.

Flow’s to the help: The Solution

In order to be able to extend SmartDocumentor OCR receive processing points (or locations) with Microsoft Flow, we need to create a Flow and for that, we need to:

  • Access the Flow portal: https://flow.microsoft.com/ and sign in with your account
  • In flow.microsoft.com, select “My flows” in the top navigation bar, and then select “+ Create from blank” to create a Flow from scratch.

Flow's to the help: SmartDocumentor Listener Flow Create a blank Microsoft Flow

  • On the “Create a flow from blank”, select “Create from blank” to start the process of creating an empty Flow

Flow's to the help: SmartDocumentor Listener Flow Create a blank Microsoft Flow

  • On the Flow designer, on the Trigger event enter “Gmail” and select the option “Gmail – When a new email arrives”

Flow's to the help: SmartDocumentor Listener Flow Trigger Gmail

  • We want that all the email received with the “Subject: SmartDocumentorSurvey” will trigger this flow, so on the Gmail Trigger configuration:
    • Confirm that “Inbox” is configured in the “Label” property
    • Specify the filter, in my case all email that has the “Subject” equal to “SmartDocumentorSurvey”
    • And confirm that “Include Attachments” property is set to “Yes”

Flow's to the help: SmartDocumentor Listener Flow Trigger Gmail Configuration

  • Add the next step by clicking “+New step” button and then choose the “Add an action” option

Flow's to the help: SmartDocumentor Listener Flow Add action

After we receive the email we want to store/save the Survey attachment file on a specific folder where SmartDocumentor is listening, and there are several ways to archive this:

  • The most common will be using the File System connector that allows you to connect to any File Systems on your local or network machines using the On-Premises Data Gateway but this is also the most technical option which needs you to configure an On-Premises Data Gateway
  • Another option is to make use of Dropbox desktop client, that runs on Windows, Mac, or Linux operating systems and gives you access to your Dropbox directly through a folder on your hard drive. The advantages of this approach are that:
    • You don’t need any technical skills (no need to configure an On-Premises Data Gateway) and all users knows or are familiar will Dropbox;
    • We can easily store files in Dropbox using Flow;
    • And once synchronize to your local machine running SmartDocumentor, SmartDocumentor will peak that file and process it (deleting that file from the folder and from Dropbox) – and there isn’t too much latency on the file synchronization, Dropbox client is actually really good.

Because we want to keep this really simple and familiar to Business users we will go with the Dropbox approach, so for that, we will need to:

  • On the “Choose an action” window, enter “Dropbox” and select the trigger “Dropbox – Create file”

Flow's to the help: SmartDocumentor Listener Flow Dropbox create file

  • On the Dropbox action configuration:
    • Specify the folder in with you want to store the file, in my case: “/publicdemos/smartdocumentorsurvey”
    • On the “File Name” property, select from the list of tokens the “Name” token from the “When a new email arrives” trigger
    • On the “File Name” property, select from the list of tokens the “Content” token from the “When a new email arrives” trigger

Flow's to the help: SmartDocumentor Listener Flow Dropbox create file Configuration

    • Because we can have multiple attachments on a specific email, the Flow designer will automatically place this “Dropbox – Create file” inside a Loop that will iterate thru each attachment.

The last step we want is to notify the user that is testing the SmartDocumentor Survey solution that his email was received and is being processed, to do that we need to:

  • Add the next step by clicking “+New step” button and then choose the “Add an action” option
  • On the “Choose an action” window, enter “Gmail” and select the trigger “Gmail – Send email”

Flow's to the help: SmartDocumentor Listener Flow Gmail Action

  • On the Gmail action configuration:
    • On the “To” property, select from the list of tokens the “From” token from the “When a new email arrives” trigger
    • On the “Subject” property, specify the email subject, in my case: “SmartDocumentor submitted document”
    • On the “Body” property, we will specify the name of the file we are processing as well as the URL where you can consult the Survey Report. So, we are combining static text with some tokens provide from previous actions as you will see in the picture below.

08-SmartDocumentor-Listener-Flow-Action-Gmail-Configuration

    • Again, because we can have multiple attachments on a specific email, the Flow designer will again automatically place this “Gmail – Send email” action inside a Loop that will iterate thru each attachment.

At the end the flow will look like this:

Flow's to the help: SmartDocumentor Listener Flow Process

And once is triggered:

  • It will copy the attachment to a Dropbox folder that is being synchronized, with the use of the Dropbox desktop client, to our local SmartDocumentor server;
  • SmartDocumentor OCR will process this survey picture and it will do the process that was described in my previous post;
  • And finally, will send an email to the user that is testing this SmartDocumentor OCR solution

10-SmartDocumentor-Listener-SmartDocumentor-Flow-process-notification

I intentional want to keep this a first simple as possible, so there are some limitations in current approach:

  • You can send multiple form pictures in attach but you shouldn’t send any other type of pictures in attach (that aren’t surveys). Again, I can easily create some flow rules to validate but I didn’t implement nothing like that.
  • Avoid sending email signature with pictures, the process will work but it ends up having some SmartDocumentor and Logic Apps runs with failure (didn’t implement these type of validations but it is possible)

I will improve this approach in the future, stay tuned!

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Empowering Hybrid Integration recording is now online on Channel 9

Empowering Hybrid Integration recording is now online on Channel 9

Well, Empowering Hybrid Integration segment is online since January 30, 2017, but only now I realize that… During the MVP Global Summit, and taking the opportunity of having most of the Integration MVPs gathered at the event, Microsoft Pro Integration team tends to invite the MVPs to create short videos – 8 to 10 minutes videos – about Integration (on-premise or in the cloud). It happened in previous editions of the Summit and it happened in the last edition in which they invite us to talk about Hybrid Integration that includes BizTalk Server, Azure Logic Apps, Azure API Management and Azure Service Bus.

For several reasons, I never had the chance to accept the challenge in the past, but last year I was able to accept the invitation to speak and record at the “famous” Microsoft Building 20, building that is the home of Channel 9 studio …

Preparing myself to record my session about Empowering Hybrid Integration on Channel 9Preparing myself to record my session about Empowering Hybrid Integration on Channel 9

… and make a short talk about Hybrid Integration using Service Bus Queues, BizTalk Server, Dynamic CRM, SQL Server, Logic Apps and File.

Empowering Hybrid Integration: Technical Solution

Has I told in a previous post of my blog, that was my first experience, and I have to confess, I was a little nervous to be recording in a small professional studio, so as expected after seeing the record in its raw state, the end result could have been better, but, fortunately for you guys I was able to edit the video and remove some breaks/delays between switching from my presentation slides to my screen. Nevertheless, for a first experience, it went pretty well and I am happy with the result. The important for me is to face new challenges, different situations, leave my comfort zone and improve to be better next time.

The result is this 8 minutes video on Empowering Hybrid Integration where you can learn how you can create powerful hybrid integration solutions using existing on-premises and cloud based solutions.

Empowering Hybrid Integration recording at Channel 9

Fortunately, I had the company of my good friend Kent Weare in this small “adventure”:

Protecting Azure Logic Apps using Azure API ManagementProtecting Azure Logic Apps using Azure API Management

You can also watch his session about “Protecting Azure Logic Apps using Azure API Management”. In this video, you can learn how to use Azure API Management to protect your Logic Apps.

Protecting Azure Logic Apps using Azure API Management recording at Channel 9

You can watch more sessions regarding Microsoft’s Hybrid Integration Platform on Channel 9 here.

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.