Win 2008 R2 上的 IIS 7 默认不显示图像
我在 IIS 7 的默认网站上托管了一些图像,但当我尝试浏览它们时,IIS 会阻止这些图像。请帮助我! ))
I have some images hosted on the Default Web Site on IIS 7 but when i attempt to browse them IIS blocks the images. Help me please! ))
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
这可能是解决方案:
选中万维网服务/通用 Http 功能下的静态内容复选框。
这是一个带有屏幕截图的页面:
http://gurustop.net/blog/2009/10/12/funny-problem-windows-7-iis-7-5-images-css-not-showing/
另一页:
http://peterkellner.net/2008/04/01/iis7imageproblem/
This might be the solution:
Check the Static Content checkbox under World Wide Web Services / Common Http Features.
Here is a page with a screenshot:
http://gurustop.net/blog/2009/10/12/funny-problem-windows-7-iis-7-5-images-css-not-showing/
Another page:
http://peterkellner.net/2008/04/01/iis7imageproblem/
我发现,对于 .NET 4.0 站点,web.config 中的以下条目导致我的图像无法提供:
删除 runAllManagedModulesForAllRequests="true" 解决了我的问题。
I found that, with a .NET 4.0 site, the following entry in the web.config caused my images to not get served up:
Removing the runAllManagedModulesForAllRequests="true" solved the problem for me.
就我而言,该功能已安装。解决问题的方法是:
/ 通用 Http 功能,然后重新启动服务器
常见的 Http 功能。
In my case the feature was already installed. What solved the problem was:
/ Common Http Features, then restart the server
Common Http Features.
在 IIS 中找到 RequestFiltering。然后鼠标右键“打开功能”
并查看抛出不允许下载的文件扩展名。
In your IIS find RequestFiltering. Then right mouse button "Open Feature"
And look throw file extensions that are not allowed to download.
我遇到了这个问题,并且 IIS 配置正确。
问题出在 Windows 中的权限。
基本上,我将 Inetpub/wwwroot 权限复制到我正在使用的目录中,然后它再次开始工作。
I had this issue and IIS was configured properly.
The problem was permissions in Windows.
Basically I copied over the Inetpub/wwwroot permissions to the directory I was using and it started working again.
现在我开始想,网站上的图片也没有显示!我不知道这是数据库/代码问题还是与不显示 CSS 有关,好吧,也许 IIS 安装有问题,对吗?嗯,完全正确!!!
https://i0.wp.com/www.gurustop.net/wp-content/uploads/2009/10/iis-static-content.png?ssl=1
Now I started thinking, images in the website didn’t show also! I didn’t know whether this was a DB/code issue or related to not showing the CSS, well, maybe something is wrong with IIS installation, right? Well, exactly!!!
https://i0.wp.com/www.gurustop.net/wp-content/uploads/2009/10/iis-static-content.png?ssl=1