IIS 7 对静态内容抛出 500 错误
我已经配置了一个带有集成管道和 .Net 4 框架的应用程序池。我正在使用 Asp.Net MVC 3 来展示我的网站...
我的控制器和视图显示正确,但对我的静态内容的引用都从 IIS 返回零星的 500 错误。
例如:直接请求 /content/style.css
将返回 500 错误。详细的错误摘要消息表明正在使用的处理程序是“StaticFile”,错误代码是“0x80070070”
我已授予“Everyone”用户对我的 /content 文件夹和所有子对象的读取权限。我已授予“Everyone”用户对包含 SqlCompact 数据库的 App_Data 文件夹的完全控制权。
有什么想法可能导致我的网络服务抛出这些错误吗?
I have configured an app pool with an integrated pipeline and .Net 4 framework. I am using Asp.Net MVC 3 to present my site...
My controllers and views are presenting properly, but references to my static content are all returning sporadic 500 errors from IIS.
For example: A direct request to /content/style.css
returns a 500 error. The detailed error summary message indicates the handler in use is the "StaticFile" and the error code is "0x80070070"
I have granted the 'Everyone' user read access to my /content folder and all child objects. I have granted the 'Everyone' user full control over my App_Data folder that contains my SqlCompact database.
Any ideas what could be causing my web service to throw these errors?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此配置的问题在于对 App_Data 文件夹内容的读写访问。 SqlCompact 生成了一个 SDF 文件,需要将其标记为可供 Web 进程访问。一旦可用,IIS 就开始正确响应。
The problem with this configuration turned out to be read-write access to the contents App_Data folder. SqlCompact generated a SDF file that needed to be marked as accessible to the web process. Once that was available, IIS started responding properly.