hi
Please share your project type.
Great : )
hi
Please share full debug logs of this request(made by postman).
https://pcassist-testing.premiumasp.net/api/app/book
liming.ma@volosoft.com
Thanks.
hi
see 3.2
Cors will check if the request header contains Origin
etc..
Check the logic of CorsMiddleware
https://github.com/dotnet/aspnetcore/blob/release/9.0/src/Middleware/CORS/src/Infrastructure/CorsMiddleware.cs#L107-L110 https://github.com/dotnet/aspnetcore/blob/release/9.0/src/Middleware/CORS/src/Infrastructure/CorsMiddleware.cs#L112-L157 https://learn.microsoft.com/en-us/aspnet/core/security/cors?view=aspnetcore-9.0
3.1 You can call _cache.GetOrAddAsync
.
3.2 If there is no domains, you can return Task.FromResult<CorsPolicy?>(null);
https://github.com/dotnet/aspnetcore/blob/release/9.0/src/Middleware/CORS/src/Infrastructure/DefaultCorsPolicyProvider.cs#L12
hi
after checking server logs I found the below:
Please remove all Cookies
from your HTTP request.
The anti-forgery will check if the current request contains the XSRF-TOKEN
cookie.
https://abp.io/docs/latest/framework/infrastructure/csrf-anti-forgery
hi
You can configure the connection to specify DbContext.
For your case you need to change the connection string for IIdentityProDbContext(IIdentityDbContext)
https://abp.io/docs/latest/framework/fundamentals/connection-strings
hi
Please try to using MyOpenLdapManager
to check the username and password
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(OpenLdapManager), typeof(ILdapManager), typeof(LdapManager))]
public class MyOpenLdapManager : OpenLdapManager
{
public MyOpenLdapManager(ILdapSettingProvider ldapSettingProvider)
: base(ldapSettingProvider)
{
}
protected async override Task<string> NormalizeUserNameAsync(string userName)
{
var username = $"cn={userName},{await LdapSettingProvider.GetBaseDcAsync()}";
Logger.LogError("MyOpenLdapManager username: " + username);
return username;
}
protected async override Task AuthenticateLdapConnectionAsync(ILdapConnection connection, string username, string password)
{
Logger.LogError("MyOpenLdapManager username: " + username);
Logger.LogError("MyOpenLdapManager password: " + password);
await connection.BindAsync(Native.LdapAuthType.Simple, new LdapCredential()
{
UserName = username,
Password = password
});
}
}
: )
hi
Can you create a new question for this?
Thanks.