Hi @maliming,
Yes, using that code is bringing in the default display name configured in Settings.
Thank!
Wg
Hi @maliming, it's the same with other email addresses and email clients (Outlook, iPhone Mail)
@alexanderpilhar, thanks for the note about rebuilding multiple times; I got it working after this without the need to call AddMvc().
With @alexanderpilhar, suggestion, I did the following:
Thanks,
Wg
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.
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
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