PDA

View Full Version : مبتدی: خطای <customErrors mode="Off"/>



عادل شجاع تنگستانی
شنبه 10 دی 1390, 11:53 صبح
سلام من یه سایت با ASP طراحی کردم ولی وقتی روی هاست میزارمش این خطارو میده
Server Error in '/' Application.

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>خیلی هم تو اینترنت گشتم ولی جوابی پیدا نکردم یکی خواهشا توضیح بده کامل چیکار کنم از ASP کامل سر در نمیارم پروژه پایانیم هم هست

hamid_shrk
شنبه 10 دی 1390, 11:56 صبح
خوب یاید همون کاری رو که میگه بکنید.
تو وب کانفیگ custome error رو mode رو on کنید

EnKamran
شنبه 10 دی 1390, 12:01 عصر
به بزرگ و کوچیک بودن On و Off دقت کن.
این کار باعث مشیشه بفهمی مشکل کارت کجاست. اما بعد از اینکه کامل فهمیدی و عیبش برطرف شد حتما به حالت اول برگردونش و اررورهات رو هم مدیریت کن.

usef.e1364
دوشنبه 08 اسفند 1390, 15:41 عصر
من اين رو هم off كردم، ولي فايده نداشت و مشكل رو بهم نشون نداد.

<customErrors mode="Off">
<authentication mode="Windows"/>
<compilation debug="true">

ديگه چيكار بايد بكنم؟:ناراحت:

fakhravari
دوشنبه 08 اسفند 1390, 15:43 عصر
compilation debug="true"
false کن

dorparasti
دوشنبه 08 اسفند 1390, 20:47 عصر
عامل خطا custom error نیست . متن خطا میگه که خطایی روی داده اما چون customErrors مقدارش Off نیست ( که مانع از نمایش جزئیات خطا میشه ) نمی تونه جزئیات خطا رو نشون بده . بعد از Off کردن custom Erros باید compilation رو هم فعال کنید .


<compilation debug="true">
<customErrors mode="Off" >

usef.e1364
دوشنبه 08 اسفند 1390, 21:32 عصر
خب منم دقیقا همین کارو کردم.توی پست بالا مشخصه.اونی که گفتیدOff و compilation هم true.

dorparasti
دوشنبه 08 اسفند 1390, 21:41 عصر
خوب الان باید خطای اصلی رو بهتون نشون بده . ببینید چیه ؟

p_biparva
سه شنبه 09 اسفند 1390, 11:33 صبح
با سلام
منم این خطا رو داشتم وقتی پروپرتیmode رو در customErrors برابر با off گذاشتم خطامو نشون داده ولی نمیدونم دلیل این خطام چیه.لطفا راهنماییم کنید.ممنون:اشتباه:

Server Error in '/' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

Source Error:

Line 18: validate="false" /> Line 19: </httpHandlers> Line 20: <compilation debug="true" targetFramework ="4.0"> Line 21: <assemblies> Line 22: <add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
Source File: e:\AZARANWEB\hostmaster\darashir\darash.ir\www\web .config Line: 20

Version Information: Microsoft .NET Framework Version:2.0.50727.5420; ASP.NET Version:2.0.50727.5420

fakhravari
سه شنبه 09 اسفند 1390, 13:06 عصر
ایتدا باید ورژن سایت رو ست کرد در کنترل پنل هاست این کار رو میکنند .
هر ورژنی 3.5 - 4

usef.e1364
سه شنبه 09 اسفند 1390, 14:55 عصر
دوستان ممنون. مشكلم حل شد.:لبخندساده: