简体   繁体   English

为什么我在IIS 8.0中收到404.3错误?

[英]Why am I getting a 404.3 error in IIS 8.0?

So, I have actually been searching around Stack Overflow for about 20 minutes and still can't seen to find a definitive answer to my question. 所以,我实际上一直在搜索Stack Overflow大约20分钟,但仍然无法找到我的问题的确切答案。

I have had this error a few times, so I just did a fresh install of IIS 8.0 (I'm running Windows 8) and still got this error when I try to go to localhost/test1.aspx: 我有几次这个错误,所以我刚刚安装了IIS 8.0(我正在运行Windows 8),当我尝试转到localhost / test1.aspx时仍然出现此错误:

截图

As you can see (if you clicked the link), it is a 404.3 error. 如您所见(如果您单击链接),这是一个404.3错误。

Here are some of my details: 以下是我的一些细节:

  • I am running Windows 8 我正在运行Windows 8
  • I have IIS 8.0 我有IIS 8.0
  • My physical directory is C:\\inetpub\\wwwroot\\test1.aspx 我的物理目录是C:\\inetpub\\wwwroot\\test1.aspx
  • I am following a "W3Schools" tutorial correctly and I still can't get it to work right 我正确地遵循“W3Schools”教程,但仍然无法使其正常工作
  • I installed every feature that was available with IIS 8.0 我安装了IIS 8.0提供的所有功能

Here is my source code for the "test1.aspx" file: 这是我的“test1.aspx”文件的源代码:

<!doctype html>
<html>
<body>
<%
response.write("My first ASP script!")
%>
<body>
</html>

Anyone have any answers for me please? 有人对我有任何答案吗? They would be greatly appreciated. 他们将不胜感激。

A 404.3 http status in IIS means that there is no MIME type defined for your file extension of aspx . IIS中的404.3 http状态表示没有为aspx的文件扩展名定义MIME类型。 You can also see in the error message that the StaticFileModule is handling the request. 您还可以在错误消息中看到StaticFileModule正在处理请求。 This is the module that serves static files from your hard drives. 这是从硬盘驱动器提供静态文件的模块。

It works correctly because it should not serve *.aspx files from the hard drive to the browser. 它工作正常,因为它不应该从硬盘驱动器向浏览器提供*.aspx文件。 You should not add a MIME type for aspx . 您不应该为aspx添加MIME类型。

The problem is that the module that handles aspx files is not working correctly. 问题是处理aspx文件的模块无法正常工作。 There can be multiple reasons for this. 这可能有多种原因。

In IIS manager open your web site and double-click the Handler Mappings icon, there should be three entries for *.aspx (PageHandlerFactory). 在IIS管理器中打开您的网站并双击Handler Mappings图标, *.aspx (PageHandlerFactory)应该有三个条目。

Also make sure that the application pool for your site has a .NET CLR Version set. 还要确保站点的应用程序池具有.NET CLR Version集。

If these properties are not set, there is a problem with your setup. 如果未设置这些属性,则表明您的设置存在问题。

Im sorry if you have tried this, but try this url entry: localhost/test1.asp 对不起,如果你已经尝试过这个,但试试这个url条目:localhost / test1.asp

Ill add here, and please understand im not trying to be rude, that the reason you are not being well received is your questions are not really questions as such. 我在这里添加,请理解我不要试图粗鲁,因为你没有受到好评的原因是你的问题不是真正的问题。 The title of the post is what your question should be and just putting a '?' 帖子的标题是你的问题应该是什么,只是把'?' on the end of it doesn't make it a question. 在它的最后并没有成为一个问题。 Basically it comes down to formatting the question correctly. 基本上它归结为正确格式化问题。

IE "IIS 8.0 404.3 error?" IE“IIS 8.0 404.3错误?” isn't a question nor does it give anything except something you could put into Google. 这不是一个问题,也不会提供任何东西,除了你可以放入谷歌的东西。 Putting it this way might be better: "Why am I getting this a 404.3 error using ISS 8.0?" 这样做可能会更好:“为什么我使用ISS 8.0得到这个404.3错误?”

Just some advice for next time :) 只是下次的一些建议:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM