Wednesday, June 24, 2009

HTTP Error 404 - File or directory not found. Internet Information Services (IIS)

HTTP Error 404 - File or directory not found. Internet Information Services (IIS)

Problem :


We come across this common exception when we try to open a file in IIS 6.0 or later web server for which MIME TYPE is not defined for the file extension.

Exception I Encountered Was :


#########################################################################################
HTTP Error 404 – File or Directory not found
#########################################################################################

Solution :



Define a wildcard "MIME Type" within the roaming user profile directory of the IIS server. Steps to define the wildcard "MIME Type" :
  • Click "Start > Control Panel > Administrative Tools".
  • Double-click on "Internet Information Services (IIS) Manager".
  • Right-click on the roaming user profile directory that has been created.
  • Select "Properties".
  • Select the "HTTP Headers" tab.
  • Click the "MIME Types" button.
  • Click the "New" button.
  • Type "*" in the "Extension" field:
  • Type "application/octet-stream" in the "MIME type" field:
  • Click "OK" to apply the new MIME type.
  • Click "OK" again to apply the new settings.
Note:
  • In the example above, IIS now serves files of all file extensions.
  • In order for the changes to take effect, the "World Wide Web Publishing Service" must be restarted, or just wait for the worker process to recycle.
  • This information can also be referenced within the "Dragon NaturallySpeaking IT Administrators Guide" under "HTTP Roaming Settings".



Similar Exception :

     
- HTTP Error 404 - File or directory not found. Internet Information Services (IIS)

No comments:

Post a Comment