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
Related
I know there is posts with this issue, but nothing has worked so far.
So my issue is that when I get here:
<%$ resources:af.roi.web, InProgressTitle %>
The key is not found in the AppGlobalResources->af.roi.web.resx file, but I can find the file (and the key) in the folder bin/App_GlobalResources.
I have tried changing the Build Action of the resource file, same error.
I have activated windows feature (compatibility with IIS 6, Classic ASP, ...), nothing new.
I know this code work on the server with IIS 6, but I can't figure how to make it run on my local Windows 10 with IIS 10.
I hope one of you has an idea. Thank you anyway.
You can try the solution below:
Right click on your resource (resx) file
Go to Properties
Change "Build Action" to "Content"
If the solution above doesn't work, try "Embedded Resource" option for "Build Action" parameter.
If you are still getting the same error, try changing "Copy to Output Directory" value to "Copy Always". A folder named "App_GlobalResources" will be created when you publish the code. Make sure this folder is in the same location as the page that is giving resource file connection error.
I have a page with the name "man.aspx" , when i open it , it works good in localhost,
but when i publish it , it give error :
mywebsite-3.ir/error.htm?aspxerrorpath=/man.aspx
or
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
It can be cause by a lot of things, did you set the path properly in IIS ?
Does you default page is displayed correctly ? Try to add a file with index.html in your root folder.
Did you set ASP.Net ?
Go into IIS Manager -> Servername -> "Web Service Extensions", and set ASP.NET v2.0.xxxxxx to Allowed.
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 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