Click here to Skip to main content
14,421,004 members
Rate this:
Please Sign up or sign in to vote.
See more:
hi all,

I hosted a website in IIS 7.0,the website is developed coldfusion(.cfm files). it's returning an error.

error:

HTTP Error 404.3 - Not Found:

The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.


Most likely causes: •It is possible that a handler mapping is missing. By default, the static file handler processes all content.
•The feature you are trying to use may not be installed.
•The appropriate MIME map is not enabled for the Web site or application. (Warning: Do not create a MIME map for content that users should not download, such as .ASPX pages or .config files.)
•If ASP.NET is not installed.


Things you can try:
•In system.webServer/handlers: ◦Ensure that the expected handler for the current page is mapped.
◦Pay extra attention to preconditions (for example, runtimeVersion, pipelineMode, bitness) and compare them to the settings for your application pool.
◦Pay extra attention to typographical errors in the expected handler line.

•Please verify that the feature you are trying to use is installed.• Verify that the MIME map is enabled or add the MIME map for the Web site using the command-line tool appcmd.exe. 1.To set a MIME type, use the following syntax: %SystemRoot%\windows\system32\inetsrv\appcmd set config /section:staticContent /+[fileExtension='string',mimeType='string']
2.The variable fileExtension string is the file name extension and the variable mimeType string is the file type description.
3.For example, to add a MIME map for a file which has the extension ".xyz": appcmd set config /section:staticContent /+[fileExtension='.xyz',mimeType='text/plain']



can you any one tell me how I can run this?
Posted
Updated 20-Jan-19 21:44pm
Rate this:
Please Sign up or sign in to vote.

Solution 2

I encountered this problems while developing a new site using a .less file. This could happen in ASP.Net Development if the file extension is not recognized. To resolve this issue, I had to use a combination of 3 solutions.

You do this by adding a handler to you project's Web.config file and possibly changing the WCF components.

Let's start with the easiest implementation:
1- Open your project's Web.config file
2- Under <system.webServer> add the MIME mapping to handle the file extension you need, like so:
<system.webServer>
    <staticContent>
        <!-- .LESS FILES HANDLER FOR COMPILING IN CSS -->
        <mimeMap fileExtension=".less" mimeType="stylesheet/less" />
        </staticContent>
</system.webServer>"

3- Rebuild the solution and watch for the same error. Most likely this should resolve the issue handling .less files. You can add handlers for any type of file with another <mimeMap fileExtension=" mimeType="" />

If that didn't resolve the problem, you will also need to change your WCF components. Here's what you need to do:
1- Go go Control Panel
2- Click on Turn Windows feature on or off
3- Enable all the components under .NET Framework 3.5 (includes .NET 2.0 and 3.0), which include Windows Communication Foundation HTTP Activation and Window Communication Foundation Non-HTTP Activation.
4- Enable all the components under .NET Framework 4.5 Advanced Services, which include the ASP.NET 4.5 and WCF Services

Hopefully it Windows will load all the additional components after a couple of minutes and you just need to rebuild your solution to work.

If you don't want to go through all the manual changes, than what you can do is to add a new NuGet package to your project solution. These are the steps:
1- Right click the solution
2- Choose "Manage NuGet Packages"
3- Click the "Search Online" and type less
4- Click the applicable solution for installation and start using.

The NuGet package should download all the necessary components. This process should modify your Web.Config file appropriately and install all the dependencies for proper LESS support.
   
v2
Rate this:
Please Sign up or sign in to vote.

Solution 1

ColdFusion has to be run on a ColdFusion compatible web server, see ColdFusion Wiki[^] under the section "Alternative Server Environments" to see what environments will run ColdFusion pages.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100