Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "maharatha"

The connection string are getting encrypted differently after the 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.

Answer

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.

var predicate = PredicateBuilder.New<_masterFileAttributeRepository>();

            if (!string.IsNullOrWhiteSpace(input.StringValue1))
            {
                predicate = predicate.And(x => x.StringValue1.Contains(input.StringValue1));
            }
            if (!string.IsNullOrWhiteSpace(input.StringValue2))
            {
                predicate = predicate.And(x => x.StringValue2.Contains(input.StringValue2));
            }

I am trying like this but x.StringValue1 is throwing error.

Am I doing anything wrong ?

The fontawesome.css in content folder was somehow excluded from the porject as a result of which it was not getting published.

Thanks for your help.

We have more than one record matching the below expression :

await _journalEntryDocumentDetailUnitRepository.DeleteAsync(p => p.AccountingDocumentId == input.Id);

What do you recommend ?

public async Task MyEntrDoc(EntityDto<long> input)
        {
            MyEntrDoc myentrDoc =
                await _myentrDocRepository.GetAsync(input.Id);
            await _myentrDocManager.DeleteAsync(input);
            await _journalEntryDocumentDetailUnitRepository.DeleteAsync(p => p.AccountingDocumentId == input.Id);
            await CurrentUnitOfWork.SaveChangesAsync();

            if (myentrDoc.JournalTypeId == JournalType.RecurringEntries ||
                myentrDoc.IsRecurringEntry)
            {
                if (myentrDoc.IsRecurringEntry)
                {
                    if (myentrDoc.OriginalDocumentId != null)
                    {
                        var recuingJeParentEntry =
                            await
                                _myentrDocRepository.FirstOrDefaultAsync(
                                    myentrDoc.OriginalDocumentId.Value);
                        if (!ReferenceEquals(recuingJeParentEntry, null) &&
                            !string.IsNullOrEmpty(recuingJeParentEntry.CronExpression))
                        {
                            recuingJeParentEntry.CronExpression = "";
                            await _myentrDocRepository.UpdateAsync(recuingJeParentEntry);
                        }
                        _recurringJobManager.DeleteJob(
                            $"T{AbpSession.GetTenantId()}RJ{myentrDoc.OriginalDocumentId}");
                    }
                }
                else
                {
                    _recurringJobManager.DeleteJob($"T{AbpSession.GetTenantId()}RJ{myentrDoc.Id}");
                }
            }
        }
Answer

Did you get a chance to try ?

Answer

Any updates ?

Showing 121 to 130 of 206 entries