Internal server error 500 on IIS 8

假如想象 提交于 2020-01-04 17:32:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!