Hello
We are trying to setup a new BizTalk 2020 POC. But we are having some problems on the SAP adapter.
When I start the receiving port it crashes immediatlly with the next error:
The Messaging Engine failed to add a receive location "From SAP-ERP IDOC WCF-SAP" with URL "sap://Client=100;Lang=NL;@d/SAP_ERP_SERVER/?ListenerDest=SAP_ERP_IN" to the adapter "WCF-Custom". Reason: "Microsoft.ServiceModel.Channels.Common.ConnectionException: Access to the path 'ApplicationData\' is denied. ---> System.UnauthorizedAccessException: Access to the path 'ApplicationData\' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
at Microsoft.Adapters.SAP.NCo.SAPRfcFileParameters.AddSectionHeadersToIniFile(String iniFilePath, String tempFilePath)
at Microsoft.Adapters.SAP.NCo.SAPRfcFileParameters.GetConfigParamsFromIniFile(String destNameFromUri)
at Microsoft.Adapters.SAP.NCo.RfcClientConnection.GetParameters(String destinationName)
at Microsoft.Adapters.SAP.NCo.RfcClientConnection.Open()
at Microsoft.Adapters.SAP.SAPConnection.OpenNCoConnection()
at Microsoft.Adapters.SAP.SAPConnection.Open(TimeSpan timeout)
--- End of inner exception stack trace ---
at Microsoft.Adapters.SAP.SAPConnection.Open(TimeSpan timeout)
at Microsoft.ServiceModel.Channels.Common.Design.ConnectionPool.GetConnection(Guid clientId, TimeSpan timeout)
at Microsoft.ServiceModel.Channels.Common.Design.ConnectionPool.GetConnectionHandler[TConnectionHandler](Guid clientId, TimeSpan timeout, MetadataLookup metadataLookup, String& connectionId)
at Microsoft.ServiceModel.Channels.Common.Channels.AdapterChannelListener`1.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at Microsoft.Adapters.Internal.LayeredChannelBindingElement.LayeredChannelListener`1.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfReceiveEndpoint.Enable()
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfReceiveEndpoint..ctor(BizTalkEndpointContext endpointContext, IBTTransportProxy transportProxy, ControlledTermination control)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfReceiver`2.AddReceiveEndpoint(String url, IPropertyBag adapterConfig, IPropertyBag bizTalkConfig)".
I think somebody made a fault in the SAP adapter. It think somebody wrote something like this
Directory.CreateDirectory(Environment.SpecialFolder.ApplicationData.ToString());
But it should have been this
Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData.ToString()));
Kind regards
benny verhamme signed