ورود

View Full Version : سوال: نمایش خطا با افزایش یافتن زمان



shabih
شنبه 17 مهر 1389, 19:44 عصر
سلام
من برای ارسال اطلاعات از طریق ایمیل صفحه ای رو ایجاد کردم که بعد از پر کردن اطلاعات فرم , به راحتی اطلاعات به ایمیل فرستاده میشه اما وقتی زمان پر کردن اطلاعات فرم طولانی بشه پیغام خطای
Server Error in '/' Application.
نشان داده میشه
با انجام
<customErrorsmode="Off"/>

این ارورو میده


-----------------------------


Server Error in '/' Application.

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#‎" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

-------------------
اگر امکان داره در این زمینه منو راهنایی کنید.

aminghaderi
شنبه 17 مهر 1389, 21:56 عصر
Session id صفحه شما منقضی می شود؟!
در وبکانفیگ می شه این زمان رو تغییر داد.
راهش رو متاسفانه فراموش کردم ، ولی یه سرچ در گوگل می تونه راه کشا باشه.

موفق باشید.

PhoenixNet
شنبه 17 مهر 1389, 23:23 عصر
صفحات ASP .NET هنگام ارسال با یک کلید رمز نگاری و به گیرنده ارسال می شوند.این کلید اتوماتیک ایجاد میشه و در صورت طولانی شدن ارسال چون کلید عوض می شود سرور دیگر نمی تواند رمز گشایی انجام دهد.
یک راه این است که یک کلید ثابت برای وب سایت تعریف کنیم.این کار در web.Config انجام می شود.



<system.web>
<machineKey validationKey="E4E886D24A46A718D16DE2E603379EB6481CF59B4FF419D899 321F87B5C774E4139A8A7B80B6EF4B071FEF8DE2E4F10D471B 14DC5989E874A711AACF7F4608B5" decryptionKey="85E486DFDBE90EBC7F632603CEA9550D509E317632155407" validation="SHA1" />
</system.web>


در این سایت میتونید کلید اختصاصی برای خودتون ایجاد کنید و با کلید بالا جایگزین کنید.


http://www.developerfusion.com/tools/generatemachinekey/


این هم درباره این کار


http://msdn.microsoft.com/en-us/library/ff649308.aspx

shabih
یک شنبه 18 مهر 1389, 01:17 صبح
ممنون از اینکه جواب دادید
با تنظیم machineKey باز همون ارورو می داد شاید به بدلیل این باشه که من با ASP.NET 3.5 این برنامه رو نوشتم که شما در مورد asp.2 این مطلب رو گفتید.
اما با تنیظم
<pages enableViewStateMac="false" >
به جای ارور قبلی ارور


System.Net.Mail.SmtpException: Service not available, closing transmission channel. The server response was: 4.0.0 Tarpitting active for [xxx.xxx.xxx.xx] at System.Net.Mail.SmtpConnection.GetConnection(Strin g host, Int32 port) at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpClient.GetConnection() at System.Net.Mail.SmtpClient.Send(MailMessage message) at index_6.btnErsal_Click1(Object sender, EventArgs e

نشون داده میشه و دیگه ایمیل ها ارسال نمی شن.

shabih
یک شنبه 18 مهر 1389, 15:11 عصر
آیا روشی وجود داره که شیئ که برای ارسال ایمیل ساختیم بعد از ارسال ایمیل از بین برد و یا session ایجاد شده رو از بین برد؟

PhoenixNet
یک شنبه 18 مهر 1389, 15:29 عصر
MailMessage mail = new MailMessage();
mail.Dispose();

shabih
دوشنبه 19 مهر 1389, 02:11 صبح
کسی میدونه دلیل این خطا در هنگام ارسال ایمیل چی میتونه باشه



Server Error in '/' Application.



Service not available, closing transmission channel. The server response was: 4.0.0 Tarpitting active for [xxx.xxx.xxx.xx]

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.Mail.SmtpException: Service not available, closing transmission channel. The server response was: 4.0.0 Tarpitting active for [xxx.xxx.xxx.xx]

amirjalili
دوشنبه 19 مهر 1389, 09:15 صبح
مراجعه کنید به :
مرجع کامل خطا ها و باگ ها (http://barnamenevis.org/forum/showthread.php?p=1123648#post1123648)

shabih
جمعه 23 مهر 1389, 22:45 عصر
برای کسانی که با این خطا مواجه میشن



Server Error in '/' Application.




Service not available, closing transmission channel. The server response was: 4.0.0 Tarpitting active for [xxx.xxx.xxx.xx]


Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.


Exception Details: System.Net.Mail.SmtpException: Service not available, closing transmission channel. The server response was: 4.0.0 Tarpitting active for [xxx.xxx.xxx.xx


باید گفت که در هاست هایی که از قابلیت آنتی اسپم برخوردار هستند در صورت زیاد بودن تعداد ایمیل ها کانال ارسال پیام بسته می شود و فقط تعداد مشخصی ایمیل ارسال خواهد شد که در صورت نیاز می توان از پشتیبانی هاست درخواست کرد که قابلیت آنتی اسپم را غیر فعال کنند.