Hi i have tried that sample which you provided. still, if the port number is 389, it is working. if i change the port number is 636 getting an Error : "Server Down. Result: 81. Method: ldap_connect" .
using LdapForNet; using LdapForNet.Native; using System; using System.Linq; using System.Threading.Tasks;
namespace LdapSample { class Program { static async Task Main(string[] args) { var server = "10.1.1.130"; //var serverPort = 389; var serverPort = 636; var baseDc = "dc=killotp,dc=com"; var adminUserName = "james"; var adminPassword = "testpwd"; var testUserName = "james"; var testPassword = "testpwd";
using (var ldapConnection = new LdapConnection())
{
ldapConnection.Connect(server, serverPort, Native.LdapSchema.LDAP, Native.LdapVersion.LDAP_VERSION3);
try
{
await ldapConnection.BindAsync(Native.LdapAuthType.Simple, new LdapCredential
{
// Configure username according to your LDAP config:
// cn=admin,dc=abp,dc=com or just username.
//UserName = $"cn={adminUserName},{baseDc}",
//Password = adminPassword
UserName = adminUserName,
Password = adminPassword,
});
Console.WriteLine($"{adminUserName} login success!");
// Configure filter according to your LDAP config:
// (&(uid=admin)) or (&(objectClass=user)(sAMAccountName={admin}))
var searchResults = await ldapConnection.SearchAsync(baseDc, $"(&(sAMAccountName={testUserName}))");
Console.WriteLine();
Console.WriteLine($"{testUserName} attributes:");
var userEntry = searchResults.First();
Console.WriteLine(string.Join(", ", userEntry.ToDirectoryEntry().Attributes));
await ldapConnection.BindAsync(Native.LdapAuthType.Simple, new LdapCredential
{
UserName = userEntry.Dn,
Password = testPassword
});
Console.WriteLine();
Console.WriteLine($"{testUserName} login success!");
}
catch (Exception e)
{
Console.WriteLine(e);
}
Console.ReadKey();
}
}
}
}
Function: protected async override Task ConnectAsync(ILdapConnection ldapConnection) { var port = await LdapSettingProvider.GetServerPortAsync(); Logger.LogInformation("LDAP Connect override function called"); var schema = port == 636 ? LdapForNet.Native.Native.LdapSchema.LDAPS : LdapForNet.Native.Native.LdapSchema.LDAP; Logger.LogInformation($"LDAP Binding props: Host :- {await LdapSettingProvider.GetServerHostAsync()} - Port :- {await LdapSettingProvider.GetServerPortAsync()} - Schema :- {schema.ToString()} - version :- {LdapForNet.Native.Native.LdapVersion.LDAP_VERSION3.ToString()}"); ldapConnection.Connect(await LdapSettingProvider.GetServerHostAsync(), await LdapSettingProvider.GetServerPortAsync(), port == 636 ? LdapForNet.Native.Native.LdapSchema.LDAPS : LdapForNet.Native.Native.LdapSchema.LDAP,LdapForNet.Native.Native.LdapVersion.LDAP_VERSION3); } Values Logging: LDAP Binding props: Host :- 10.1.1.130 - Port :- 636 - Schema :- LDAPS - version :- LDAP_VERSION3 Exception: LdapForNet.LdapException: Server Down. Result: 81. Method: ldap_connect at LdapForNet.Native.LdapNative.ThrowIfError(Int32 res, String method, IDictionary`2 details) at LdapForNet.Native.LdapNativeWindows.LdapConnect(SafeHandle ld, TimeSpan connectionTimeout) at LdapForNet.LdapConnection.BindAsync(LdapAuthType authType, LdapCredential ldapCredential) at Volo.Abp.Identity.ExternalLoginProviders.Ldap.OpenLdapManager.AuthenticateLdapConnectionAsync(ILdapConnection connection, String username, String password) in D:\Git_Sandbox\XSenseOne\modules\Volo.Identity.Pro\src\Volo.Abp.Identity.Pro.Domain\Volo\Abp\Identity\Ldap\OpenLdapManager.cs:line 80 at Volo.Abp.Identity.ExternalLoginProviders.Ldap.OpenLdapManager.AuthenticateAsync(String username, String password) in D:\Git_Sandbox\XSenseOne\modules\Volo.Identity.Pro\src\Volo.Abp.Identity.Pro.Domain\Volo\Abp\Identity\Ldap\OpenLdapManager.cs:line 101
I have configured the Local Active Directory (AD) as an external LDAP server. When I set the private port to 636 (the default LDAPS port) and try to log in using an LDAP user and password, I receive an error. However, when I change the port to 389 (the default LDAP port), I am able to log in successfully.
Error: Executing AbpApplicationConfigurationAppService.GetAsync()... 2025-07-28 17:43:06.952 +05:30 [INF] Authorization failed. These requirements were not met: ClaimsAuthorizationRequirement:Claim.Type=tokenType and Claim.Value is one of the following values: (user) 2025-07-28 17:43:06.952 +05:30 [INF] Authorization failed. These requirements were not met: ClaimsAuthorizationRequirement:Claim.Type=tokenType and Claim.Value is one of the following values: (machine) 2025-07-28 17:43:06.960 +05:30 [DBG] Executed AbpApplicationConfigurationAppService.GetAsync()
Hi maliming,
IIS logs issue has been resolved. there i am hosting the application in inuthub/wwwroot folder. because of that logs file not created. I have moved the publish files to dfault c drive and given that path in the iis hosting.
Thanks for the support
Hi,
getting this error for submitting the form in the settings components
Error: Lepton.Global.9ED3DF…8868847459041541:14 PUT https://fabdemo.xsensemfa.live/api/app/aad-configuration 500 (Internal Server Error) send @ Lepton.Global.9ED3DF…8868847459041541:14 ajax @ Lepton.Global.9ED3DF…8868847459041541:14 (anonymous) @ Lepton.Global.9ED3DF…8868847459041541:15 Deferred @ Lepton.Global.9ED3DF…8868847459041541:14 abp.ajax @ Lepton.Global.9ED3DF…8868847459041541:15 ensurity.aMS.aadConfiguration.aadConfiguration.update @ ServiceProxyScript:1 (anonymous) @ VM373:1 dispatch @ Lepton.Global.9ED3DF…8868847459041541:14 y.handle
here when i try to save the form i am getting the error which i hilighted in the inspect
But in my local debug i am not getting any issues. After hosting the application in iis i am facing this issues . For the SMTP settings also i am getting the same issue.
Hi,
i have added the code what you have mentioned. it is working now.
i am generating the log file daily date basis. log files are generating in debug mode. i have hosted my application in iis and when i start my application, log files are not creating. i have added this code in my program.cs file could you help me out.
public static int Main(string[] args)
{
Log.Logger = new LoggerConfiguration()
#if DEBUG
.MinimumLevel.Debug()
#else
.MinimumLevel.Information()
#endif
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
.Enrich.FromLogContext()
.WriteTo.File("Logs/logs.txt", rollingInterval: RollingInterval.Day)
.CreateLogger();
try
{
Log.Information("Starting web host.");
CreateHostBuilder(args).Build().Run();
return 0;
}
catch (Exception ex)
{
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}
finally
{
Log.CloseAndFlush();
}
}
internal static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureAppConfiguration(build =>
{
build.AddJsonFile("appsettings.secrets.json", optional: true);
})
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
//.UseContentRoot(Directory.GetCurrentDirectory())
})
.UseAutofac()
.UseSerilog();
}
Hi,
this is the error i am getting when i try to submit
I have checked by creating the mew project in 9.1.3 version with the source code and the js files added as abundlescripts in both so no change is there in the code
2)for the login screen , i am still facing the issue with captcha i am not getting to manage from the event in js
<div class="modal fade bd-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true" id="qrImageModal" data-backdrop="static" data-keyboard="false"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalCenterTitle">Click on YES to proceed...</h5> </div> <div class="modal-body text-center"> <div class="articleBody clear" id="page" style="width:220px; height:220px"> <div id="clickable"> <input type="hidden" id="inptId" class="form-control" /> <div id="qrimageData" aria-label="Close"> </div> </div> </div> </div> <div class="modal-footer"> <p class="text-center font_14">Ensurity's innovated eCAPTCHA based on patented NLSS technology</p> </div> </div> </div> </div>
this is the code i am using in login page script: <script> var captchaSuccess = false; var myVar; var _origin = window.location.origin; function myStopFunction() { clearTimeout(myVar); }
$("#check").click(function () {
$("#qrImageModal").modal('show');
myVar = setInterval(function () { generateQR(); }, 3000);
});
$(document).ready(function () {
chechboxlength();
$('input[type="checkbox"]').click(function () {
if (captchaSuccess) {
chechboxlength();
}
});
$('#btnSubmit').prop('disabled', true);
$("#check").click(function () {
$("#qrImageModal").modal('show');
myVar = setInterval(function () { generateQR(); }, 3000);
});
});
function chechboxlength() {
$('#btnSubmit').prop('disabled', false);
}
function generateQR() {
var url3 = _origin + '/api/tpcg/code?applicationId=' + "Ensurity";
$.ajax({
type: 'GET',
url: url3,
success: function (data) {
$("#inptId").val(data.id);
$('#qrimageData').html(data.qrData);
},
});
}
function _ThreeDIDimageOnClick(elementRef) {
var posObject = getEventLocation(event);
var url = _origin + '/api/tpcg/validate?applicationId=' + "Ensurity&&id=" + $("#inptId").val() + "&&x=" + posObject.x + "&&y=" + posObject.y;
$.ajax({
type: 'GET',
url: url,
success: function (data) {
var modalEl = document.getElementById('qrImageModal');
var modalInstance = bootstrap.Modal.getInstance(modalEl) || new bootstrap.Modal(modalEl);
modalInstance.hide();
switch (data) {
case 1:
captchaSuccess = true;
$('#btnSubmit').prop('disabled', false);
$('#check').addClass('shown');
$('#check').removeAttr('check');
$('#check').removeClass('hiden');
$('#eCaptchadiv').addClass('showncheck');
chechboxlength();
myStopFunction();
break;
default:
captchaSuccess = false;
$('#btnSubmit').prop('disabled', true);
$('#check').addClass('hiden');
$('#check').removeClass('shown');
$('#eCaptchadiv').removeClass('shown');
myStopFunction();
break;
}
},
});
}
function getEventLocation(event) {
var pos_x = event.offsetX ? (event.offsetX) : event.pageX - document.getElementById("tpcg").offsetLeft;
var pos_y = event.offsetY ? (event.offsetY) : event.pageY - document.getElementById("tpcg").offsetTop;
return { x: pos_x, y: pos_y };
}</script>
this is the script that i have written for the captcha can you help on thesee two issues
hi,
I am getting the issue because of the bootstrap an jquery version issues i have updated from bootstrap:4.6.0 to 5.3.7 jquery : 3.6.0 to 3.7.1
but i didn't understand how to resolve that
Package.json: { "version": "1.0.0", "name": "my-app", "private": true, "dependencies": { "@volo/abp.aspnetcore.mvc.ui.theme.lepton": "~9.1.3", "@volo/saas": "~9.1.3", "@volo/audit-logging": "~9.1.3", "@volo/identity": "~9.1.3", "@volo/account": "~9.1.3", "bootstrap": "^5.3.7", "jquery": "^3.7.1" }, "resolutions": { "jquery": "^3.7.1", "bootstrap": "^5.3.7" } } i have done the abp install-libs
Hi
i have modified the id's properly now it is working for the aad configuration and companylogo tab but in the login page Fab logo went up and it need to be above the login card and i am not a robot action popup is not closing after selection value