Win7教授64位返回空白页面下的IIS 7.5(完全没有HTML) [英] IIS 7.5 under Win7 Prof. 64bit Returning Blank Page (No HTML at all)

查看:493
本文介绍了Win7教授64位返回空白页面下的IIS 7.5(完全没有HTML)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Windows7中设置我的开发环境,并且无法让IIS运行起来。我已经设置了自IIS6以来我一直在做的所有事情,所以我有了基础知识。我的问题必须是在IIS7和IIS7.5之间或操作系统中发生变化的问题。

I am trying to setup my development environment in Windows7 and am having trouble getting IIS to work. I have set everything up like I have been doing since IIS6 so I have the basics down. My problem must be in something that has changed between IIS7 and IIS7.5 or in the OS.

我的网站都不会返回html。不是默认网站,也不是新添加的网站。

None of my websites will return html. Not the default site and not a newly added site.

如果我

telnet localhost 80

然后在空白屏幕

GET / <enter>

我什么都没有,不是单个标题或HTML元素。

I get nothing, not a single header or HTML element.

如果我输入垃圾而不是GET请求,我会得到以下HTML:

If I enter garbage instead of a GET request I get the following HTML:

HTTP/1.1 400 Bad Request Content-Type:
text/html; charset=us-ascii Server:
Microsoft-HTTPAPI/2.0 Date: Thu, 17
Sep 2009 17:04:01 GMT Connection:
close Content-Length: 326

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <HTML><HEAD><TITLE>Bad
 Request</TITLE> <META
 HTTP-EQUIV="Content-Type"
 Content="text/html;
 charset=us-ascii"></HEAD>
 <BODY><h2>Bad Request - Invalid
 Verb</h2> <hr><p>HTTP Error 400. The
 request verb is invalid.</p>
 </BODY></HTML>

因此证明IIS在那里并处理端口80上的请求。

So that proves IIS is there and handling requests on port 80.

在我的IIS日志路径中,我根本没有文件。因此,无论出于何种原因,都没有写入日志。

In my IIS Logs path, I have no files at all. So for whatever reason logs aren't being written.

如果我在IIS管理器中查看网站上的基本设置,然后单击测试连接按钮我收到错误相关信息到权限:

If I view the Basic Settings on the Web Site in IIS Manager then click the Test Connection button I get an error related to permissions:


服务器配置为使用带有
内置帐户的
传递身份验证访问
指定的物理路径。但是,IIS
Manager无法验证
内置帐户是否具有访问权限。确保
应用程序池标识具有
对物理路径的读访问权限。如果
此服务器加入域,
应用程序池标识为
NetworkService或LocalSystem,请验证
\ $有
读取访问权限路径。然后
再次测试这些设置。

The server is configured to use pass-through authentication with a built-in account to access the specified physical path. However, IIS Manager cannot verify whether the built-in account has access. Make sure that the application pool identity has Read access to the physical path. If this server is joined to a domain, and the application pool identity is NetworkService or LocalSystem, verify that \$ has Read access to the physical path. Then test these settings again.

我的AppPool作为ApplicationPoolIdentity运行,它似乎不是真正的用户,所以我无法给予ApplicationPoolIdentity文件权限。我做了一个测试给IIS_IUSR和其他人我可以找到完全访问路径。

My AppPool is running as ApplicationPoolIdentity which doesn't seem to be a real user, so I can't give ApplicationPoolIdentity file permissions. I did as a test give IIS_IUSR and everybody else I could find full access to the path.

无论我到目前为止做了什么,我都没有看到IIS说权限是正确的。但是,我也从未见过错误,特别是没有权限错误(300s)。

No matter what I have done up to this point, I have not seen IIS say the permissions are correct. However, I have also never seen an error, especially not a permissions error (300s).

那么,有什么想法吗?我试图完全删除IIS,c:\inetpub,然后重新安装所有内容。我基本上在这里做默认设置,所以它必须是简单的。

So, any ideas? I have tried to completely remove IIS, c:\inetpub and then reinstall everything. I am basically doing the default setup here, so it must be something simple.

感谢您的时间......

Thanks for your time...

推荐答案

我解决了。对于其他有问题的人,这就是我所做的。

I solved it. For anybody else having the issue, here is what I did.

首先复制问题:我在添加/删除中选择ASP.NET来安装IIS Windows功能菜单。这是选择IIS运行.NET应用程序所需的一切,但有趣的是它无法提供静态页面(.html,css,js等)。我的测试页面只是一个hello world .html页面,所以这就是为什么它不是没有服务。

First to replicate the issue: I was installing IIS by choose "ASP.NET" in the Add/Remove Windows features menus. This was selecting everything needed for IIS to run .NET apps, but interestingly it couldn't serve static pages (.html, css, js etc.) My test page was just a hello world .html page, so that is why it wasn't being served.

要修复它:要启用静态内容服务,您必须在相同的添加/删除Windows功能中专门选择常见HTTP功能下的静态内容名单。一旦你这样做我的测试页面工作正常。

To fix it: To enable serving of Static content you must specifically choose "Static Content" under Common HTTP Features in the same Add/Remove Windows Features list. Once you do this my test page worked fine.

总结:我不明白一个典型的.NET如何在没有静态内容的情况下运行(CSS,图像,Javascript) ,所以我不知道为什么MS在选择ASP.NET时默认不包含静态内容。也许我在安装IIS时的工作流程是错误的。

In summary: I don't understand how a typical .NET would run without static content (CSS, Images, Javascript), so I don't know why MS wouldn't include Static Content by default when choosing ASP.NET. Perhaps my workflow in installing IIS was wrong.

我确信有一种方法可以跟踪请求流以查找静态内容请求被阻止,但是我不知道怎么做。

I'm sure there was a way to trace the flow of the request to find static content requests were getting blocked, but I don't know how to do that.

这篇关于Win7教授64位返回空白页面下的IIS 7.5(完全没有HTML)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆