سؤال

WIF will send our users the Yellow Screen of Death whenever an error occurs. This can be something such as a token replay, or a old token being sent to the server as shown below:

enter image description here

How do I customize the display of this error and also log the instances when it occurs?

هل كانت مفيدة؟

المحلول

I assume you mean the errors that happen during the authentication stage (i.e. outside of your code) rather than errors occurring during normal execution (which you could catch with a try - catch) and then do whatever you want.

One way is to use customErrors in the web.config. Refer here.

In terms of tracing, there is a section in the web.config (system.diagnostics) which you can uncomment. Change "Verbose" to "Error".

Also refer WIF Tracing or the WIF section of How to Enable Verbose Windows Identity Foundation (WIF) Tracing for Claims-Based Authentication

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top