Base solution for your next web application

Activities of "buddhit"

Hi There I am trying to run app I downloaded without modifying and when run angular app, I got following error.

Uncaught Error: Unexpected value 'AbpModule' imported by the module 'AppModule'. Please add a @NgModule annotation. at syntaxError (compiler.es5.js:1694) at eval (compiler.es5.js:15398) at Array.forEach (<anonymous>) at CompileMetadataResolver.getNgModuleMetadata (compiler.es5.js:15381) at CompileMetadataResolver.getNgModuleSummary (compiler.es5.js:15323) at eval (compiler.es5.js:15396) at Array.forEach (<anonymous>) at CompileMetadataResolver.getNgModuleMetadata (compiler.es5.js:15381) at JitCompiler._loadModules (compiler.es5.js:26826) at JitCompiler._compileModuleAndComponents (compiler.es5.js:26799)

Clearly it is asking to import ngModel but not sure where that import needed. Thanks

Hello,

We recently purchased a key to the boilerplate and once we downloaded and installed all of the files whenever we go to load the API up we encounter a NullExceptionError being passed into

var subscriptionExpiredTenants

I believe this is where the subscriptions information is passed in from the tenant information and as it's factory settings I'm not sure why it's occurring, for the meantime we can get around it by commenting out as shown below but this is not ideal. Any ideas guys?

protected override void DoWork()
        {
            var utcNow = Clock.Now.ToUniversalTime();
            var failedTenancyNames = new List<string>();
            /*
            var subscriptionExpiredTenants = _tenantRepository.GetAllList(
                tenant => tenant.SubscriptionEndDateUtc != null &&
                          tenant.SubscriptionEndDateUtc <= utcNow &&
                          tenant.IsActive &&
                          tenant.EditionId != null
            );

            foreach (var tenant in subscriptionExpiredTenants)
            {
                Debug.Assert(tenant.EditionId.HasValue);

                try
                {

                    var edition = _editionRepository.Get(tenant.EditionId.Value);

                    Debug.Assert(tenant.SubscriptionEndDateUtc != null, "tenant.SubscriptionEndDateUtc != null");

                    if (tenant.SubscriptionEndDateUtc.Value.AddDays(edition.WaitingDayAfterExpire ?? 0) >= utcNow)
                    {
                        //Tenant is in waiting days after expire TODO: It's better to filter such entities while querying from repository!
                        continue;
                    }

                    var endSubscriptionResult = AsyncHelper.RunSync(() => _tenantManager.EndSubscriptionAsync(tenant, edition, utcNow));

                    if (endSubscriptionResult == EndSubscriptionResult.TenantSetInActive)
                    {
                        _userEmailer.TryToSendSubscriptionExpireEmail(tenant.Id, utcNow);
                    }
                    else if (endSubscriptionResult == EndSubscriptionResult.AssignedToAnotherEdition)
                    {
                        AsyncHelper.RunSync(() => _userEmailer.TryToSendSubscriptionAssignedToAnotherEmail(tenant.Id, utcNow, edition.ExpiringEditionId.Value));
                    }
                }
                catch (Exception exception)
                {
                    failedTenancyNames.Add(tenant.TenancyName);
                    Logger.Error($"Subscription of tenant {tenant.TenancyName} has been expired but tenant couldn't be made passive !");
                    Logger.Error(exception.Message, exception);
                }
            } */

            if (!failedTenancyNames.Any())
            {
                return;
            }

            _userEmailer.TryToSendFailedSubscriptionTerminationsEmail(failedTenancyNames, utcNow);
        }
    }
}

I was on V5.0.0. Now I downloaded V5.0.2 it is working fine. Thank you guys.

Yes it is all good after downloading V5.0.2 Thank you guys

Hi there

thank you for that, however, we have already started our project, How can we apply changes you have made without losing our work?

Regards Buddhi

Hello, were having great difficulty getting the parameters to be successfully bound after submitting a post from the HttpClient in our project.

Our interceptor to handle the cookies and auth,

@Injectable()
export class AuthConn implements HttpInterceptor {

    private _cookieService;

    constructor(private cookieService: CookieService) {
        this._cookieService = cookieService;
    }

    intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {

        if (this._cookieService.check('Abp.AuthToken')) {

            // We have our auth token..
            let bearerToken = this._cookieService.get('Abp.AuthToken');
            // Clone the request to add the new header.
            const authReq = req.clone({headers: req.headers.set('Authorization', 'bearer ' + bearerToken).set('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8')});
            // Pass on the cloned request instead of the original request.
            return next.handle(authReq);

        } else {
            // @todo This should sign the user out of the application...
            console.log('here');
        }

    }
}

Our endpoint request:

console.log(gridSettingsObject);

        // Finally go and update the server with our new item.
        this.http.post('http://localhost:22742/api/services/app/UserGridSetting/SaveUserGridSettings', {'jsonData': JSON.stringify(gridSettingsObject)}).subscribe((d: any) => {
            console.log(d);
        });

And finally our C# endpoint:

public async Task<int> SaveUserGridSettings(string jsonData)
        {
            var userId = AbpSession.GetUserId();
            var setting = await _repository.FirstOrDefaultAsync(s => s.UgsUserId == userId);

            if (setting == null)
            {
                setting = new UserGridSettingModel();
            }

            setting.UgsColSetting = jsonData;
            setting.UgsUserId = userId;
            setting.CreatorUserId = userId;
            setting.DeleterUserId = 0;

            return await _repository.InsertOrUpdateAndGetIdAsync(setting);

        }

jsonData just simply never makes it into the parameters but the endpoint is reachable. Whats even stranger is that when doing x-www-form-encoding or multipart in postman the parameter is found. Though changing the content type within our interceptor did not provide the same results so we are stuck..

Hi there

I got the same issue deploying on IIS, I can't seem to find App_data folder at all. I have tried changing security for IIS user but no luck :(

Regards Buddhi

Hi there

I have tried giving permission to Application pool user as well but no luck. I have three sites on IIS and they are pointed to one application folder. Host app now logging logs into App_data/Logs/logs.txt but still, two other app is not able to write logs. can you suggest something, please?

Regards

Yes, you are right. All 3 sites are writing into the same log file as it is Multi tenancy appp. How do we solve this issue then ??

Question

Hi there

We are using RAD tool for our new app but when I use lookup table more than one app service (with different name space) we got this error when we run refresh.bat file to generate proxy service for front end.

Conflicting schemaIds: Identical schemaIds detected for types Abp.Application.Services.Dto.PagedResultDto1[[OpuzLite.OpuzTasks.Dtos.BuildingLookupTableDto, OpuzLite.Application.Shared, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null]] and Abp.Application.Services.Dto.PagedResultDto1[OpuzLite.Facilities.Dtos.BuildingLookupTableDto]. See config settings - "CustomSchemaIds" for a workaround

I knew the problem is it generate same lookupTableDto in more than one place. How can we resolve this issue.

Regards Buddhi

Showing 1 to 10 of 15 entries