Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom connection parameters don't seem to be working #82

Open
oliverkahrmann-basf opened this issue Mar 15, 2023 · 0 comments
Open

Custom connection parameters don't seem to be working #82

oliverkahrmann-basf opened this issue Mar 15, 2023 · 0 comments

Comments

@oliverkahrmann-basf
Copy link
Contributor

I am following the description from the Readme and have implemented this parameters class:

	/// <summary>
	/// Connection parameters for SapNwRfc, with additional parameters we need.
	/// </summary>
	public class SapConnectionParametersExt : SapConnectionParameters {

		/// <summary>
		/// Specify whether to use SNC single sign-on or not if SNC is enabled. Possible values are:
		/// 0:  don't use SNC single sign-on
		/// 1:  use SNC single sign-on(default)
		/// </summary>
		[SapName("SNC_SSO")]
		public string SncSSO { get; set; } = "1";
	}

Usage is like this:

// Connection Parameters
var myParams = new SapConnectionParametersExt();

// Set other parameters here

myParams.SncSSO = "0";

var conn = new SapConnection(myParams);
conn.Connect();

From what I can see in the system audit logs, it still attempts an SSO connection (which fails for my specific use case => different user name).

The relevant code which works with the parameters always uses typeof(SapConnectionParameters) or an indirect version via type parameters which, to my knowledge, will never return the custom parameters on my subclass.
To support that, it would have to use parameters.GetType() to get the actual runtime type.

@oliverkahrmann-basf oliverkahrmann-basf changed the title Custom parameters don't seem to be working Custom connectionparameters don't seem to be working Mar 15, 2023
@oliverkahrmann-basf oliverkahrmann-basf changed the title Custom connectionparameters don't seem to be working Custom connection parameters don't seem to be working Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant