Author: NewWorldMan | Posted on: 6/9/2008 3:20:36 AM | Views : 311

I'm looking for a way to achieve this:
On dev machine running against local Cassini server display detailed ASP.NET error information.On local web server (IIS) display custom (friendly) error information.For remote client display custom (friendly) error information.I can see that setting customErrors mode="RemoteOnly" satisfies 1 and 3. But I can't see a way to satisy all three. The only thing I can think of is to keep customErrors permanently set at "On" for the deployed app. and then manually switch to "RemoteOnly" or "Off" when developing. The problem with the latter is that I have to remember to edit web.config when checking back in to source control.
It occurs to me however, that I may be able to solve my problem if there is a way of programmatically distinguishing between running against Cassini in the dev environment and running against IIS.
BTW, you might be wondering why I ...

Go to the complete details ...