PDA

View Full Version : Error Errormode=off



gh_fereydonpoor
جمعه 07 اسفند 1383, 07:17 صبح
سلام به همه دوستان
من خیلی وقتها که با سرورهای مختلف کار می کنم اگر خطایی در صفحات من اتفاق افتد این پیغام رو مشاهده می کنم در صورتی که در Web.config مقدار آن را برابر On یا ... قرار می دهم ولی بازهم می گوید Off است .من در یک سرور اختصاصی چگونه می توانم این مشکل رو حل کنم
مرسی
یا علی

Behrouz_Rad
جمعه 07 اسفند 1383, 22:26 عصر
Two configuration settings affect how error information is displayed:

Custom errors mode— This setting enables or disables custom errors. When custom errors mode is enabled, errors on a page are hidden. This setting has three possible values: On, Off, and RemoteOnly.

Debug mode— When debug mode is enabled, additional information for debugging runtime errors is displayed.

You can use custom errors to hide errors from the users of your Web site. When the custom errors mode is assigned the value On, detailed error information is hidden. When the custom errors mode is set to the value Off, all the available error information is displayed. Finally, if you assign the value remoteOnly to custom errors, errors are hidden when requested with a browser on a remote machine, but the errors are displayed when requested with a browser located on the same machine as the Web server.

If you need to view detailed error information, you need to disable custom errors or set this mode to the value RemoteOnly. You can configure the custom errors mode in either the Machine.Config file or a Web.Config file located within a particular application.

When the custom errors mode is set to the value Off, detailed error information is always displayed, even on remote computers. (Always displaying this information can be a security risk.) You might want to disable custom errors while developing an ASP.NET application and before placing the site into production.

The second configuration setting, debug mode, controls whether pages are compiled in debug mode. When pages are compiled in this mode, additional debugging information is included with the compiled code. This mode displays more detailed error information when a runtime error occurs.