Can i get a response on this?
Hi -
While debugging the source code for ABP we found this :
Abp Ticket : <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1617">https://github.com/aspnetboilerplate/as ... ssues/1617</a> Blame : <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blame/6076a126f975ea1721348f24c89ed7b44e9f2d6e/src/Abp.EntityFramework/EntityFramework/AbpDbContext.cs">https://github.com/aspnetboilerplate/as ... Context.cs</a> Source file : <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1617">https://github.com/aspnetboilerplate/as ... ssues/1617</a>
You are reloading befoire doing a soft delete :
softDeleteEntry.Reload();
This is causing a select query to fire before deletion. So when we delete 3000 records it fires 3000 select statements and then 3000 update statements to delete the records.
I don't see the need of Reload for everyone, can we come up with a different solution ?
Thanks, Partha
I appreciate the fix you made. I am just hoping if the response time could be little faster. It took almost 5-6 days to identify and fix the issue.
This is a major bug if anyone is using multi database and multi tenancy.
I just sent you an email.
This is the same string that's being encrypted differently before and after upgrade.
public async Task<PagedResultDto<TenantListDto>> GetTenantUnits(SearchInputDto input)
{
var query = from tenant in TenantManager.Tenants
join org in _organizationRepository.GetAll() on tenant.OrganizationUnitId equals org.Id
join connection in _connectionStringRepository.GetAll() on org.ConnectionStringId equals connection.Id
select new { tenant, OrganizationName = org.DisplayName, ConnectionName = connection.ConnectionString };
if (!ReferenceEquals(input.Filters, null))
{
SearchTypes mapSearchFilters = Helper.MappingFilters(input.Filters);
if (!ReferenceEquals(mapSearchFilters, null))
query = Helper.CreateFilters(query, mapSearchFilters);
}
var tenantCount = await query.CountAsync();
var tenants =
await query.OrderBy(Helper.GetSort("tenant.Name ASC", input.Sorting)).PageBy(input).ToListAsync();
return new PagedResultDto<TenantListDto>(tenantCount, tenants.Select(item =>
{
var dto = item.tenant.MapTo<TenantListDto>();
dto.OrganizationName = item.OrganizationName;
var connectionString =
new SqlConnectionStringBuilder(SimpleStringCipher.Instance.Decrypt(item.ConnectionName));
dto.ServerName = connectionString.DataSource;
dto.DatabaseName = connectionString.InitialCatalog;
return dto;
}).ToList());
}
I use Abp Defaults.
As i resolve the existing issues came across another issue :
System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed.
at System.Security.Cryptography.CapiSymmetricAlgorithm.DepadBlock(Byte[] block, Int32 offset, Int32 count)
at System.Security.Cryptography.CapiSymmetricAlgorithm.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
at System.Security.Cryptography.CryptoStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at System.IO.Stream.Dispose()
at Abp.Runtime.Security.SimpleStringCipher.Decrypt(String cipherText, String passPhrase, Byte[] salt)
at xxx.xx.MultiTenancy.TenantAppService.<>c.<GetTenantUnits>b__21_0(<>f__AnonymousType414`3 item) in
This is a major issue after the upgrade and it is causing a lot of problems. Please provide a solution.
Hi -
I am trying to upgarde to v2.0.0-rc2 and below are the two issues :
The return type of
CreateAsync(tenant)
has changed to Void. Any reason for this ?
and
throw _abpLoginResultTypeHelper.CreateExceptionForFailedLoginAttempt(loginResult.Result , usernameOrEmailAddress, tenancyName); to
throw _abpLoginResultTypeHelper.CreateExceptionForFailedLoginAttempt(loginResult, usernameOrEmailAddress, tenancyName);
Yes it works , but I have created a roll back method something like the below :
public void RollBack(string strlastGoodMigration, string dbconnString)
{
var configuration = new Migrations.Configuration();
var migrator = new DbMigrator(configuration);
configuration.TargetDatabase = new DbConnectionInfo(dbconnString, "System.Data.SqlClient");
migrator.Update();
Log.Write("Rollback Completed");
}
When a build is completed I am storing the last applied migration in App.config.
So if we want to roll back this build then we just deploy the roll back with the the proper Release parameter and it should roll back to the current build.