Question

Using Access Provider in Apps 10

  • 4 March 2020
  • 5 replies
  • 859 views

Userlevel 6
Badge +14

Hi all,

We are using Access Provider extensively in Apps 9 and are about to upgrade to Apps 10. We will have to continue using Access Provider for some time after the upgrade.

Question is, what is the best way to set it up. It is working if I change the address to:

https://xx.xx:48080/main/compatibility/clientgateway

and include (C#):

System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;


But is that the right way doing it?

Code example (aps.net):

using Ifs.Fnd.AccessProvider;
using Ifs.Fnd.AccessProvider.PLSQL;
using Ifs.Fnd.Data;
using System;
using System.Net;

public partial class WebIfsTest01 : System.Web.UI.Page
{
public static string serverUrl = "https://xx.xx:48080/main/compatibility/clientgateway";
public static string username = "xx";
public static string password = "xx";
public static string locale = "en-US";

protected void Page_Load(object sender, EventArgs e)
{}

protected void Button1_Click(object sender, EventArgs e)
{
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;

var fndConnection = new FndConnection(serverUrl, username, password);

string stSQL = "select Part_no from inventory_part where part_no= '15000'";
FndPLSQLSelectCommand cmd = new FndPLSQLSelectCommand(fndConnection, stSQL);

FndDataTable dt = new FndDataTable();

dt = cmd.ExecuteReader();

foreach (FndDataRow row in dt.Rows)
{
lblInfo.Text = ((FndAttribute)row["Part_no"]).ToString();
}
}

private static FndConnection Cnn()
{
var fndConnection = new FndConnection(serverUrl, username, password);

fndConnection.InteractiveMode = false;
fndConnection.UseCompression = false;
fndConnection.Locale = locale;

return fndConnection;
}
}

 


5 replies

Userlevel 7
Badge +20

Hi @Hans Andersen,

You said 

It is working if I change the address to:

https://xx.xx:48080/main/compatibility/clientgateway

 

according to the URL pattern, I guess you are using App9 dll to connect to app10 environment? It is best to use Apps10 Dlls so you won’t have to change much.

 

With Apps10 dlls, Connection URL looks like this

public static string serverUrl = "https://[SERVER_URL]:[PORT]";

 

You can let the access provider to use Basic authentication by setting the property FndConnection.CompatibilityMode

 

below is a working example based on your code

using System;
using System.Windows.Forms;

using Ifs.Fnd.AccessProvider;
using Ifs.Fnd.AccessProvider.PLSQL;
using Ifs.Fnd.Data;
using Ifs.Fnd;
using System.Net;

namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
private static FndConnection conn;
public static string serverUrl = "https://URL:48080";
public static string username = "xx";
public static string password = "xx";
public static string locale = "en-US";
public Form1()
{

InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
try
{
//This is already handled by IFS server. not needed?
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;

conn = new FndConnection(serverUrl, username, password);
conn.CatchExceptions = false;

conn.InteractiveMode = false;
conn.UseCompression = false;
conn.Locale = locale;
conn.CompatibilityMode = true;

FndPLSQLSelectCommand cmd = new FndPLSQLSelectCommand(conn, "select * from fnd_user where identity = :ID");
cmd.BindVariables.Add(new FndBindVariable(FndBindVariableDirection.In, "ID", new FndTextAttribute("MIKA")));

FndDataTable table = cmd.ExecuteReader("FND_USER");

for (int i = 0; i < table.Rows.Count; i++)
{
lblInfo.Text = table.Rows[i]["DESCRIPTION"].ToString();
}
}
catch (FndException err)
{
err.Show();
}
}
}
}

 

Hope it helps.

Cheers!

Userlevel 6
Badge +14

@dsj , Thanks

I am using apps9 dll’s, because I have to test against both 9 and 10. If I just replace the apps9 dll’s with apps10, it is working fine on 10 (thanks god), both not on 9.

Running apps10 with compatibility and apps9 dll’s, it ‘should’ work, but in our environment it is very unstable.

My conclusion. When upgrading to apps10, replace apps9 dll’s. Do not run with the apps9 dll’s. 

Userlevel 7
Badge +20

@dsj , Thanks

I am using apps9 dll’s, because I have to test against both 9 and 10. If I just replace the apps9 dll’s with apps10, it is working fine on 10 (thanks god), both not on 9.

Running apps10 with compatibility and apps9 dll’s, it ‘should’ work, but in our environment it is very unstable.

My conclusion. When upgrading to apps10, replace apps9 dll’s. Do not run with the apps9 dll’s. 

 

Hi @Hans Andersen ,

 

I haven’t user .NET access provider that much but Java Access provider for Apps10 is backward compatible and can be use with older IFS versions by setting ifs.fnd.ap.Server.setLegacyUrl()

 

I think your requirement is fair and there will be many customers running Apps10 and older version in parallel. If this feature is not in .NET AP, maybe you can contact RnD to implement it?

Userlevel 6
Badge +14

If this feature is not in .NET AP, maybe you can contact RnD to implement it?

 

It is not that big of a problem, when you know about it. For the ones interested, this is how I change between the two version in Visual Studio:

  • Right click the project
  • Property Page
  • Reference
  • Remove the IFS dll’s
  • Drag the new dll’s into the project

If someone has a better/faster way, I’ll like to know.

Userlevel 4
Badge +8

The namespace is shared on the IFS DLLs so to get both sets of DLLs to work on the same project you either have to wrap the DLLs in your own connector or reference the DLLS in a custom namespace and alias the DLLs when referencing them.

 

Reply