I have a .ini file in the virtual directory of IIS. When i try to open the same in IE i get file not found HTTP 404 error.
http://www.virtualdirectoryname/sample.ini
Any inputs.
Please suggest some solution.
Thanks,
Karthick
By default, IIS will only serve files for which the extension matches a defined MIME type. See the following support article for reference - http://support.microsoft.com/kb/326965
To allow .ini files to be downloaded, follow the steps from the KB article linked above:
Open the IIS Microsoft Management Console (MMC), right-click the local computer name, and then click Properties.
Click MIME Types.
Click New.
In the Extension box, type the file name extension that you want (in this case, .ini).
In the MIME Type box, type application/octet-stream.
Note: this is specific to IIS 6 or IIS 5.x - The process is slightly different for IIS 7.x
Related
I was trying to run a .cshtml file but it gave an error:
Server Error in '/' Application.
--------------------------------------------------------------------------------
This type of page is not served.
Description: The type of page you have requested is not served because it has been explicitly forbidden. The extension '.cshtml' may be incorrect. Please review the URL below and make sure that it is spelled correctly.
Requested URL: /index.cshtml
So I searched for the solution and found that I had to edit the web.config file which is in the root directory(here it is My Site), but there is no file like that there there is only an index.cshtml which I had created.
I searched even the IIS and the IIS Express folders in Programs Files\ but there was no file like that?
If you are using WebMatrix, maybe your mistake was the starting point choice.
If you want to create a new Web Pages site you must start from a template in the Template Gallery of WebMatrix. Pay attention that the Empty Site template differs from the Empty Site option outside the Template Gallery because the first holds the files (binaries, packages and the web.config too) that are needed.
As the server error suggests, .cshtml files are not served, the reason for this is because they are server-side files that make up your application, they are just one piece of a much bigger picture.
If you launched your web application in debug mode and the URL in the browser was something like http://localhost:2932/Views/Home/Index.cshtml, just drop the /Views/Home/Index.cshtml part of the URL.
When I try to access a file extension .dae on IIS server... I get this error:
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.
Looks like I am not able to configure something on my IIS Server. Can somebody please direct me to the right places. I am using Visual Express 2012 for web.
Since directory browsing is disabled for you, only few file types are accessible for the client,
like scripts and images.
In order to allow other file types, try this link. don't forget to replace the dmg with dae of course.
I have added an application on IIS 7 and the physical path selected correctly.
However, I got this problem when browsing the application:
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable. the problem is also when I tried it like this: http://abc.com/default.aspx
but if I tried it with: http://abc.com/myimage.png => works
the server has installed .NET Framework 2.0, and also 4.0
Any idea what is wrong here?
THanks in advance.
Do you have the Default Document set to your homepage correctly?
One solution:
Try to add the type to IIS Mime types. Ex: I meet this error when try to click a mkv video file.
Open IIS Manager
Selection "MIME Type" feature
Add...
Enter this content
File name extension: mkv
Mime types: mkv/mkv
OK
Restart the website
Click the file again, its worked
I created a script for Internet Explorer which can be installed using GM4IE (Greasemonkey for Internet Explorer) and it has the extension .gm4ie.
When I try to give the download link to this file on my server, it gives this error:
http://i.stack.imgur.com/K7Rs4.jpg
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.
How do I add this this hanlder or a mime map and where do I add this?
Try adding a MIME type to IIS.
For IIS7: http://technet.microsoft.com/en-us/library/cc725608(WS.10).aspx
You can of course just zip it if you don't wish to add the MIME type.
I am running a classic ASP website where my online users can attach files to the internal message system. But whenever they upload an attachment with more then 3 characters in the file extension, the server gives me a 404.
Files like mypicture.jpg works fine, but files like mydocument.docx doesn't work?
Any suggestions?
IIS6 will only serve documents where the file extension is mapped to a mime type in the mime map property for the server or the site. In order to serve the more recent Office 2007 document types you will need to add extra mappings.
There are a number of places where you can find a list of these new mime types.
This is a simple one; from Office 2007 mime types for IIS:
.docm,application/vnd.ms-word.document.macroEnabled.12
.docx,application/vnd.openxmlformats-officedocument.wordprocessingml.document
.dotm,application/vnd.ms-word.template.macroEnabled.12
.dotx,application/vnd.openxmlformats-officedocument.wordprocessingml.template
.potm,application/vnd.ms-powerpoint.template.macroEnabled.12
.potx,application/vnd.openxmlformats-officedocument.presentationml.template
.ppam,application/vnd.ms-powerpoint.addin.macroEnabled.12
.ppsm,application/vnd.ms-powerpoint.slideshow.macroEnabled.12
.ppsx,application/vnd.openxmlformats-officedocument.presentationml.slideshow
.pptm,application/vnd.ms-powerpoint.presentation.macroEnabled.12
.pptx,application/vnd.openxmlformats-officedocument.presentationml.presentation
.xlam,application/vnd.ms-excel.addin.macroEnabled.12
.xlsb,application/vnd.ms-excel.sheet.binary.macroEnabled.12
.xlsm,application/vnd.ms-excel.sheet.macroEnabled.12
.xlsx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.xltm,application/vnd.ms-excel.template.macroEnabled.12
.xltx,application/vnd.openxmlformats-officedocument.spreadsheetml.template
Adding all mime-types to IIS in one step is very simple:
The easiest way to do this is stopping IIS and editing the metabase
XML file (C:\WINDOWS\system32\inetsrv\MetaBase.xml) using a text
editor. Search for the <IIsMimeMap Location="/LM/MimeMap" /> element
and append the lines above to the MimeMap attribute
The server probably has no mime-type defined for docx and such file extensions.