tag:blogger.com,1999:blog-8980734269859237005.post5429297688522001561..comments2024-01-30T01:03:21.768-08:00Comments on DevCurry: ASP.NET MVC: Handling Exceptions and 404 ErrorsSuprotim Agarwalhttp://www.blogger.com/profile/08349831623922214390noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-8980734269859237005.post-91944163057574912092015-07-22T06:44:50.345-07:002015-07-22T06:44:50.345-07:00Spent all day trying to get nice custom error mess...Spent all day trying to get nice custom error messages into our web application.<br />When i stumbled onto this article.<br />I have implemented your article's suggestions and now it works the way I intended.<br /><br />Thanks for the great article!Anonymoushttps://www.blogger.com/profile/03887031216094333074noreply@blogger.comtag:blogger.com,1999:blog-8980734269859237005.post-21253706143580824842015-06-10T21:49:52.239-07:002015-06-10T21:49:52.239-07:00Custom route creation is not necessary, you just n...Custom route creation is not necessary, you just need to leave the Web.config error tag attribute redirect like this redirect="~/Error/FailWhale" instead of redirect="FailWhale"Sebastián Rojashttps://www.blogger.com/profile/06113889541192579265noreply@blogger.comtag:blogger.com,1999:blog-8980734269859237005.post-34918940130576949912015-06-10T21:47:06.067-07:002015-06-10T21:47:06.067-07:00Custom route creation is not necessary, you just n...Custom route creation is not necessary, you just need to leave the Web.config like this:<br /><br /><br /> <br /> <br /> <br />...Sebastián Rojashttps://www.blogger.com/profile/06113889541192579265noreply@blogger.comtag:blogger.com,1999:blog-8980734269859237005.post-18961878426215659662015-01-27T04:54:36.563-08:002015-01-27T04:54:36.563-08:00You have mistakes in code.
The links added to th...You have mistakes in code.<br /> <br />The links added to the menu options (in _Layout.cshtml) have the ActionName and ControllerName parameters the wrong way round. <br /><br />Also is there supposed to be a corresponding view for the ServerSide404 method created in HomeController? <br /><br />And you say nothing (other than to setup an Empty view) about the extra content in FailWhale.cshtml Ukjimhttps://www.blogger.com/profile/05926514319007019281noreply@blogger.comtag:blogger.com,1999:blog-8980734269859237005.post-54571068343431760572014-01-19T22:00:43.106-08:002014-01-19T22:00:43.106-08:00In my case 404 error handling is working fine.But ...In my case 404 error handling is working fine.But in the URL it always shows the Error404 i.e., my action method/view name before any other action method/view name for example Create as follows:<br /><br />http://localhost:50697/Error404/Create<br />http://localhost:50697/Error404/Edit/2063SwastikMSnoreply@blogger.comtag:blogger.com,1999:blog-8980734269859237005.post-61938266793678861172013-03-07T03:27:42.714-08:002013-03-07T03:27:42.714-08:00Hi i tried your code but its giving me a runtime E...Hi i tried your code but its giving me a runtime Error,<br />Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated.<br /><br />do you have any idea why? please helpupilenoreply@blogger.comtag:blogger.com,1999:blog-8980734269859237005.post-19234129567518435072013-03-07T01:17:11.998-08:002013-03-07T01:17:11.998-08:00Thanks alot, very helpfull articleThanks alot, very helpfull articleupilenoreply@blogger.comtag:blogger.com,1999:blog-8980734269859237005.post-9323427226994485512013-02-26T17:33:51.948-08:002013-02-26T17:33:51.948-08:00Excellent article. This is exactly what I was look...Excellent article. This is exactly what I was looking for and very well explained. Much appreciated.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8980734269859237005.post-71699496351768042802012-12-21T14:21:37.222-08:002012-12-21T14:21:37.222-08:00Very useful article. Thank you for writing this u...Very useful article. Thank you for writing this up.Mike Strotherhttps://www.blogger.com/profile/05084307197488315968noreply@blogger.comtag:blogger.com,1999:blog-8980734269859237005.post-69037621116109076992012-09-03T13:07:51.351-07:002012-09-03T13:07:51.351-07:00Hi,
Thanks for writing this post. I learned a lot...Hi,<br /><br />Thanks for writing this post. I learned a lot, however I'm not sure where to place the option 1 code for handling the other type of errors. By the way I checked your zip files. Please can you explain?<br /><br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8980734269859237005.post-90164078523781500732012-08-13T10:41:42.277-07:002012-08-13T10:41:42.277-07:00This gives a 302 on /badpath/ and a 404 on /FailWh...This gives a 302 on /badpath/ and a 404 on /FailWhale/?aspxerrorpath=/badpath/. Is there a way to keep the URL at /badpath/ so search engines get a 404 for /badpath/?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8980734269859237005.post-6985370594039560892012-08-10T01:59:58.138-07:002012-08-10T01:59:58.138-07:00I agree with the Anonymous comment above - surely ...I agree with the Anonymous comment above - surely you are better off defining the different local/remote behaviour in a config file than in code..?Stevehttp://greatrexpectations.comnoreply@blogger.comtag:blogger.com,1999:blog-8980734269859237005.post-83844526543744134052012-08-03T13:45:39.379-07:002012-08-03T13:45:39.379-07:00For custom error setup in the beginning, why not s...For custom error setup in the beginning, why not say:<br /><customErrors mode="RemoteOnly" ...<br /><br />This way, I can still see yellow page in local.Anonymousnoreply@blogger.com