Skip to main content

Goedemiddag community,

Een tijdje geleden heb ik de File upload api gebruikt in combinatie met een HTTP connector om een excel te kunnen uploaden en uitlezen. Vanwege security redenen probeer ik nu de HTTP connector uit te faseren en te vervangen met de web connection connector. Hier loop ik helaas tegen problemen aan die ik zelf niet op kan lossen.

 

Om jullie mee te nemen in het proces:

 

 

 

 

De webconnection kan worden gemaakt want de tokens worden goed uitgegeven op opgehaald:

Via postman lukt het om het excel bestand te stagen en te commiten via oath 2.0 waar ik gebruik maak van dezelfde webverbinding als in IAM staat geregisteerd.

 

De webconnection waar die fout gaat:
 

 

 

 

De processflow logs:

 

Request URL

.. /premium_prolongation(65)/detail_ref_premium_prolongation_premium_prolongation_excel_staging/stage_import?add_new_rows=true

Request Method

POST

Request Headers

Authorization: <811 length> User-Agent: Indicium/2025.1.14.0 Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=utf-8

Response StatusCode

500

Response Headers

Expires: -1 Cache-Control: no-cache,no-store Pragma: no-cache Transfer-Encoding: chunked Server: Microsoft-IIS/10.0 Set-Cookie: .AspNetCore.Session=CfDJ8Euv3Jp9G4JHkeYI%2BQFiIR5qxu%2FF87Ua7BWD96dVCTKo1zjqLmBpReVTVk%2BnekdeEHENnygihRoEbEhaaZjhLxXyLNQnarEwOnt7Go1c1znmtesHNExpRl0FCMdtY6gRF%2Fbzz3sk2s4So3oaufSqbF2Wr9p9W%2Bsrwo7eaJ6jyAtB; path=/; secure; samesite=lax; httponly X-XSS-Protection: 1 X-Frame-Options: SAMEORIGIN Referrer-Policy: same-origin X-Content-Type-Options: nosniff Content-Security-Policy: default-src 'self'; Server-Timing: LoadModel;dur=191.532 Server-Timing: OpenDatabaseConnection;dur=1.315 Server-Timing: GetRowForKeySegment;dur=2.080 Server-Timing: getUserNotifications;dur=2.844 Strict-Transport-Security: max-age=63072000 Date: Fri, 01 Aug 2025 11:17:19 GMT

 

 

 

 

 

De live error log:

 

 

 

Exception

Key

Value

message

No spreadsheet file format was recognized from the stream (Parameter 'stream')

stackTrace

at GemBox.Spreadsheet.ExcelFile.Load(Stream stream) at Indicium.Utils.ImportUtils.LoadExcelStream(IFileCache fileCache, ILocalFileCache localFileCache, String filePath, String csvDelimiter) in C:\azp\agent\_work\1\s\src\Indicium\Utils\ImportUtils.cs:line 152 at Indicium.Utils.ImportUtils.LoadExcelStream(IFileCache fileCache, ILocalFileCache localFileCache, String filePath, String csvDelimiter) in C:\azp\agent\_work\1\s\src\Indicium\Utils\ImportUtils.cs:line 159 at Indicium.Controllers.ImportController.loadImportFile(ApiTableVariant apiTableVariant, IImportResource resource, List`1 contextFilterColumns, Boolean isReload) in C:\azp\agent\_work\1\s\src\Indicium\Controllers\ImportController.cs:line 1292 at Indicium.Controllers.ImportController.StageImport(Nullable`1 addNewRows, Nullable`1 updateExistingRows, CancellationToken cancellationToken) in C:\azp\agent\_work\1\s\src\Indicium\Controllers\ImportController.cs:line 139 at Indicium.Controllers.ImportController.StageImport(Nullable`1 addNewRows, Nullable`1 updateExistingRows, CancellationToken cancellationToken) in C:\azp\agent\_work\1\s\src\Indicium\Controllers\ImportController.cs:line 147 at Indicium.Controllers.ImportController.StageImport(Nullable`1 addNewRows, Nullable`1 updateExistingRows, CancellationToken cancellationToken) in C:\azp\agent\_work\1\s\src\Indicium\Controllers\ImportController.cs:line 147 at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>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.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Duende.IdentityServer.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IdentityServerOptions options, IEndpointRouter router, IUserSession userSession, IEventService events, IIssuerNameService issuerNameService, ISessionCoordinationService sessionCoordinationService) in /_/src/IdentityServer/Hosting/IdentityServerMiddleware.cs:line 131 at Duende.IdentityServer.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes) in /_/src/IdentityServer/Hosting/MutualTlsEndpointMiddleware.cs:line 95 at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Duende.IdentityServer.Hosting.DynamicProviders.DynamicSchemeAuthenticationMiddleware.Invoke(HttpContext context) in /_/src/IdentityServer/Hosting/DynamicProviders/DynamicSchemes/DynamicSchemeAuthenticationMiddleware.cs:line 51 at Duende.IdentityServer.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) in /_/src/IdentityServer/Hosting/BaseUrlMiddleware.cs:line 27 at Indicium.Extensions.ApplicationBuilderExtensions.<>c.<<SameSiteOpenIDConnectInterceptor>b__0_0>d.MoveNext() in C:\azp\agent\_work\1\s\src\Indicium\Extensions\ApplicationBuilderExtensions.cs:line 57 --- End of stack trace from previous location --- at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.<Invoke>g__AwaitMatch|10_1(EndpointRoutingMiddleware middleware, HttpContext httpContext, Task matchTask) at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context) at Indicium.Middleware.Security.AuthenticationHeadersMiddleware.InvokeAsync(HttpContext context) in C:\azp\agent\_work\1\s\src\Indicium\Middleware\Authentication\AuthenticationHeadersMiddleware.cs:line 47 at Indicium.Middleware.Security.SecurityHeadersMiddleware.InvokeAsync(HttpContext context, ContentSecurityPolicyBuilder cspBuilder) in C:\azp\agent\_work\1\s\src\Indicium\Middleware\Security\SecurityHeadersMiddleware.cs:line 54 at Indicium.Middleware.Messages.TSFMessagesMiddleware.Invoke(HttpContext context, IRootApplicationLoader rootApplicationLoader, TSFRequestContext requestContext) in C:\azp\agent\_work\1\s\src\Indicium\Middleware\Messages\TSFMessageMiddleware.cs:line 44 at Indicium.Middleware.Telemetry.ServerTimings.ServerTimingsMiddleware.InvokeAsync(HttpContext context, ServerTimingsBuilder serverTimingsBuilder) in C:\azp\agent\_work\1\s\src\Indicium\Middleware\Telemetry\ServerTimings\ServerTimingsMiddleware.cs:line 49 at Indicium.Middleware.ExceptionHandlingMiddleware.Invoke(HttpContext context, TSFRequestContext requestContext) in C:\azp\agent\_work\1\s\src\Indicium\Middleware\ExceptionHandlingMiddleware.cs:line 34

source

GemBox.Spreadsheet

 

Chatgpt geeft aan dat het kan liggen aan de Content-Type: Waar ik in de web connection connector: ‘application/vnd.openxmlformats-officedocument.spreadsheetml.sheet’ heb staan.

Echter wordt deze nog aangepast door indicium als die uiteindelijk wordt uitgevoerd naar:

‘Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=utf-8’    (Zie 2de plaatje processflow logs:)

Waar ‘charset=utf-8’ problemen kan veroorzaken in de body door corruptie (denk aan verkeerde encoding of headers)

 

Heeft iemand hier vaker met de file api upload gewerkt voor Excel betanden via de web connection connector en tips om naar te kijken waar het probleem zit?

 

Alvast bedankt.

Mvg,
Jeffrey

Hi Jeffrey,

If the encoding is the issue, perhaps there is a way to add the desired encoding in the Web connection. In case the UTF-8 encoding is the cause of the issue, Indicium should take a look into this.


Hi Jeffrey,

This is a known issue with the web connectors: they currently do not support transferring binary data, only text.

For now, we advise continuing to use HTTP connectors for this purpose

Support for this will come soon.


Hi Jeffrey,

This is a known issue with the web connectors: they currently do not support transferring binary data, only text.

For now, we advise continuing to use HTTP connectors for this purpose

Support for this will come soon.

Hi Erik,

Any idea when the functionality is ready to use? We need this functionality as well.

Thank you.