IIS 8上的内部服务器错误500 [英] Internal server error 500 on IIS 8
问题描述
我的网站确实存在一个奇怪的问题。它在本地工作正常,但在线它显示 iis 8 500 - 内部服务器错误
。
I'm having really a weird problem with my website. It works fine locally, but online it shows iis 8 500 - internal server error
.
在线和本地版本的网站我使用相同的远程数据库。该网站在线工作,但当我尝试将文件上传到上传目录时,它就会丢失,该目录是网站的一部分。
In the both online and local versions of the site I use the same remote database. The website works online, but it drops when I try to upload a file to the "upload" directory, which is part of the website.
我不知道问题是什么,因为我无法得到任何详细的错误。我在web.config中添加了这些代码片段,但仍然无法获得详细的错误说明。
I don't know what the problem is because I can't get any detailed errors. I've added these code pieces in web.config, but still can'tget detailed error descriptions.
<httpErrors errorMode="Detailed" />
<customErrors mode="Off"/>
<compilation debug="true" targetFramework="4.5"/>
<httpErrors errorMode="Detailed" />
我还设置了最大文件大小:
I've also set the max file size:
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="4096" />
</requestFiltering>
</security>
我尝试上传的文件大小只有几KB。我怀疑用户没有写入权限,我要求托管管理员提供写入权限(我现在正在等待)。
and the size of the file I'm trying to upload is only few KBs. I suspect that the user doesn't have write permissions, and I asked the hosting admins to give write permissions (I'm waiting for that right now).
做什么你认为它的问题?另外,为什么我没有得到详细的错误?
What do you think its the problem? Also, why am I not getting detailed errors?
推荐答案
写权限是我收到错误的原因。
Write permissions were the reason why I was getting the error.
之前我给了文件夹读/写权限,但看起来它们在发布较新的项目版本时被覆盖了。
I gave the folder read/write permissions before, but it looks like they were overridden when the newer project version was published.
(发布时我们会删除目的地的所有文件)。
(On publish we delete all files on the destination).
这篇关于IIS 8上的内部服务器错误500的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!