Copied to clipboard

Flag this post as spam?

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


  • fabbau 18 posts 108 karma points
    Oct 23, 2020 @ 12:20
    fabbau
    0

    Error on CSS + JS files when deactivating debug mode

    Hi all,

    If I deactivate the debug mode debug="false"in the web.config the minified CSS + JS files are not served any more correctly from the server.

    In the network tab I have the following: enter image description here

    As outlined in the screenshot at least the CSS is not served.

    But when I have a closer look at the response I have the following: enter image description here The status is 200 and the served content type is: text/html instead of CSS

    I've tried to add some custom headers in the web.config:

    <add name="Access-Control-Allow-Origin" value="*" /> <add name="Access-Control-Allow-Methods" value="GET,POST" /> <add name="Access-Control-Allow-Headers" value="Origin, X-Requested-With, Content-Type, Accept" />

    But this has no effect.

    Does anybody have an idea what I can do?

    And to note: The system is on a load balanced infrastructure served from a cloudfront distribution.

  • Thomas Cantrell 1 post 71 karma points
    Oct 23, 2020 @ 19:40
    Thomas Cantrell
    0

    Happiness for every student is when the teacher appreciates and respects him, but with such exaggerated requirements it is difficult thanks to this site https://order.studentshare.org/capstone-project-writing I have always had excellent essays

  • Bo Jacobsen 438 posts 1818 karma points
    Dec 10, 2020 @ 13:29
    Bo Jacobsen
    0

    Hi fabbau.

    I got the same error, but with a different issue.

    When we deactivate debug mode, all DependencyHandler files are served corretly, both css and js. But all our custom styling from our package.manifest file is not included. All the js files from our package.manifest is included.

    Locally it worked when we changed our package.manifest stylesheets from min.css to just .css.

    {
      "javascript": [
        "~/App_Plugins/CustomPlugin/preValues/1/controller.js",
        "~/App_Plugins/CustomPlugin/preValues/2/controller.js",
        "~/App_Plugins/CustomPlugin/contentApps/1/controller.js",
        "~/App_Plugins/CustomPlugin/contentApps/2/controller.js"
      ],
      "css": [
        "~/App_Plugins/CustomPlugin/libs/css/overrideUmbracoStyle.min.css",
        "~/App_Plugins/CustomPlugin/libs/css/preValues.min.css",
        "~/App_Plugins/CustomPlugin/libs/css/doctypegrideditor.min.css",
        "~/App_Plugins/CustomPlugin/libs/css/contentApps.min.css"
      ]
    }
    

    But on our server its still a problem.

    Then we tried to play around with the httpRuntime in the web.config to have more maxRequestLength, requestLengthDiskThreshold and executionTimeout like:

    <httpRuntime requestValidationMode="2.0" enableVersionHeader="false" targetFramework="4.7.2" maxRequestLength="2147483647" executionTimeout="1600" requestLengthDiskThreshold="2147483647" />
    

    With no result. Then we played around with the ClientDependency.config fileProcessingProviders to include our domanis.

    <fileProcessingProviders>
          <add name="CompositeFileProcessor" 
               type="ClientDependency.Core.CompositeFiles.Providers.CompositeFileProcessingProvider, ClientDependency.Core" 
               enableCssMinify="true" 
               enableJsMinify="true" 
               persistFiles="true" 
               compositeFilePath="~/App_Data/TEMP/ClientDependency" 
               bundleDomains="localhost:54378,.domain1.dk,.domain2.com"
               urlType="Base64QueryStrings" 
               pathUrlFormat="{dependencyId}/{version}/{type}" />
        </fileProcessingProviders>
    

    Without any luck.

    So i hope someone seen this issue before and might have a hint :)

  • 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