AWS-Lambda .NET Core – How to reference System.Data.SqlClient

I needed to access an RDS database (relational data store) from a C# Lambda function.? It took me a while to figure how how to reference it. Build Error: C# Core:System.Data.SqlClient “Data” does not exist in namespace System Solution: Run the following under the Nuget Package console. Install-Package System.Data.SqlClient -Version 4.1.0 Note, it might not […]

AWS-Lambda – C# – JsonReaderException – Unexpected character encountered while parsing value (line 1, position 1)

This blog explains in more detail why you are probably getting the error and provides two solutions, depending on whether you want to pass just a string or JSON. Error: </pre> { "errorType": "JsonReaderException", "errorMessage": "Unexpected character encountered while parsing value: {. Path '', line 1, position 1.", "stackTrace": [ "at Newtonsoft.Json.JsonTextReader.ReadStringValue(ReadType readType)", "at Newtonsoft.Json.JsonTextReader.ReadAsString()", […]

BizTalk – Reporting How Many Files Processed By App/Date

Often, after implementing a new system or application on BizTalk, we need to provide a report to management of how many files were processed. If you keep an archive of all files in or out, you can use that with a simple PowerShell to accomplish the report. Here’s an example I found: PowerShell Example 1 […]

Powershell RegEx – to find all matches in a file

cls $filename = "c:\Users\Neal\OneDrive\Documents\myFile.html" #example of what I'm trying to pick out <strong>mydomainname.com</strong> $regexPattern = "<strong>(.*?)</strong></a>" gc $filename | Select-String -Pattern $regexPattern -AllMatches | ForEach-Object {$_.matches.groups[1].value} Note that the Matches returns two groups with subscripts 0 and 1. The subscript 0 contains the tags “strong” around the match. the subscript 1 contains just the captured […]

C# Program to Monitor BizTalk

If you are interesting in using C# to Monitor Biztalk, instead of Powershell to Monitor BizTalk, or Powershell to Monitor Diskspace, or Powershell to Monitor EventLogs (and send out emails) then check out this blog and sample code: https://prashantbiztalkblogs.wordpress.com/2017/08/30/monitoring-biztalk-resources-programmatically-using-c/ I didn’t run it, but it looks like a good sample to get started with.  

Powershell to Rename Files to Add Date To Filename

With the SFTP ports in BizTalk 2013, we are using the log function. BizTalk appends each SFTP log to the end of the existing log file. So I created a Powershell Script to take an array of directory names, and run the same re-run and delete logic for each. I also include the logic to […]

BTDF Error with Project Reference

You get the following error when you do a BTDF deploy. Error: x does not belong to the same application as “Y” or its references. Full example of error    Information: Importing bindings "C:\Users\…\Projects\MyEDIProject\MyEDIProject.Deployment\PortBindings.xml" into application "MyEDIProject" in BizTalk configuration database (server="MyServer1", database="BizTalkMgmtDb")…   Error: Failed to update binding information.   "Microsoft.BizTalk.Edi.DefaultPipelines.EdiSend" could not be bound to […]

Powershell RegEx to parse EDI Files

NOTE: If have a newer blog that uses what is demonstrated in this blog to format and rename all EDI files in a disk directory The one thing I didn’t account for (yet), is the case where different files can have different EDI delimiters. Technically, you should look for the end of the ISA segment […]

How to Filter by Filename by Mask in BizTalk

Business Requirement: Only send an email to the credit department if the filename contains the word “EXPORT” and and ends with .txt. We cannot put *EXPORT*.txt in the Receive Location, because there are other files coming in with different patterns. Question: How would you do that in BizTalk? BizTalk has filters on the send ports. […]

BizTalk AS2 Error: The underlying connection was closed: The connection was closed unexpectedly.

The underlying connection was closed: The connection was closed unexpectedly. I’m sure there are numerous reasons for this error, but here’s one I encountered today. First the background. We have BizTalk server connecting to an internal Open/AS2 server running on Linux. That Linux server was re-installed on a Virtual Machine; and I had agreed with […]