Base solution for your next web application

Activities of "wizgod"

Greetings Programs!

RE: AspNetZero - Angular + Core 10.2.

I am uploading an excel file that I loop through the rows and processing them.

I would like to be able to use a progress bar (https://ej2.syncfusion.com/angular/demos/#/bootstrap5/progress-bar/Linear) so that I can display which row is currently being processed.

Here is my controller method for processing the file; within the loop at the end, I would like to pass back the current row value to the angular component.

Any thoughts as to how I can acheive this?

Thanks,

Wg

public async Task BulkPayrollAdjustments(IFormFile file, string notes)
{
        var fileName = Path.GetFileName(file.FileName);
        if (fileName.IsNullOrWhiteSpace()) return L("File_Empty_Error");

        //New instance of ExcelEngine is created 
        //Equivalent to launching Microsoft Excel with no workbooks open
        //Instantiate the spreadsheet creation engine
        var excelEngine = new ExcelEngine();

        //Instantiate the Excel application object
        var application = excelEngine.Excel;

        //var xlFile = new FileStream(tempFilePath, FileMode.Open);
        var xlFile = file.OpenReadStream();
        var workbook = application.Workbooks.Open(xlFile);
        var worksheet = workbook.Worksheets.FirstOrDefault();
        if (worksheet == null) return "No worksheet found";

        var start = worksheet.UsedRange.Row;
        var end = worksheet.UsedRange.LastRow;
        var col = worksheet.UsedRange.Column;

        var bulkUpdates = new List<BulkUpdateDto>();

		// Get the rows.
        for (var row = start + 1; row <= end; row++)
        {
            var bulkUpdateDto = new BulkUpdateDto
            {
				// Create object from row.
                FromBaseId = worksheet.Range[row, col].CalculatedValue;
                // ...
            };

            bulkUpdates.Add(bulkUpdateDto);
        }

        //Close the instance of IWorkbook
        workbook.Close();

        //Dispose the instance of ExcelEngine
        excelEngine.Dispose();

		var currentRow = 1;
		foreach (var bulkUpdate in bulkUpdates)
		{
            //*****************************************************************
            // I would like to send the current row number value here.
            //*****************************************************************
            sendCurrentRowNumberToComponent(currentRow);

			await _appService.ProcessUpdate(bulkUpdate)
			
			currentRow++;
			
			await CurrentUnitOfWork.SaveChangesAsync();
		}
    }

Greetings Programs!

I have used the following to remove the table prefixes for all versions up to 9 (.Net Core + Angular) with no issues.

modelBuilder.ChangeAbpTablePrefix<Tenant, Role, User>("");

In v10, with a clean install, I had to change the Target Framework to .NET 5.0 in order to run.

I successfully executed update-database to create the initial tables.

When I went to change the table prefix with the line above, I received the error below.

Is there any additional configuration I need to make for v10?

Thanks,

Wg

System.InvalidOperationException: Both 'TenantFeatureSetting' and 'EditionFeatureSetting' are mapped to the table 'AbpFeatures'. All the entity types in a hierarchy that don't have a discriminator must be mapped to different tables. See https://go.microsoft.com/fwlink/?linkid=2130430 for more information.
   at Microsoft.EntityFrameworkCore.Infrastructure.RelationalModelValidator.ValidateTPTMapping(IEntityType rootEntityType, Boolean forTables)
   at Microsoft.EntityFrameworkCore.Infrastructure.RelationalModelValidator.ValidateInheritanceMapping(IModel model, IDiagnosticsLogger`1 logger)
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelValidator.Validate(IModel model, IDiagnosticsLogger`1 logger)
   at Microsoft.EntityFrameworkCore.Infrastructure.RelationalModelValidator.Validate(IModel model, IDiagnosticsLogger`1 logger)
   at Microsoft.EntityFrameworkCore.SqlServer.Internal.SqlServerModelValidator.Validate(IModel model, IDiagnosticsLogger`1 logger)
   at Microsoft.EntityFrameworkCore.Metadata.Conventions.ValidatingConvention.ProcessModelFinalized(IModel model)
   at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.ImmediateConventionScope.OnModelFinalized(IModel model)
   at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.OnModelFinalized(IModel model)
   at Microsoft.EntityFrameworkCore.Metadata.Internal.Model.FinalizeModel()
   at Microsoft.EntityFrameworkCore.ModelBuilder.FinalizeModel()
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.CreateModel(DbContext context, IConventionSetBuilder conventionSetBuilder, ModelDependencies modelDependencies)
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.GetModel(DbContext context, IConventionSetBuilder conventionSetBuilder, ModelDependencies modelDependencies)
   at Microsoft.EntityFrameworkCore.Internal.DbContextServices.CreateModel()
   at Microsoft.EntityFrameworkCore.Internal.DbContextServices.get_Model()
   at Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder.<>c.<TryAddCoreServices>b__7_3(IServiceProvider p)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScopeCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScopeCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Microsoft.EntityFrameworkCore.DbContext.get_DbContextDependencies()
   at Microsoft.EntityFrameworkCore.DbContext.get_InternalServiceProvider()
   at Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<System.IServiceProvider>.get_Instance()
   at Microsoft.EntityFrameworkCore.Infrastructure.Internal.InfrastructureExtensions.GetService[TService](IInfrastructure`1 accessor)
   at Microsoft.EntityFrameworkCore.Infrastructure.AccessorExtensions.GetService[TService](IInfrastructure`1 accessor)
   at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.CreateContext(Func`1 factory)
   at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.CreateContext(String contextType)
   at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.AddMigration(String name, String outputDir, String contextType, String namespace)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigrationImpl(String name, String outputDir, String contextType, String namespace)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigration.&lt;&gt;c__DisplayClass0_0.&lt;.ctor&gt;b__0()
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.&lt;&gt;c__DisplayClass3_0`1.<Execute>b__0()
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
Both 'TenantFeatureSetting' and 'EditionFeatureSetting' are mapped to the table 'AbpFeatures'. All the entity types in a hierarchy that don't have a discriminator must be mapped to different tables. See https://go.microsoft.com/fwlink/?linkid=2130430 for more information.

Greetings Programs!

When I execute this code: <br>

        var userIds = approverIds.Select(q => new Abp.UserIdentifier(2, q.Value)).ToArray();
        message = message.Replace("[Name]", user.Name)
            .Replace("[Surname]", user.Surname)
            .Replace("[EmployeeID]", user.EmployeeId);

        var data = new MessageNotificationData(message) {["url"] = url};

        await _notificationPublisher.PublishAsync(notificationName, data, null,(NotificationSeverity)severity, userIds);

<br> I am receiving the following error:

ERROR 2020-04-22 16:58:30,000 [8    ] Mvc.ExceptionHandling.AbpExceptionFilter - Can not set TenantId to 0 for IMustHaveTenant entities! Abp.AbpException: Can not set TenantId to 0 for IMustHaveTenant entities! at Abp.EntityFrameworkCore.AbpDbContext.CheckAndSetMustHaveTenantIdProperty(Object entityAsObj) at Abp.EntityFrameworkCore.AbpDbContext.ApplyAbpConceptsForAddedEntity(EntityEntry entry, Nullable`1 userId, EntityChangeReport changeReport) at Abp.EntityFrameworkCore.AbpDbContext.ApplyAbpConcepts(EntityEntry entry, Nullable`1 userId, EntityChangeReport changeReport) at Abp.EntityFrameworkCore.AbpDbContext.ApplyAbpConcepts() at Abp.EntityFrameworkCore.AbpDbContext.SaveChangesAsync(CancellationToken cancellationToken) at Abp.Zero.EntityFrameworkCore.AbpZeroCommonDbContext`3.SaveChangesAsync(CancellationToken cancellationToken) at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.SaveChangesInDbContextAsync(DbContext dbContext) at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.SaveChangesAsync() at Abp.Notifications.NotificationStore.InsertNotificationAsync(NotificationInfo notification) at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous(IInvocation invocation) at Abp.Notifications.NotificationPublisher.PublishAsync(String notificationName, NotificationData data, EntityIdentifier entityIdentifier, NotificationSeverity severity, UserIdentifier[] userIds, UserIdentifier[] excludedUserIds, Nullable`1[] tenantIds)

Thanks,

Wg

Greetings Programs!

I have been working on migrating a 4.x MVC application to an 8.4 Angular + Core application.

I have LDAP enabled with multi-tenancy and I moved all the users over along with their roles (accounting for column changes).

When I try to log in using credentials ( testing with two users), I receive the "Email 'myemail' is already taken" error. It seems like it couldn't find the user and is trying to add the user instead of logging in.

The log in production doesn't seem to be showing the error but in dev, I get the output below.

Thanks,

Wg

Mvc.ExceptionHandling.AbpExceptionFilter - Email '[email protected]' is already taken.
Abp.UI.UserFriendlyException: Email '[email protected]' is already taken.
   at Abp.Authorization.Users.AbpUserManager`2.CheckDuplicateUsernameOrEmailAddressAsync(Nullable`1 expectedUserId, String userName, String emailAddress)
   at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation)
   at Abp.Authorization.Users.AbpUserManager`2.CreateAsync(TUser user)
   at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation)
   at Abp.Authorization.AbpLogInManager`3.TryLoginFromExternalAuthenticationSourcesAsync(String userNameOrEmailAddress, String plainPassword, TTenant tenant)
   at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation)
   at Abp.Authorization.AbpLogInManager`3.LoginAsyncInternal(String userNameOrEmailAddress, String plainPassword, String tenancyName, Boolean shouldLockout)
   at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation)
   at Abp.Authorization.AbpLogInManager`3.LoginAsync(String userNameOrEmailAddress, String plainPassword, String tenancyName, Boolean shouldLockout)
   at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation)
   at MyAppInc.Web.Controllers.TokenAuthController.GetLoginResultAsync(String usernameOrEmailAddress, String password, String tenancyName) in C:\Projects\Core + Angular - 8.4\MyAppInc\aspnet-core\src\MyAppInc.Web.Core\Controllers\TokenAuthController.cs:line 652
   at MyAppInc.Web.Controllers.TokenAuthController.Authenticate(AuthenticateModel model) in C:\Projects\Core + Angular - 8.4\MyAppInc\aspnet-core\src\MyAppInc.Web.Core\Controllers\TokenAuthController.cs:line 138
   at lambda_method(Closure , Object )
   at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeNextActionFilterAsync&gt;g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeInnerFilterAsync&gt;g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeNextExceptionFilterAsync&gt;g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

Greetings Programs!

I am running two applications; one using v4.1.0 MVC and another using v8.0.0 CORE + Angular (which is planned to be upgraded to v8.2.1).

Are the changes Microsoft is planning for LDAP going to affect either versions of the application?

https://support.microsoft.com/en-ca/help/4520412/2020-ldap-channel-binding-and-ldap-signing-requirement-for-windows

Thanks,

Wg

Greetings Programs!

I've got a method with a try/catch in which I throw a UserFriendlyException.

I'm going to be calling it from a hangfire job now within a foreach loop and I was wondering if there is a way to log the exception without throwing it so it doesn't stop the job?

Thanks,

Wg

Greetings Programs!

I am using the following to send a message but when I receive the email, it is not using the default display name saved in the SMTP settings.

await _emailSender.SendAsync(new MailMessage
{
	To = { recipient },
	Subject = email.Subject,
	Body = email.Message,
	IsBodyHtml = true
});

The default email in the SMTP settings is set to [email protected] and the default display name is set to Notifications. When I receive emails in my gmail account, it displays as Do-Not-Reply <[email protected]> instead of Notifications which is what I'm expecting.

Thanks,

Wg

Greetings Programs!

I cannot get .NET Core v8 to run at all, even from a clean install.

  • I unarchive the project.
  • I use the defaults and update-database and run; which gets me the login screen successfully and I can see Swagger just fine.
  • I've used both npm and Yarn to do the initial install.
  • I go to the nswag folder and do a refresh; which appears to complete successfully.
  • I do a npm/yarn start and the errors below are thrown.

Thanks,

Wg

yarn version v1.19.1 info Current version: 7.3.0

$ npm version { 'abp-zero-template': '7.3.0', npm: '4.6.1', ares: '1.15.0', brotli: '1.0.7', cldr: '35.1', http_parser: '2.8.0', icu: '64.2', modules: '64', napi: '4', nghttp2: '1.34.0', node: '10.16.0', openssl: '1.1.1b', tz: '2019a', unicode: '12.1', uv: '1.28.0', v8: '6.8.275.32-node.52', zlib: '1.2.11' }

Angular CLI: 8.3.19 Node: 10.16.0 OS: win32 x64 Angular: 8.2.14 ... animations, common, compiler, compiler-cli, core, forms ... platform-browser, platform-browser-dynamic, platform-server ... router

Package Version

@angular-devkit/architect 0.803.19 @angular-devkit/build-angular 0.803.19 @angular-devkit/build-optimizer 0.803.19 @angular-devkit/build-webpack 0.803.19 @angular-devkit/core 8.3.19 @angular-devkit/schematics 8.3.19 @angular/cdk 8.2.3 @angular/cli 8.3.19 @ngtools/webpack 8.3.19 @schematics/angular 8.3.19 @schematics/update 0.803.19 rxjs 6.5.3 typescript 3.4.5 webpack 4.39.2

ERROR in ./src/account/login/login.service.ts 169:37-54 "export 'AuthenticateModel' was not found in '@shared/service-proxies/service-proxies' ERROR in ./src/account/login/login.service.ts 332:24-49 "export 'ExternalAuthenticateModel' was not found in '@shared/service-proxies/service-proxies' ERROR in ./src/account/login/login.service.ts 267:28-53 "export 'ExternalAuthenticateModel' was not found in '@shared/service-proxies/service-proxies' ERROR in ./src/account/login/login.service.ts 292:32-57 "export 'ExternalAuthenticateModel' was not found in '@shared/service-proxies/service-proxies' ERROR in ./src/account/login/login.service.ts 313:28-53 "export 'ExternalAuthenticateModel' was not found in '@shared/service-proxies/service-proxies' ERROR in ./src/account/login/login.service.ts 354:24-49 "export 'ExternalAuthenticateModel' was not found in '@shared/service-proxies/service-proxies' ERROR in ./src/account/login/login.service.ts 58:2-32 "export 'ExternalLoginProviderInfoModel' was not found in '@shared/service-proxies/service-proxies' ERROR in ./src/account/login/send-two-factor-code.component.ts 61:24-50 "export 'SendTwoFactorAuthCodeModel' was not found in '@shared/service-proxies/service-proxies' ERROR in ./src/shared/service-proxies/service-proxy.module.ts 44:16-55 "export 'TokenAuthServiceProxy' (imported as 'ApiServiceProxies') was not found in './service-proxies' ERROR in ./src/account/login/login.service.ts 383:41-62 "export 'TokenAuthServiceProxy' was not found in '@shared/service-proxies/service-proxies' ERROR in ./src/account/login/login.service.ts 372:16-37 "export 'TokenAuthServiceProxy' was not found in '@shared/service-proxies/service-proxies' ERROR in ./src/account/login/send-two-factor-code.component.ts 75:16-37 "export 'TokenAuthServiceProxy' was not found in '@shared/service-proxies/service-proxies' ERROR in ./src/account/login/send-two-factor-code.component.ts 85:12-33 "export 'TokenAuthServiceProxy' was not found in '@shared/service-proxies/service-proxies' i 「wdm」: Failed to compile.

ERROR in src/account/login/login.service.ts(9,10): error TS2305: Module '"Project/angular/src/shared/service-proxies/service-proxies"' has no exported member 'AuthenticateModel'.
src/account/login/login.service.ts(9,29): error TS2305: Module '"Project/angular/src/shared/service-proxies/service-proxies"' has no exported member 'AuthenticateResultModel'.
src/account/login/login.service.ts(9,54): error TS2305: Module '"Project/angular/src/shared/service-proxies/service-proxies"' has no exported member 'ExternalAuthenticateModel'.
src/account/login/login.service.ts(9,81): error TS2305: Module '"Project/angular/src/shared/service-proxies/service-proxies"' has no exported member 'ExternalAuthenticateResultModel'.
src/account/login/login.service.ts(9,114): error TS2305: Module '"Project/angular/src/shared/service-proxies/service-proxies"' has no exported member 'ExternalLoginProviderInfoModel'.
src/account/login/login.service.ts(9,146): error TS2305: Module '"Project/angular/src/shared/service-proxies/service-proxies"' has no exported member 'TokenAuthServiceProxy'.
src/account/login/login.service.ts(35,14): error TS2339: Property 'name' does not exist on type 'ExternalLoginProvider'.
src/account/login/login.service.ts(36,14): error TS2339: Property 'clientId' does not exist on type 'ExternalLoginProvider'.
src/account/login/login.service.ts(37,14): error TS2339: Property 'additionalParams' does not exist on type 'ExternalLoginProvider'.
src/account/login/login.service.ts(94,26): error TS2339: Property 'name' does not exist on type 'ExternalLoginProvider'.
src/account/login/login.service.ts(98,33): error TS2339: Property 'name' does not exist on type 'ExternalLoginProvider'.
src/account/login/login.service.ts(102,33): error TS2339: Property 'name' does not exist on type 'ExternalLoginProvider'.
src/account/login/login.service.ts(223,27): error TS2339: Property 'name' does not exist on type 'ExternalLoginProvider'.
src/account/login/login.service.ts(226,42): error TS2339: Property 'clientId' does not exist on type 'ExternalLoginProvider'.
src/account/login/login.service.ts(239,34): error TS2339: Property 'name' does not exist on type 'ExternalLoginProvider'.
src/account/login/login.service.ts(244,53): error TS2339: Property 'clientId' does not exist on type 'ExternalLoginProvider'.
src/account/login/login.service.ts(251,34): error TS2339: Property 'name' does not exist on type 'ExternalLoginProvider'.
src/account/login/login.service.ts(255,46): error TS2339: Property 'clientId' does not exist on type 'ExternalLoginProvider'.
src/account/login/login.service.ts(261,34): error TS2339: Property 'name' does not exist on type 'ExternalLoginProvider'.
src/account/login/login.service.ts(265,34): error TS2339: Property 'name' does not exist on type 'ExternalLoginProvider'.
src/account/login/login.service.ts(274,37): error TS2339: Property 'clientId' does not exist on type 'ExternalLoginProvider'.
src/account/login/login.service.ts(279,27): error TS2339: Property 'additionalParams' does not exist on type 'ExternalLoginProvider'.
src/account/login/login.service.ts(280,43): error TS2339: Property 'additionalParams' does not exist on type 'ExternalLoginProvider'.
src/account/login/login.service.ts(288,45): error TS2339: Property 'additionalParams' does not exist on type 'ExternalLoginProvider'.
src/account/login/login.service.ts(289,43): error TS2339: Property 'additionalParams' does not exist on type 'ExternalLoginProvider'.
src/account/login/login.service.ts(290,52): error TS2339: Property 'additionalParams' does not exist on type 'ExternalLoginProvider'.
src/account/login/login.service.ts(291,45): error TS2339: Property 'clientId' does not exist on type 'ExternalLoginProvider'.
src/account/login/login.service.ts(323,58): error TS2345: Argument of type 'number | ExternalLoginProvider | (&lt;U&gt;(callbackfn: (value: ExternalLoginProvider, index: number, array: ExternalLoginProvider[]) => U, thisArg?: any) => U[]) | { &lt;S extends ExternalLoginProvider&gt;(callbackfn: (value: ExternalLoginProvider, index: number, array: ExternalLoginProvider[]) => value

is S, thisArg?: any): S...' is not assignable to parameter of type 'ExternalLoginProvider'. Type 'number' is not assignable to type 'ExternalLoginProvider'. src/account/login/send-two-factor-code.component.ts(5,10): error TS2305: Module '"Project/angular/src/shared/service-proxies/service-proxies"' has no exported member 'SendTwoFactorAuthCodeModel'. src/account/login/send-two-factor-code.component.ts(5,38): error TS2305: Module '"Project/angular/src/shared/service-proxies/service-proxies"' has no exported member 'TokenAuthServiceProxy'. src/shared/service-proxies/service-proxy.module.ts(32,27): error TS2339: Property 'TokenAuthServiceProxy' does not exist on type 'typeof import("Project/angular/src/shared/service-proxies/service-proxies")'.

Greetings Programs!

The following method works flawlessly in v7.0.0 for any url (application or external) but it breaks in v7.1.0 for any application url. It converts external urls as expected so there's nothing wrong with the conversion itself.

        public virtual void ConvertUrlToPDF(string url, string filename, string authToken = null, int minPageLoadTime = 30, string pageSize = "Letter", string orientation = "Portrait", int webPageWidth = 1024, int webPageHeight = 0, int marginTop = 20, int marginBottom = 20, int marginLeft = 20, int marginRight = 20)
        {
            var pdfPageSize = PdfPageSize.Letter;
            var pdfOrientation = (PdfPageOrientation)Enum.Parse(typeof(PdfPageOrientation), orientation, true);

            var settings = new WebKitConverterSettings
            {
                WebKitPath = Path.Combine(hostingEnvironment.ContentRootPath, "QtBinariesWindows"),
                WebKitViewPort = new Size(webPageWidth, webPageHeight),
                AdditionalDelay = minPageLoadTime * 1000,
                Margin = new PdfMargins { Left = marginLeft, Right = marginRight, Top = marginTop, Bottom = marginBottom },
                Orientation = pdfOrientation,
                PdfPageSize = pdfPageSize,
                SplitImages = false,
                SplitTextLines = true,
                TempPath = Path.GetTempPath()
            };

            if (!authToken.IsNullOrWhiteSpace())
            {
                settings.HttpRequestHeaders.Add("Authorization", $"bearer {authToken}");
            }

            //Initialize HTML to PDF converter and assign WebKit settings to HTML converter
            var htmlConverter = new HtmlToPdfConverter { ConverterSettings = settings };

            //Convert URL to PDF
            var document = htmlConverter.Convert(url);
            var stream = new MemoryStream();

            document.Save(stream);

            using (var file = new FileStream(filename, FileMode.OpenOrCreate, FileAccess.Write))
            {
                stream.WriteTo(file);
            }
        }

I generate the url and get the token from the cookie:

        let formUrl = AppConsts.appBaseUrl + '/#/app/main/form/' + this.form.formType.code.toLowerCase() + '/' + this.form.id + '/print';
        let authToken = abp.utils.getCookieValue('Abp.AuthToken');

The error is thrown by the converter:

Syncfusion.Pdf.PdfException: Failed to convert the webpage
   at Syncfusion.HtmlConverter.HtmlToPdfConverter.Convert(String url)

I'm thinking it might have something to do with the authorization header and token.

Thanks,

Wg

Question

Greetings Programs!

I'm running Core 2.2 + Angular 8 and in Chrome's debug console, I am receiving the following 404 errors for fonts.

I'm assuming I haven't added some package; any idea what I should be doing?

Thanks,

Wg

main.d45e8a8dadab92673965.js:1 GET https://company.com/poppins-v5-devanagari_latin-ext_latin-300.01860d964547bc9d93cf.woff2 net::ERR_ABORTED 404 (Not Found) main.d45e8a8dadab92673965.js:1 GET https://company.com/fa-solid-900.418dad87601f9c8abd0e.woff2 net::ERR_ABORTED 404 (Not Found) main.d45e8a8dadab92673965.js:1 GET https://company.com/poppins-v5-devanagari_latin-ext_latin-regular.76e766753becb2b7da20.woff2 net::ERR_ABORTED 404 (Not Found) main.d45e8a8dadab92673965.js:1 GET https://company.com/line-awesome.452a5b42cb4819f09d35.woff2?v=1.1. net::ERR_ABORTED 404 (Not Found) main.d45e8a8dadab92673965.js:1 GET https://company.com/poppins-v5-devanagari_latin-ext_latin-600.0d49524ae3304f2876fb.woff2 404 (Not Found) main.d45e8a8dadab92673965.js:1 GET https://company.com/poppins-v5-devanagari_latin-ext_latin-500.93553e98363f8e91ea2f.woff2 net::ERR_ABORTED 404 (Not Found) main.d45e8a8dadab92673965.js:1 GET https://company.com/open-sans-v15-latin-regular.cffb686d7d2f4682df83.woff2 net::ERR_ABORTED 404 (Not Found) main.d45e8a8dadab92673965.js:1 GET https://company.com/open-sans-v15-latin-300.60c866748ff15f5b347f.woff2 net::ERR_ABORTED 404 (Not Found) GET https://company.com/roboto-v18-vietnamese_latin-ext_latin_greek_cyrillic-ext_greek-ext_cyrillic-300.d26871e8149b5759f814.woff2 net::ERR_ABORTED 404 (Not Found)

Showing 1 to 10 of 14 entries