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

Activities of "abdourahmani"

Answer

Thank you very helpful.

And how can I make the side bar wider ? I have long menu description and they are all folded.

Regards, Abdourahmani

Hi @ismcagdas,

Thanks, I'll give it a try this way

Abdourahmani

Hi,

My application (v.5.1.0 angular + aspnet.core) gets its data from reports produced by other applications. I parse these reports using XlsxJs or Papaparse into arrays of json records.

Then I send this data to the backend service using

this._AtmService.loadAtmTransInput(data, this.initDb).subscribe(
                // process Ok => next
                () => {
                    this.notifyProgressBar();
                    this.progress.incrementLoading();
                    resolve();
                },
                // process error => Error
                () => {
                    this.notifyProgressBar();
                    this.progress.incrementLoading();
                }
            );

"loadAtmTransInput" is imported this way

import { AtmTransServiceProxy, AtmTransDto } from 'shared/service-proxies/service-proxies';

.

Here is my backend service :

public class AtmTransAppService : RapproDabAppServiceBase, IAtmTransAppService
    {
        private readonly IImportDataManager<AtmTrans, long, AtmTransDto> _importManager;

        public AtmTransAppService(IImportDataManager<AtmTrans, long, AtmTransDto> importManager)
        {
            _importManager = importManager;
            _importManager.TableName = "AtmTrans";
            _importManager.KeyToUpdate = AppSettings.AppBusinessManagement.AtmTransactionsRead;
        }

        public void LoadAtmTransInput(List<AtmTransDto> input, bool init)
        {
            _importManager
                .LoadDataInput(input);
        }

        public void InitDbTable(bool init)
        {
            _importManager
                .InitDbTable(init);
        }
    }

Things went fine until I deployed to production.

Now I'm getting errors : [attachment=1:9elqo3c9]an error has occured.png[/attachment:9elqo3c9]

in the browse console : [attachment=0:9elqo3c9]No access control.png[/attachment:9elqo3c9]

I don't have errors in the log file. A daily upload consist of 40 files of 1 MB of size (5000 records) each. And files are processed one by one.

My questions are : 1 - Is this the right way to do it ? 2 - If I save the formated json records in files, How can I upload them (mainly, how to receive files in the backend) 3 - Saving to SQL Server takes too long, how can I improve this part of the process.

Any clue to overcome these problems is welcome.

Best regards,

Abdourahmani

Hi @ismcagdas

I'm using Angular 5 + Dot core 2, v5.1.0 . I didn't change any thing.

Just added p-progressBar in my project. And it runs ok in developement.

The problem occurs just when I try to build for production.

With this command

ng build --env=prod --base-href "./"

the project build fine but with larger output files (see my first post explorer capture), so without minification.

With this command

ng build --prod --base-href "./"

, I've got the above mentioned error.

Regards.

Hi @ alper,

Thank you for your message.

I don't have a "tsconfig.app.json" file but "tsconfig.json". And there is no "rootDir" in it.

Regards.

It gives the same error.

[attachment=0:2fgg3y4t]same error.png[/attachment:2fgg3y4t]

It's said that

ng build --prod --base-href "./"

will build angular for production. But for me it fails with this error : [attachment=1:bid928af]error build prod.png[/attachment:bid928af]

Am I incorrectly adding this component ?

instead, this command

ng build --env=prod --base-href "./"

runs to completion. But it produce larges files : [attachment=0:bid928af]dist directory.png[/attachment:bid928af]

What am I doing wrong ?

(Angular 5 + Dot core 2, v5.1.0)

Best regards, Abdourahmani

Sorry !

Problem solved.

I did put the Dbset property of this entity in the context class.

Regards, Abdourahmani

Hi !

I followed this link to implement an extension on IRepository.[https://gist.github.com/hikalkan/74f624c0b42c78fb1619e92b3d1972f8])

But I get this error when instantiation the service class

ERROR 2018-02-14 10:54:38,335 [17   ] Mvc.ExceptionHandling.AbpExceptionFilter - Can't create component 'Lbi.RapproDab.AppService.Session.Close.CloseSessionAppService' as it has dependencies to be satisfied.

'Lbi.RapproDab.AppService.Session.Close.CloseSessionAppService' is waiting for the following dependencies:
- Service 'Abp.Domain.Repositories.IRepository`2[[Lbi.RapproDab.AppEntities.HisAcctTrans, Lbi.RapproDab.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null],[System.Int64, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]' which was not registered.

Castle.MicroKernel.Handlers.HandlerException: Can't create component 'Lbi.RapproDab.AppService.Session.Close.CloseSessionAppService' as it has dependencies to be satisfied.

Here is my extension code

public static void Insert&lt;TEntity, 
            TPrimaryKey&gt;(this IRepository&lt;TEntity, TPrimaryKey&gt; repository, IEnumerable&lt;TEntity&gt; entities)
            where TEntity : class, IEntity&lt;TPrimaryKey&gt;, new()
        {
            var type = Type.GetType("Lbi.RapproDab.RepositoryHelpers, Lbi.RapproDab.EntityFrameworkCore");

            var bulkInsertMethod = type.GetMethod("BulkInsert", BindingFlags.Static | BindingFlags.Public);

            var genericMethod = bulkInsertMethod.MakeGenericMethod(typeof(TEntity), typeof(TPrimaryKey));

            genericMethod.Invoke(null, new object[] { repository, entities });
        }

If I really have to register IRepository, what will be the implementation name (YYYYYYYYY)?

IocManager.Register(typeof(IRepository&lt;,&gt;), typeof(YYYYYYYYY&lt;,&gt;), DependencyLifeStyle.Transient);
Answer

Hi !

I also waited for you on these days. But I dont know how to get in touch with you. When I post a message, because of time difference (my local time is UTC+1) I only get a response the next day.

what should I have to do to be available to you, next time ?

Regards, Abdourahmani

Showing 21 to 30 of 52 entries