Copied to clipboard

Flag this post as spam?

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


  • mmaty 111 posts 284 karma points
    Apr 03, 2024 @ 09:31
    mmaty
    1

    Umbraco .js files fail with 404 on IIS

    Hello everyone,

    it seems as if files in the wwwroot\umbraco\js folder can't be delivered. IIS reports a 404 for each of the files there, like utilities.min.js, umbraco.controllers.js etc.

    So I created a file test.html. I can get the file in the browser from wwwroot (as /test.html), from wwwroot/umbraco (as /umbraco/test.html). But as soon as it resides in the /wwwroot/umbraco/js folder, there is a 404 for /umbraco/js/test.html.

    Why is this folder treated in another way than other folders under wwwroot?

    I get the 404 page from IIS, which shows the wrong physical folder:

    C:\PathToProject\PublishFolder\umbraco\js\test.html

    instead of

    C:\PathToProject\PublishFolder\wwwroot\umbraco\js\test.html

    Does anybody have an idea what's going on there?

    I use Umbraco 10.8.3. IIS 10 on Windows Server 2016 and Windows 11.

    My Web.config file:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <location path="." inheritInChildApplications="false">
        <system.webServer>
          <handlers>
            <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
          </handlers>
          <aspNetCore processPath=".\Rintra.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
        </system.webServer>
      </location>
    </configuration>
    <!--ProjectGuid: d448d858-e160-4760-a122-02f68b29aca2-->
    

    My AppPool was created with the setting "No Managed Code".

  • Joe 32 posts 136 karma points
    Jun 15, 2024 @ 19:02
    Joe
    0

    I faced same error in Umbraco 10 in hosted in IIS. My situation is I cannot load backoffice page on browser, and found all *.js files under /wwwroot/umbraco/js cannot be loaded with 404 not found error in browser. But there's no related log found, and other frontend pages are loading fine.

    Eventually I deleted the site (and its app pool) in IIS and re-create the site in IIS, also delete the existing files and then re-deploy the files. Then it resume working.

    Maybe it's because of some old file, Maybe it's because of IIS site corupted, anyway it's my case. Not sure whether it helps.

Please Sign in or register to post replies

Write your reply to:

Draft