0

I want to write custom errors and unexpected errors via Global.asax.

In that method I use : var ex = Server.GetLastError(); to obtain the error which ocurred.

However, this code is not hit (or fired) when I set web.config to ErrorMode RemoteOnly. It only works when it's set to Off.

Why is this?

try { var sd = db.GetDetails().Single(); } catch (Exception ex) { //some function here followed by a throw. throw; } 
2

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.