Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • bh 444 posts 1544 karma points
    Jun 16, 2022 @ 15:59
    bh
    0

    Bogus 404 error

    I've got a file in my wwwroot folder called myfile.ashx, but when I browse to https://www.mydomain.com/myfile.ashx I'm getting a 404 error.

    My first thought was this is a MIME Type issue. So I tried adding this to my web.config, but that didn't help.

    <staticContent>
            <mimeMap fileExtension=".ashx" mimeType="text/html" />
    </staticContent>
    

    I presume this is a .NET Core issue and not an issue specific Umbraco. But, I am hoping someone here might be able to point me in the right direction.

    Thanks in advance!

  • bh 444 posts 1544 karma points
    Jun 16, 2022 @ 18:20
    bh
    0

    Answered my own question here. For .NET Core I need to make my *.ashx handler a Middleware.

    https://docs.microsoft.com/en-us/aspnet/core/migration/http-modules?view=aspnetcore-6.0#migrating-handler-code-to-middleware

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies