Base solution for your next web application

Activities of "wizgod"

Hi kpmg,

I placed it as you suggested: ` //MVC services.AddControllersWithViews(options => { options.Filters.Add(new AbpAutoValidateAntiforgeryTokenAttribute()); }).AddNewtonsoftJson();

        services.AddMvc();

        services.AddSignalR(options => { options.EnableDetailedErrors = true; });

`

I deleted all the bin/obj folders and restarted the project but it still did not generate the TokenAuth api.

Thanks,

Wg

Looking at the swagger api ui, I found that the TokenAuth service isn't being generated.

Also, there are some projects that target .NET Standard instead of .NET Core 3.0. In a class library that I am using, some items are not compatible with .NET Standard and require .NET Core 3.0.

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 | (<U>(callbackfn: (value: ExternalLoginProvider, index: number, array: ExternalLoginProvider[]) => U, thisArg?: any) => U[]) | { <S extends ExternalLoginProvider>(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")'.

I'll do my best to put something together.

And here is the log of a successful export to pdf in v7.0.0:

Thanks,

Wg

INFO  2019-06-10 10:09:29,243 [61   ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 POST http://localhost:22742/api/services/app/Form/ExportFormToPdf application/json 854
INFO  2019-06-10 10:09:29,243 [61   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
INFO  2019-06-10 10:09:29,244 [61   ] uthentication.JwtBearer.JwtBearerHandler - Successfully validated the token.
WARN  2019-06-10 10:09:29,245 [61   ] calization.RequestLocalizationMiddleware - AbpUserRequestCultureProvider returned the following unsupported cultures 'null'.
WARN  2019-06-10 10:09:29,245 [61   ] calization.RequestLocalizationMiddleware - AbpUserRequestCultureProvider returned the following unsupported UI Cultures 'null'.
WARN  2019-06-10 10:09:29,245 [61   ] calization.RequestLocalizationMiddleware - AbpDefaultRequestCultureProvider returned the following unsupported cultures 'null'.
WARN  2019-06-10 10:09:29,245 [61   ] calization.RequestLocalizationMiddleware - AbpDefaultRequestCultureProvider returned the following unsupported UI Cultures 'null'.
INFO  2019-06-10 10:09:29,245 [61   ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'Wizgod.Forms.FormAppService.ExportFormToPdf (Wizgod.Application)'
INFO  2019-06-10 10:09:29,248 [61   ] ore.Mvc.Internal.ControllerActionInvoker - Route matched with {area = "app", action = "ExportFormToPdf", controller = "Form"}. Executing action Wizgod.Forms.FormAppService.ExportFormToPdf (Wizgod.Application)
INFO  2019-06-10 10:09:29,248 [61   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
INFO  2019-06-10 10:09:29,257 [61   ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method Wizgod.Forms.FormAppService.ExportFormToPdf (Wizgod.Application) with arguments (Wizgod.Forms.Dto.ExportFormInput) - Validation state: Valid
INFO  2019-06-10 10:09:29,347 [61   ] ore.Mvc.Internal.ControllerActionInvoker - Executed action method Wizgod.Forms.FormAppService.ExportFormToPdf (Wizgod.Application), returned result Microsoft.AspNetCore.Mvc.ObjectResult in 89.7744ms.
INFO  2019-06-10 10:09:29,351 [61   ] .Mvc.Infrastructure.ObjectResultExecutor - Executing ObjectResult, writing value of type 'Abp.Web.Models.AjaxResponse'.
INFO  2019-06-10 10:09:29,351 [61   ] ore.Mvc.Internal.ControllerActionInvoker - Executed action Wizgod.Forms.FormAppService.ExportFormToPdf (Wizgod.Application) in 103.3478ms
INFO  2019-06-10 10:09:29,352 [61   ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'Wizgod.Forms.FormAppService.ExportFormToPdf (Wizgod.Application)'
INFO  2019-06-10 10:09:29,352 [61   ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 108.7065ms 200 application/json; charset=utf-8
INFO  2019-06-10 10:09:29,449 [105  ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET http://localhost:22742/File/DownloadTempFile?fileType=application/pdf&fileToken=a1fdf3ce733e4bf7b5fb431e541a21fb&fileName=EA-011671.pdf  
INFO  2019-06-10 10:09:29,450 [105  ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'Wizgod.Web.Controllers.FileController.DownloadTempFile (Wizgod.Web.Core)'
INFO  2019-06-10 10:09:29,454 [105  ] ore.Mvc.Internal.ControllerActionInvoker - Route matched with {action = "DownloadTempFile", controller = "File", area = ""}. Executing action Wizgod.Web.Controllers.FileController.DownloadTempFile (Wizgod.Web.Core)
INFO  2019-06-10 10:09:29,455 [105  ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method Wizgod.Web.Controllers.FileController.DownloadTempFile (Wizgod.Web.Core) with arguments (Wizgod.Dto.FileDto) - Validation state: Valid
INFO  2019-06-10 10:09:29,456 [105  ] ore.Mvc.Internal.ControllerActionInvoker - Executed action method Wizgod.Web.Controllers.FileController.DownloadTempFile (Wizgod.Web.Core), returned result Microsoft.AspNetCore.Mvc.FileContentResult in 0.5669ms.
INFO  2019-06-10 10:09:29,456 [105  ] Infrastructure.FileContentResultExecutor - Executing Microsoft.AspNetCore.Mvc.FileContentResult, sending file with download name 'EA-011671.pdf' ...
INFO  2019-06-10 10:09:29,456 [105  ] ore.Mvc.Internal.ControllerActionInvoker - Executed action Wizgod.Web.Controllers.FileController.DownloadTempFile (Wizgod.Web.Core) in 1.9169ms
INFO  2019-06-10 10:09:29,456 [105  ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'Wizgod.Web.Controllers.FileController.DownloadTempFile (Wizgod.Web.Core)'
INFO  2019-06-10 10:09:29,456 [105  ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 7.6059ms 200 application/pdf
Answer

Hi @ismcagdas,

On spot! Adding the mime type mapping in IIS solved the problem.

Thanks!

Wg

Hi @ismcagdas,

Here is the log excerpt from the moment the export method is called to the resulting SyncFusion exception.

Thanks,

Wg

INFO  2019-08-27 08:24:32,086 [50   ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 OPTIONS http://localhost:22742/api/services/app/Form/ExportFormToPdf  
INFO  2019-08-27 08:24:32,086 [50   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
INFO  2019-08-27 08:24:32,086 [50   ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 0.2814ms 204 
INFO  2019-08-27 08:24:32,366 [50   ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 POST http://localhost:22742/api/services/app/Form/ExportFormToPdf application/json 1096
INFO  2019-08-27 08:24:32,367 [50   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
INFO  2019-08-27 08:24:32,369 [50   ] uthentication.JwtBearer.JwtBearerHandler - Successfully validated the token.
WARN  2019-08-27 08:24:32,370 [50   ] calization.RequestLocalizationMiddleware - AbpUserRequestCultureProvider returned the following unsupported cultures 'null'.
WARN  2019-08-27 08:24:32,370 [50   ] calization.RequestLocalizationMiddleware - AbpUserRequestCultureProvider returned the following unsupported UI Cultures 'null'.
WARN  2019-08-27 08:24:32,370 [50   ] calization.RequestLocalizationMiddleware - AbpDefaultRequestCultureProvider returned the following unsupported cultures 'null'.
WARN  2019-08-27 08:24:32,370 [50   ] calization.RequestLocalizationMiddleware - AbpDefaultRequestCultureProvider returned the following unsupported UI Cultures 'null'.
INFO  2019-08-27 08:24:32,370 [50   ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'Wizgod.Forms.FormAppService.ExportFormToPdf (Wizgod.Application)'
INFO  2019-08-27 08:24:32,397 [50   ] ore.Mvc.Internal.ControllerActionInvoker - Route matched with {area = "app", action = "ExportFormToPdf", controller = "Form"}. Executing controller action with signature System.Threading.Tasks.Task`1[Wizgod.Dto.FileDto] ExportFormToPdf(Wizgod.Forms.Dto.ExportFormInput) on controller Wizgod.Forms.FormAppService (Wizgod.Application).
INFO  2019-08-27 08:24:32,397 [50   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
INFO  2019-08-27 08:24:32,487 [50   ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method Wizgod.Forms.FormAppService.ExportFormToPdf (Wizgod.Application) - Validation state: Valid
INFO  2019-08-27 08:26:00,760 [50   ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 OPTIONS http://localhost:22742/AbpUserConfiguration/GetAll?d=1566915960687  0
INFO  2019-08-27 08:26:00,760 [50   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
INFO  2019-08-27 08:26:00,760 [50   ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 0.3483ms 204 
INFO  2019-08-27 08:26:00,770 [50   ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET http://localhost:22742/AbpUserConfiguration/GetAll?d=1566915960687  
INFO  2019-08-27 08:26:00,770 [50   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
INFO  2019-08-27 08:26:00,771 [50   ] uthentication.JwtBearer.JwtBearerHandler - Successfully validated the token.
WARN  2019-08-27 08:26:00,771 [50   ] calization.RequestLocalizationMiddleware - AbpUserRequestCultureProvider returned the following unsupported cultures 'null'.
WARN  2019-08-27 08:26:00,771 [50   ] calization.RequestLocalizationMiddleware - AbpUserRequestCultureProvider returned the following unsupported UI Cultures 'null'.
WARN  2019-08-27 08:26:00,771 [50   ] calization.RequestLocalizationMiddleware - AbpLocalizationHeaderRequestCultureProvider returned the following unsupported cultures 'null'.
WARN  2019-08-27 08:26:00,771 [50   ] calization.RequestLocalizationMiddleware - AbpLocalizationHeaderRequestCultureProvider returned the following unsupported UI Cultures 'null'.
WARN  2019-08-27 08:26:00,771 [50   ] calization.RequestLocalizationMiddleware - AbpDefaultRequestCultureProvider returned the following unsupported cultures 'null'.
WARN  2019-08-27 08:26:00,771 [50   ] calization.RequestLocalizationMiddleware - AbpDefaultRequestCultureProvider returned the following unsupported UI Cultures 'null'.
INFO  2019-08-27 08:26:00,772 [50   ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore)'
INFO  2019-08-27 08:26:00,778 [50   ] ore.Mvc.Internal.ControllerActionInvoker - Route matched with {action = "GetAll", controller = "AbpUserConfiguration", area = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.JsonResult] GetAll() on controller Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController (Abp.AspNetCore).
INFO  2019-08-27 08:26:00,778 [50   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
INFO  2019-08-27 08:26:00,779 [50   ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore) - Validation state: Valid
INFO  2019-08-27 08:26:00,818 [50   ] ore.Mvc.Internal.ControllerActionInvoker - Executed action method Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore), returned result Microsoft.AspNetCore.Mvc.JsonResult in 39.0194ms.
INFO  2019-08-27 08:26:00,828 [66   ] matters.Json.Internal.JsonResultExecutor - Executing JsonResult, writing value of type 'Abp.Web.Models.AjaxResponse'.
INFO  2019-08-27 08:26:00,830 [66   ] ore.Mvc.Internal.ControllerActionInvoker - Executed action Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore) in 52.0226ms
INFO  2019-08-27 08:26:00,830 [66   ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore)'
INFO  2019-08-27 08:26:00,831 [66   ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 60.9641ms 200 application/json; charset=utf-8
INFO  2019-08-27 08:26:00,992 [50   ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 OPTIONS http://localhost:22742/api/services/app/Session/GetCurrentLoginInformations  0
INFO  2019-08-27 08:26:00,994 [50   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
INFO  2019-08-27 08:26:00,995 [50   ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 3.1187ms 204 
INFO  2019-08-27 08:26:01,121 [66   ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET http://localhost:22742/api/services/app/Session/GetCurrentLoginInformations  
INFO  2019-08-27 08:26:01,121 [66   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
INFO  2019-08-27 08:26:01,122 [66   ] uthentication.JwtBearer.JwtBearerHandler - Successfully validated the token.
WARN  2019-08-27 08:26:01,122 [66   ] calization.RequestLocalizationMiddleware - AbpUserRequestCultureProvider returned the following unsupported cultures 'null'.
WARN  2019-08-27 08:26:01,122 [66   ] calization.RequestLocalizationMiddleware - AbpUserRequestCultureProvider returned the following unsupported UI Cultures 'null'.
WARN  2019-08-27 08:26:01,122 [66   ] calization.RequestLocalizationMiddleware - AbpDefaultRequestCultureProvider returned the following unsupported cultures 'null'.
WARN  2019-08-27 08:26:01,122 [66   ] calization.RequestLocalizationMiddleware - AbpDefaultRequestCultureProvider returned the following unsupported UI Cultures 'null'.
INFO  2019-08-27 08:26:01,125 [66   ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'Wizgod.Sessions.SessionAppService.GetCurrentLoginInformations (Wizgod.Application)'
INFO  2019-08-27 08:26:01,146 [66   ] ore.Mvc.Internal.ControllerActionInvoker - Route matched with {area = "app", action = "GetCurrentLoginInformations", controller = "Session"}. Executing controller action with signature System.Threading.Tasks.Task`1[Wizgod.Sessions.Dto.GetCurrentLoginInformationsOutput] GetCurrentLoginInformations() on controller Wizgod.Sessions.SessionAppService (Wizgod.Application).
INFO  2019-08-27 08:26:01,147 [66   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
INFO  2019-08-27 08:26:01,156 [66   ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method Wizgod.Sessions.SessionAppService.GetCurrentLoginInformations (Wizgod.Application) - Validation state: Valid
INFO  2019-08-27 08:26:01,181 [64   ] ore.Mvc.Internal.ControllerActionInvoker - Executed action method Wizgod.Sessions.SessionAppService.GetCurrentLoginInformations (Wizgod.Application), returned result Microsoft.AspNetCore.Mvc.ObjectResult in 24.458ms.
INFO  2019-08-27 08:26:01,184 [64   ] .Mvc.Infrastructure.ObjectResultExecutor - Executing ObjectResult, writing value of type 'Abp.Web.Models.AjaxResponse'.
INFO  2019-08-27 08:26:01,184 [64   ] ore.Mvc.Internal.ControllerActionInvoker - Executed action Wizgod.Sessions.SessionAppService.GetCurrentLoginInformations (Wizgod.Application) in 37.9763ms
INFO  2019-08-27 08:26:01,185 [64   ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'Wizgod.Sessions.SessionAppService.GetCurrentLoginInformations (Wizgod.Application)'
INFO  2019-08-27 08:26:01,185 [64   ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 64.0329ms 200 application/json; charset=utf-8
ERROR 2019-08-27 08:26:18,936 [66   ] Mvc.ExceptionHandling.AbpExceptionFilter - Failed to convert the webpage
Syncfusion.Pdf.PdfException: Failed to convert the webpage
   at Syncfusion.HtmlConverter.HtmlToPdfConverter.Convert(String url)
   at Wizgod.Forms.FormAppService.ConvertUrlToPDF(String url, String filename, String authToken, Int32 minPageLoadTime, String pageSize, String orientation, Int32 webPageWidth, Int32 webPageHeight, Int32 marginTop, Int32 marginBottom, Int32 marginLeft, Int32 marginRight) in F:\Wizgod\aspnet-core\src\Wizgod.Application\Forms\FormAppService.cs:line 929
   at Castle.Proxies.Invocations.FormAppService_ConvertUrlToPDF.InvokeMethodOnTarget()
   at Castle.DynamicProxy.AbstractInvocation.Proceed()
   at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformSyncUow(IInvocation invocation, UnitOfWorkOptions options) in D:\Github\aspnetboilerplate\src\Abp\Domain\Uow\UnitOfWorkInterceptor.cs:line 68
   at Castle.DynamicProxy.AbstractInvocation.Proceed()
   at Castle.DynamicProxy.AbstractInvocation.Proceed()
   at Castle.DynamicProxy.AbstractInvocation.Proceed()
   at Wizgod.Forms.FormAppService.ExportFormToPdf(ExportFormInput input) in F:\Wizgod\aspnet-core\src\Wizgod.Application\Forms\FormAppService.cs:line 825
   at Abp.Threading.InternalAsyncHelper.AwaitTaskWithPostActionAndFinallyAndGetResult[T](Task`1 actualReturnValue, Func`1 postAction, Action`1 finalAction)
   at lambda_method(Closure , Object )
   at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()
   at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextExceptionFilterAsync()
INFO  2019-08-27 08:26:18,947 [66   ] .Mvc.Infrastructure.ObjectResultExecutor - Executing ObjectResult, writing value of type 'Abp.Web.Models.AjaxResponse'.
INFO  2019-08-27 08:26:18,950 [66   ] ore.Mvc.Internal.ControllerActionInvoker - Executed action Wizgod.Forms.FormAppService.ExportFormToPdf (Wizgod.Application) in 106552.3423ms
INFO  2019-08-27 08:26:18,950 [66   ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'Wizgod.Forms.FormAppService.ExportFormToPdf (Wizgod.Application)'
INFO  2019-08-27 08:26:18,950 [66   ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 106583.9302ms 500 application/json; charset=utf-8

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 31 to 40 of 50 entries