PDA

View Full Version : ایراد در customErrors



chaalesh
یک شنبه 08 اردیبهشت 1387, 00:05 صبح
من سایتم یک دفعه قاطی کرد همش مینوسه که :

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="Off"/> </system.web></configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web></configuration>
در حالی که من دقیقا <customErrors mode="Off"/> رو در وب کانفیگ دارم و تا یک ساعت پیش داشت خوب کار میکرد

raravaice
یک شنبه 08 اردیبهشت 1387, 11:49 صبح
تو برنامت runtime error داری برادر.


تا یک ساعت پیش داشت خوب کار میکردتوی این 1 ساعت ببین چه اعمالی انجام شده خصوصا مواردی که به بانک اطلاعاتی سایتت وابسته هست.
همه چیزو از ابتدا بررسی کن.

موفق باشید

chaalesh
سه شنبه 10 اردیبهشت 1387, 10:52 صبح
چطور میتونم این error رو ببینم ؟

raravaice
سه شنبه 10 اردیبهشت 1387, 11:05 صبح
اگر با Off کردن درست نمیشه باید عینا اطلاعات سمت سرور رو روی local شبیه سازی کنی به همراه دیتابیس.
البته یه چیزه دیگه که من گاها باهاش مواجه شدم تو هاستهای ایرانی ، اینا در بعضی مواقع که سرور رو Restart میکنن تنظیمات شما بر میگرده به حالت پیش فرض سیستم مثلا اگر شما دات نت رو روی 2 تنظیم کرده باشی پیش فرض میاد روی 1 که دچار مشکل میشی ولی توی کنترل پنل همون 2 رو میبینی به ورژنی که متن error بهت میده دقت کن که مشکل از اون نباشه.

مورد دیگه اینکه customError به طور پیش فرض توی web.config به صورت کامنت و در بین
<-- --!> قرار داره شما از بین این علامت درش بیار بعد Off رو اعمال کن البته من یه بار هم خودم اینجوری گیج شدم چون تغییرات رو از توی notepad به web.config موقع upload اعمال کردم و متوجه کامنت بودن این تگ نشدم.

موفق باشید