בדיקה מ-POP

Admini

New member
בדיקה מ-POP

כפי שכתבתי פה בעבר.... אני כותב אפליקציה למשיכת דואר משרת POP3. היא עובדת יפה, אבל מחזירה TimeOut כאשר בתיבה יש 4MB ומעלה. זאת, למרות ששרת ה-POP ושרת ה-HTTP הם אותה מכונה. מתברר שהוא לא מסוגל להוריד משרת ה-POP יותר מ-13/14 ק"ב לשניה.... יש לי 3 אפשרויות, ואני שוקל מה לעשות: אפשרות ראשונה: לכתוב רכיב POP נורמלי, עם תמיכה מובנית בעברית וכו'... אפשרות שניה, מסובכת אבל טובה הרבה יותר: לכתוב מהיסוד שרת POP שעובד עם מסד נתונים ובהזדמנות גם עוד פונקציות (פרויקט שאני לא יכול לבצע לבד, לא בגלל חוסר ידע אלא בגלל שזה פשוט פרויקט גדול) אפשרות שלישית: לנסות לקרוא את הקבצים שיוצר שרת ה-POP, ובכך להגביל אותי לשרת POP ספציפי... מה דעתכם ?
 

nattygur

New member
יש מגבלה ב machine.config

המגבילה קבלת קבצים ל 4mb, ניתנת לשינוי:
<configuration> <system.web> <httpRuntime maxRequestLength="4096" /> </system.web> </configuration>​
 

Admini

New member
אני מדבר על קבצים שיורדים מה-POP

למרות שגם לפיתרון שלך אני אזדקק
 

Admini

New member
../images/Emo70.gif FileStraem איטי../images/Emo70.gif

FileStraem עובד לאט בצורה מחרידה על קבצים מקומיים גדולים... 30 שניות לוקח לו לפתוח קובץ של 6 מגה גם כשהוא מוגדר לטעון רק 100 תווים ראשונים זה נורמלי?
Public Function ReadFile(ByVal sFile As String, Optional ByVal iLen As Integer = 0) As String Dim fs As FileStream Dim sFileData As String ' Open the stream and read it back. fs = File.Open(sFile, FileMode.Open, FileAccess.Read) Dim b(1024) As Byte Dim temp As ASCIIEncoding = New ASCIIEncoding() Do While fs.Read(b, 0, iLen) > 0 sFileData += temp.GetString(b) Loop fs.Close() Return sFileData End Function​
כאשר iLen הוא 100....
 

gilad g

New member
שני דברים

א. הקוד הזה לא קורא רק את מאה התווים הראשונים. מה שהוא עושה זה לעבור על כל הקובץ (6 מגה), ולשים 100 תווים כל פעם בתוך המערך. ב. אתה חונק את ה-GC. במקום להשתמש ב-Concatanation (+=), תשתמש ב-StringBuilder (פי כמה יותר יעיל).
 

Admini

New member
בעיה מוזרה

שרת IIS על Win2k AS. עמודי ASP עובדי כרגיל בעוד שמדי כמה שעות עמודי ASPX נתקעים (טעינה בלתי פוסקת) הריגה של ASPNET_WP או ריסטרט ל-IIS פותרת את הבעיה. למה ?
 

Admini

New member
הסתדרתי

הריגה של איזה פרוסס בעייתי שלא קשור ל-IIS.
 

Admini

New member
בעיה מוזרה

Server Error in '/lmm' Application. -------------------------------------------------------------------------------- Object reference not set to an instance of an object. 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.NullReferenceException: Object reference not set to an instance of an object. Source Error: Line 75: Dim mMsgs() As Message Line 76: For Each sFile In dirs Line 77: mMsgs(1).sSubject = ReadFile(sFile, 900) Line 78: iMessage += 1 Line 79: Next​
Message זו מחלקה קטנה שנראית ככה:
Public Class Message Public sSubject, sFrom, sTo, sBCC, sBody As String Public iMimeParts As Integer End Class​
 
למעלה