Search This Blog

Monday 30 December 2019

Error while inserting the data to SQL Server from BizTalk WCF-SQL Send Port

Good day all,

When BizTalk is inserting the data into the custom database that you have we might encounter a lot of issues.
The below error is one among many other common issues that we get in non-Production servers.

Error:
System.Data.SqlClient.SqlException (0x80131904): Could not allocate space for object 

'YourTableName'.'YourPrimaryKeyName' in database 'YourDatabaseName' because the 'PRIMARY' filegroup is full. 

Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the 

filegroup, or setting autogrowth on for existing files in the filegroup.

Server stack trace: 
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at System.ServiceModel.Channels

Cause:

SQL Server databases have .mdf (PRIMARY data file) and .ldf(log data files). On each database, we can set the Initial Size(in MB) and Autogrowth/ Max size for data and log files on the database.

As the data gets inserted into the database the files grow accordingly. 

Solution:

When the SQL Server database data files are full we encounter the above issue. We need to fix the storage issues on the DB Server.

Friday 20 December 2019

When SFTP send port is Configured with port number different from the port number that SFTP site is configured on.

Hi All,

Hope you are all doing well.

Below is my observation when SFTP send port is configured to run on a different port than Destination SFTP site configured port.

WinSCP.SessionRemoteException: Network error: Connection to "FTPServerIP or FTPDNSName" timed out. ---> WinSCP.SessionRemoteException: The server rejected SFTP connection, but it listens for FTP connections.

Did you want to use FTP protocol instead of SFTP? Prefer using encryption.
   --- End of inner exception stack trace ---

Server stack trace: 
   at WinSCP.SessionLogReader.Read(LogReadFlags flags)
   at WinSCP.ElementLogReader.Read(LogReadFlags flags)
   at WinSCP.SessionElementLogReader.Read(LogReadFlags flags)
   at WinSCP.CustomLogReader.TryWaitForNonEmptyElement(String localName, LogReadFlags flags)
   at WinSCP.CustomLogReader.WaitForGroupAndCreateLogReader()
   at WinSCP.Session.Open(SessionOptions sessionOptions)
   at Microsoft.BizTalk.Adapter.Sftp.SftpConnection.OpenUnderlyingConnection(SftpConnectionProperties connectionProperties)
   at Microsoft.BizTalk.Adapters.CommonHelpers.Connection`3.ConnectionPool`3.GetConnection(T1 connectionProperties, TimeSpan timeout)
   at Microsoft.BizTalk.Adapters.CommonHelpers.Connection`3.GetConnection(T connectionProperties, TimeSpan timeout)
   at Microsoft.BizTalk.Adapter.Sftp.SftpOutputChannel.Send(Message message, TimeSpan timeOut)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

Exception rethrown at [0]: 
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.EndSend(IAsyncResult result)

Exception rethrown at [1]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at System.ServiceModel.Channels.IOutputChannel.EndSend(IAsyncResult result)
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendCallback(IAsyncResult result)

Tuesday 17 December 2019

BizTalk FF Pipeline: The remaining stream has unrecognizable data.

Hi All,

Hope everyone is enjoying the festive season.

Another small article on the error that I have got when I am handling the Flat file message on the receive side.

Error:-
The remaining stream has unrecognizable data and HRESULT:c0c01464 in BizTalk on the
Log Name:      Application
Source:        BizTalk Server
Date:          2019-12-17 10:34:33 AM
Event ID:      5753
Task Category: BizTalk Server
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      YourBizTalkServerName
Description:
A message received by adapter "BiztalkMessagingEngine" on receive location "YourReceiveLocationName" with URI "YourLocationAddress" is suspended.
 Error details: There was a failure executing the receive pipeline: "YourPipelineFullyQualifiedName, YourProjectName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=27a168965285aebe" Source: "Flat file disassembler" Receive Port: "YourReceivePortName" URI: "YourLocationAddress" Reason: The remaining stream has unrecognizable data. 
 MessageId:  {BC21C975-006C-418F-97A5-EAAE7472C0E8}
 InstanceID: {0DA3DA9D-1234-4D0A-B623-68159BF68DDA}
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="BizTalk Server" />
    <EventID Qualifiers="49344">5753</EventID>
    <Level>2</Level>
    <Task>1</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2019-12-17T08:34:33.000000000Z" />
    <EventRecordID>199652</EventRecordID>
    <Channel>Application</Channel>
    <Computer>YourBizTalkServerName</Computer>
    <Security />
  </System>
  <EventData>
    <Data>{BC21C975-006C-418F-97A5-EAAE7472C0E8}</Data>
    <Data>{0DA3DA9D-1234-4D0A-B623-68159BF68DDA}</Data>
    <Data>BiztalkMessagingEngine</Data>
    <Data>Your location address</Data>
    <Data>YourReceiveLocationName</Data>
    <Data>There was a failure executing the receive pipeline: "YourPipelineFullyQualifiedName, SYourProjectName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=27a168965285aebe" Source: "Flat file disassembler" Receive Port: "YourReceivePortName" URI: "YourLocationAddress" Reason: The remaining stream has unrecognizable data.  </Data>
  </EventData>
</Event>

Cause:- In my case, I have a repeating record which is separated with the LF(Line Feed) character, For some reason, the source system has generated the file with an extra LF character after the first record (first line) which is where the problem is. On the Schema, after first LF, the pipeline is expecting a new record. In my case instead of the new data record, there is another LF which is causing the pipeline to fail with the above-mentioned error.

Solution:- Souce System to correct the behaviour

Execute the FFDASM to create the scenario:- Below is the error when I ran FFDASM.
ffdasm.exe yourTestInputFile.FileExtention -bs yourSchema.xsd

HRESULT:        c0c01464


Sending Email to Multiple recipients using PowerShell

Hi All,  Below is the working code to Send emails to Multiple recipients using PowerShell. [STRING]$PSEmailServer = "YourSMTPServerIPOr...