SSO w/ External App

Try this, using the DLL’s

var wcfBinding = NetTcp.UsernameWindowsChannel();
	var appServer = new Uri("net.tcp://localhost/epicor10/erp/bo/part.svc");
	using (var partClient = new PartImpl(wcfBinding, appServer))
	{
		partClient.ClientCredentials.UserName.UserName = "Manager";
		partClient.ClientCredentials.UserName.Password = "Epicor123";
		bool morePages;
		var myPartDataset = partClient.GetList("", 10, 1, out morePages);
		foreach (var partRec in myPartDataset.PartList.Rows.Cast<PartListDataSet.PartListRow>())
		{
			Console.WriteLine(partRec.PartNum);
		}
		partClient.Close();
	}

You can change the binding from UserNameWindowsChannel() to just WindowsChannel to use Windows Auth

1 Like