Base solution for your next web application

Activities of "buddhit"

Hi, We are using ASP.NET Zero along with Angular and we are having issues with building an app for production.

Everything is working fine in development, but when we build app for production errors occur. We think that theme profile is not being set as baseSettings variable is undefined and as a consequence app is not rendering.

Hope you can assist. Thank you, buildIssue.PNG

I am assuming that ASP.NET Zero upgrade was not done properly on our side? And this is related to #6285?

Hi there

We have got new version of AspNetZero that is no longer has EntityFrameworkExtension on EntityFrameworkCore. Is there any reason this has been removed. What is alternet way to query raw sql ??

Regards Buddhi

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

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..

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);
        }
    }
}

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

Showing 1 to 6 of 6 entries