IIS7.5 上的静态文件处理程序不提供脚本 [英] Script not served by static file handler on IIS7.5

查看:28
本文介绍了IIS7.5 上的静态文件处理程序不提供脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚尝试将我的第一个 Web 应用程序部署到我的 Windows 7 Home Premium 笔记本上的 IIS.创建应用程序后,我必须更改为经典应用程序池,然后为框架 4.0 设置该池.现在我收到以下错误:

I've just tried to deploy my first web application to IIS on my Windows 7 Home Premium notebook. After creating the application, I had to change to the Classic App Pool, then set that pool for framework 4.0. Now I get the following error:

HTTP 错误 404.17 - 未找到请求的内容似乎是脚本,不会由静态文件处理程序提供服务.

HTTP Error 404.17 - Not Found The requested content appears to be script and will not be served by the static file handler.

请求的 URL 是http://localhost:80/pvmms/default.aspx

The requested URL is http://localhost:80/pvmms/default.aspx

我担心广泛的谷歌搜索没有产生足够清晰或明确的结果,我无法与之合作,我像往常一样求助于专家.

I'm afraid extensive Googling has yielded nothing clear or definite enough for me to work with and as usual I've turned to the experts.

我怀疑这是因为 .aspx 文件没有框架 4.0 处理程序映射.但是,aspnet_regiis 甚至让我的管理员用户指指点点,并说我需要管理员权限才能运行它.

I suspect this is because there are no framework 4.0 handler mappings for .aspx files. However, aspnet_regiis even gives my admin user the finger and says I need admin rights to run it.

编辑 #2:我注册了所有框架(2 & 4、32 和 64),现在都可以使用了.我通过手动将 .aspx 的脚本映射添加到 aspnet_isapi 中发现了这一点,瞧.我不明白为什么框架的安装不这样做,除非我的记忆失败了并且我在安装VS后才启用了IIS.

EDIT #2: I registered all the frameworks (2 & 4, 32 and 64) and all now works. I found this by manually adding a script map for .aspx to aspnet_isapi and voila. I don't understand why the installation of the framework doesn't do this, unless my memory fails me and I only enabled IIS after installing VS.

推荐答案

现在也许为时已晚,但通常您需要运行

Maybe too late now, but more often than not you need to run

aspnet_regiis.exe -i  

安装asp.net后.也许我现在会这样做.

after installing asp.net. Maybe I would do it anyway now.

这篇关于IIS7.5 上的静态文件处理程序不提供脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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