简体   繁体   中英

package.json file not found in web application on Azure

We are moving a webforms application, primarily .NET 4.7.2, into Azure. A number of ASPX pages incorporate React sections. All works fine in the current Windows Server environment and running through Visual Studio, but when running in Azure, the package.json file cannot be found even though the file is in the correct location. Information that I've found indicates that this may be due to missing handler mappings. I have found a number of solutions that indicate adding settings in the web.config file may solve the problem:

<staticContent>
     <mimeMap fileExtension=".json" mimeType="application/json"/>
</staticContent>

However, this makes no difference; a 404 error is still returned.

Our Azure knowledge is minimal, but perhaps it would be better to add the handler mappings in the Azure portal? If this is the case, what should be entered as the script processor?

Any help will be welcome!

If you haven't already tried this, try restarting Visual Studio. Then, from the build menu, hit 'clean solution,' and then 'rebuild solution.'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM