ASP.NET MVC Custom Error Pages with Magical Unicorn

后端 未结 2 433
一生所求
一生所求 2021-01-18 19:36

my question is regarding Pure.Kromes answer to this post. I tried implementing my pages\' custom error messages using his method, yet there are some problems I can\'t quite

2条回答
  •  借酒劲吻你
    2021-01-18 19:46

    I got it to work. It seems my understanding of the problem was somewhat wrong to begin with.

    In the web.config, I changed the following:

    
      
    
    

    ... and ...

    
          
          
          
          
        
    

    This directly redirects to the views. My understanding was that I had to redirect to the error controller which in turn would redirect to the views, but apparently this was not the case. I'd like to thank you for your comments as they have made me analyze the problem again when I was already about to just ditch the custom error stuff and simply be lazy and display YSOD's. :)

提交回复
热议问题