Quick question:
I've been trying to enable file extensions in my MVC application by editing the Web.config file, but it doesn't seem to be working. Is there anything else I need to do?
<system.webServer>
<staticContent>
<mimeMap fileExtension=".cch" mimeType="application/unknown" />
<mimeMap fileExtension=".cc1" mimeType="application/unknown" />
</staticContent>
<handlers>
...
</handlers>
Here's a link to a picture of the error page
Detailed question:
The code above works perfectly fine in a non-MVC ASP .NET web application, but for some reason, it's not working in MVC. The path is correct as I can access picture files in the same folder where the .cch and .cc1 files are located.
I used Fusion 2.5 software to create an HTML5 application. After exporting the application, I have an index.html, a javascript file, picture files, a .cch file, and a .cc1 file.
Here's a picture of my project in Visual Studio
I'm testing on the index.html page, which opens successfully but displays a 404 error for the .cch file (clicking on it leads to the linked error page). I've also tried moving the content from index.html to a layout file with no success. However, accessing .png files works without any issues.
Code snippet using the .cch file:
<script src="src-right/Runtime.js"></script>
<script>
window.addEventListener("load", windowLoaded, false);
function windowLoaded()
{
new Runtime("MMFCanvas", "resources-right/right.cch");
}
</script>
Any insights on what might be causing this issue?
UPDATE:
I finally found a solution by starting a new MVC project from scratch. I'm still unsure about the root cause of the problem, but upon comparing the Web.config files of my old and new projects, they were significantly different. My initial MVC project on this PC involved various tasks like setting up Azure connections, so perhaps something went wrong along the way. Thank you for your assistance :)