asp.net mvc - Could not handle http error on azure -
the solve of problem: added:
<httperrors errormode="custom"> <remove statuscode="403" substatuscode="-1" /> <remove statuscode="404" substatuscode="-1" /> <remove statuscode="500" substatuscode="-1" /> <error statuscode="404" path="/404.html" responsemode="redirect"/> <error statuscode="403" path="/403.html" responsemode="redirect"/> <error statuscode="500" path="/500.html" responsemode="redirect"/> </httperrors>
removed:
<customerrors mode="on"> <error statuscode="403" redirect="~/403.html" /> <error statuscode="404" redirect="~/404.html" /> <error statuscode="500" redirect="~/500.html" /> </customerrors>
i applied httperrors in web.config on project when test on localhost it's ok. however, when publish azure couldn't handle http error 500 , 403. example:
i tried url: www.mywebsite.com/content response on localhost: ok getting 500 page or 403 response on azure: "the page cannot displayed because internal server error has occurred."
my web.config:
<httperrors errormode="custom"> <error statuscode="403" substatuscode="14" path="403.html" responsemode="redirect"/> <error statuscode="500" substatuscode="19" path="500.html" responsemode="redirect"/> </httperrors>
why happens, don't understand. know problem?
Comments
Post a Comment