I have problems logging in to old style Soap Service using NET 6.0. If I use 4.8 the login process is straight forward. But the generetad code from http://media.atg.se:80/info/PartnerInfoService/version11?WSDL differs between 6.0 and 4.8. In 6.0 I get this "todo" from generated code:
public partial class PartnerInfoServicePortClient : System.ServiceModel.ClientBase<ATGAIS.PartnerInfoServicePort>, ATGAIS.PartnerInfoServicePort
{
/// <summary>
/// Implement this partial method to configure the service endpoint.
/// </summary>
/// <param name="serviceEndpoint">The endpoint to configure</param>
/// <param name="clientCredentials">The client credentials</param>
public static partial void ConfigureEndpoint(string serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);
. . . //more generated methods . . . }
I just can't figure out HOW to implement it. The site requires ClientCredentials which I don't know how to set in 6.0. For 4.8 it was very simple as follows:
var partnerInfoService = new PartnerInfoService();
//Log in with credentials
try
{
partnerInfoService.Credentials = new NetworkCredential("Username", "Password");
}
catch (Exception ex)
{
MessageBox.Show($@"Error: {ex.Message}");
throw;
}