I want to have an error Page if My Aplication cannot connect to Database.
But for now I have sth like this:
Then If I step over I have an error in Layout where I check if IsAuthenticated it also shows an error in
<li>@if (WebSecurity.IsAuthenticated)
{
if (User.IsInRole("admin"))
{@Html.ActionLink("Admin Panel", "Index", "Admin")}
But it only happens if I am logged in.
If I am not logged in then it only shows an error which I showed in Picture, Then if I click step over I get an error page in web browser which is a result I want to have. Q: How to get an error Page if Database is not connected without going to VS10 to code view ?
I also have an error controller and it works for displaying error page if someone types wrong www address.