displaying custom error pages in asp.net mvc 2.0 on production site -
i have developed production site in godaddy server.now want display custom error page if there error occurs in site.i have made following changes in web.config file ,
<customerrors mode="on" defaultredirect="/areas/user/views/shared/error"> <error statuscode="403" redirect="noaccess.htm" /> <error statuscode="404" redirect="/areas/user/views/shared/error" /> </customerrors>
but if error occurs server display default error page 404 page.
now want display customised error page.please tell me entire steps implement in asp.net mvc 2.0.i,e there coding have write in controllers or in global.asax.
thanks in advance,
this line indicates when page not found redirect error.aspx, can create view inside share folder , design desire , change url example, create page
mycustomerrorpage.aspx
inside shared folder, change redirect page to
<error statuscode="404" redirect="/areas/user/views/shared/mycustomerrorpage" />
Comments
Post a Comment