Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Design and Architecture
  4. File upload fails through web application firewall with 403 Error (ModSecurity)

File upload fails through web application firewall with 403 Error (ModSecurity)

Scheduled Pinned Locked Moved Design and Architecture
asp-netcsharpdotnetcloudarchitecture
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    John ph
    wrote on last edited by
    #1

    Working on .Net Core MVC web application hosted in Azure App Service with WAF (Web Application Firewall) enabled. WAF rules are blocking the File upload functionality. When the rules are turned OFF, application works fine. Does anyone know how this can be fixed?

    Regards, John

    P N 2 Replies Last reply
    0
    • J John ph

      Working on .Net Core MVC web application hosted in Azure App Service with WAF (Web Application Firewall) enabled. WAF rules are blocking the File upload functionality. When the rules are turned OFF, application works fine. Does anyone know how this can be fixed?

      Regards, John

      P Offline
      P Offline
      phil o
      wrote on last edited by
      #2

      Is there any error logged whenever upload is failing?

      "Five fruits and vegetables a day? What a joke! Personally, after the third watermelon, I'm full."

      1 Reply Last reply
      0
      • J John ph

        Working on .Net Core MVC web application hosted in Azure App Service with WAF (Web Application Firewall) enabled. WAF rules are blocking the File upload functionality. When the rules are turned OFF, application works fine. Does anyone know how this can be fixed?

        Regards, John

        N Offline
        N Offline
        Nathan Minier
        wrote on last edited by
        #3

        It depends entirely on the rule set that you're using. It's possible that you've got a content-type on the upload that ModSec doesn't like, or that you're using something other than POST to send a file and it doesn't like that, or even that it's tuned to completely disallow uploads. The logs ModSec is generating will tell you which rule is getting triggers, and should help you figure out how to resolve the issue.

        "Never attribute to malice that which can be explained by stupidity." - Hanlon's Razor

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups