Skip to content

Public media/blob URLs fail after upgrading EPiCode.SqlBlobProvider from 2.0.0 to 2.1.0 #15

Description

@HeineMo

After upgrading from 2.0.0 to 2.1.0, public media URLs under /globalassets/... stop loading on our Optimizely CMS 12 site (.NET8, IIS hosting).

We are using:

"SqlBlobProvider": {
"LoadFromDisk": true
}

The relevant log entry is:

System.InvalidOperationException: The response cannot be cleared, it has already started sending.
at Microsoft.AspNetCore.Http.ResponseExtensions.Clear(HttpResponse response)
at Microsoft.AspNetCore.StaticFiles.StaticFileContext.ServeStaticFile(HttpContext context, RequestDelegate next)
at EPiServer.Web.Routing.Matching.Blobs.Internal.DefaultBlobHttpHandler.Invoke(HttpContext context)
at EPiServer.Cms.Shell.UI.Controllers.Preview.Internal.MediaEditRenderer.InvokeAsync(HttpContext context)

Looking at commit 6c0e45e, I see that 2.1.0 adds AsFileInfoAsync(DateTimeOffset?) and returns an IFileInfo implementation with Exists, Length, PhysicalPath, and CreateReadStream(). Since our failing stack goes through StaticFileContext.ServeStaticFile, I wonder if this new IFileInfo behavior could affect how Optimizely/ASP.NET Core serves SQL-backed blobs when LoadFromDisk = true.

Are there any known issues or required configuration changes in 2.1.0 when using LoadFromDisk = true?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions