DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Site Assets File Upload Bad Request

Sort:
You are not authorized to post a reply.





New Around Here





    DNN 9.6.2, previously upgraded from 9.2.0. We used to be able to upload files in Site Assets on 9.6.2 and out of the blue now when we attempt to upload a Bad Request error appears.

    Error from log: DotNetNuke.Web.InternalServices.FileUploadController - System.InvalidOperationException: Bad Request
       at DotNetNuke.Web.InternalServices.FileUploadController.UploadFile(Stream stream, Int32 portalId, UserInfo userInfo, String folder, String filter, String fileName, Boolean overwrite, Boolean isHostPortal, Boolean extract, String validationCode)

    Any idea how to fix this on 9.6.2 without upgrading? Thanks.






    Veteran Member





      Pete,

      if you followed the DNN Platform Suggested Upgrade Path you should have gone from 9.2.0 to 9.3.2 and then to 9.6.0 (or, even better, to 9.10.02).

      Anyway, DNN requires .Net Framework 4.7.2 or higher (afair since version 9.4.2), this could also be an issue.

      Happy DNNing!
      Michael

       

      Michael Tobisch
      DNN★MVP

      dnnWerk Austria
      DNN Connect





      New Around Here





        Thanks. I should have clarified 9.2.0 was our original install, but we did upgrade from 9.2.0 to 9.3.2 then to 9.6.2, which appeared to be an acceptable upgrade path at that time. We are targeting 4.7.2 as well.

        I have re-synced files and folders in the file manager and compared web.config between this site, and another 9.6.2 site where the file upload is successful, but no leads.

        If anyone has resolved a Bad Request error when uploading files I would love to hear your solution. Thanks.






        Veteran Member





          Pete,

          please check the permissions in the file system, or if the hard disk has enough space. Also check if the file you want to upload does not exceed the limit.

          There was (or is still, I don't know) a "bug" that limits the file size to 28 MB, even if the value in your web.config is higher.

          Happy DNNing!
          Michael

          Michael Tobisch
          DNN★MVP

          dnnWerk Austria
          DNN Connect





          New Around Here





            We reapplied permissions for the App Pool. We checked the module and folder permissions in the Site Assets. Plenty of disk space as well. The file size isn't the problem either. We're testing with all file types and sizes. Even a 1KB file gets a Bad Request. Thanks.






            Veteran Member





              Anything in the log files?

              Happy DNNing!
              Michael

              Michael Tobisch
              DNN★MVP

              dnnWerk Austria
              DNN Connect





              New Around Here





                Each time it happens the log files have the same message from my original post:

                 DotNetNuke.Web.InternalServices.FileUploadController - System.InvalidOperationException: Bad Request
                   at DotNetNuke.Web.InternalServices.FileUploadController.UploadFile(Stream stream, Int32 portalId, UserInfo userInfo, String folder, String filter, String fileName, Boolean overwrite, Boolean isHostPortal, Boolean extract, String validationCode)

                Thanks.






                Veteran Member





                  This was obviously a problem with 9.6.1 and looks like been fixed.

                  FileUpload validation code prevents super users from uploading to the default portal · Issue #3850 · dnnsoftware/Dnn.Platform (github.com)

                  I would suggest to upgrade to the latest version.

                  Happy DNNing!
                  Michael

                  Michael Tobisch
                  DNN★MVP

                  dnnWerk Austria
                  DNN Connect





                  New Around Here





                    I was hoping to fix without needing to upgrade since we have other installations of 9.6.2 where this issue does not occur, but for this install it looks like we'll have to upgrade sooner than later. Thanks again.

                    You are not authorized to post a reply.

                    These Forums are dedicated to the discussion of DNN Platform.

                    For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                    1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
                    2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
                    3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
                    4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                    5. No Flaming or Trolling.
                    6. No Profanity, Racism, or Prejudice.
                    7. Site Moderators have the final word on approving / removing a thread or post or comment.
                    8. English language posting only, please.

                    Would you like to help us?

                    Awesome! Simply post in the forums using the link below and we'll get you started.

                    Get Involved