问题
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.
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>
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?
回答1:
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).
来源:https://stackoverflow.com/questions/20373376/internal-server-error-500-on-iis-8