PDA

View Full Version : مشکل با CustomErrors



mehdi58
سه شنبه 28 آذر 1385, 20:22 عصر
سلام
من در web.config به منظور کنترل خطاها و نمایش صفحه دلخواهم کد زیر رو نوشتم :

<customErrors defaultRedirect=”errorpage.aspx” mode=”RemoteOnly”/>


ضمن اینکه

<compilation …. debug=”false”/>

اما نمی دونم که چرا موقع تست باز هم خطا ها نمایش داده میشه و به صفحه دلخواه من نمی ره ؟(ASP.net 1.X)

البته بگم که این صفحات روی اینترانت و روی کامپیوتر های مختلفی اجرا شده ( هم Server و هم Client) ولی اصلا جواب نمی ده !
ضمن اینکه لینک زیر رو هم خوندم اما ....
http://www.barnamenevis.org/forum/showthread.php?t=13681&highlight=custom+errors

shahab_ksh
سه شنبه 28 آذر 1385, 21:21 عصر
دیباگ رو برابر True قرار بدین نه False

mehdi58
سه شنبه 28 آذر 1385, 22:23 عصر
این کار رو هم کردم اما جواب نداده !!!!!!!!!!!

reza_rad
چهارشنبه 29 آذر 1385, 07:11 صبح
The mode attribute can be one of the following:

On – error details are not shown to anybody, even local users. If you specified a custom error page it will be always used.
Off – everyone will see error details, both local and remote users. If you specified a custom error page it will NOT be used.
RemoteOnly – local users will see detailed error pages with a stack trace and compilation details, while remote users with be presented with a concise page notifying them that an error occurred. If a custom error page is available, it will be shown to the remote users only.



این لینک هم فکر کنم بدردت بخوره:
http://samples.gotdotnet.com/quickstart/aspplus/doc/handlingerrs.aspx

mehdi58
چهارشنبه 29 آذر 1385, 20:45 عصر
مشکل رو پیدا کردم .
خیلی جالبه مشکل از اسم صفحه خطا است !!!
من به جای کد زیر :

<customErrors defaultRedirect=”errorpage.aspx”mode=RemoteOnl y>

نوشتم

<customErrors defaultRedirect=”Messagepage.aspx”mode=RemoteO nly>

و مشکل حل شد .