Hi,The WebClient object in .NET doesn't expose the request TimeOut property.In case you decided to use this object it is better to inherit from it and expose the TimeOut property.
Example:
public
class SearchWebClient : WebClient
{
public SearchWebClient()
{
Timeout = 2000;
}
public SearchWebClient(int timeout)
{
Timeout = timeout;
}
/// <summary>
/// Request timeout in milliseconds
/// </summary>public int Timeout { get; set; }protected override WebRequest GetWebRequest(Uri address)
{
WebRequest result = base.GetWebRequest(address);if (result != null)
{
result.Timeout = Timeout;
}
return result;
}
}
Hi,
I would like to share a problem I found when working with the class:
CultureInfo
.GetCultures on ASP.NET application that has high traffic.
It look like the implementation of CultureInfo.GetCultures does not appropriate written to ASP.NET or there is a bug in code that cause to a High CPU peeks (80%-100% CPU peeks).
If you need to use this code on your ASP.NET application I would recommend to wrap the code inside a static object and not use the .NET CultureInfo.GetCultures.
Rotem
Hi,
I read nice article with cool solution for Minifying HTML With ASP.NET MVC And Razor.
You can read more here.
You can start use it in you MVC projects, for 25% smaller HTML pages.
Hi,
firefox has a cache behavior that uses in-memory caching for entire Web pages, including their JavaScript states, for a single browser session.
This can cause to unexpected javascript and HTML behavior when pressing on the browser back button.
For example:
-
PageLoad will not fired
-
javascript code will not executed
-
DHTML that was created by JavaScript will be shown
and more...
In case firefox cache is something you want to prevent, Below are some common programmatic reasons that a page will not be cached by firefox:
the page uses an unload or beforeunload handler
the page sets "cache-control: no-store"
the page sets "cache-control: no-cache" and the site is HTTPS.
the page is not completely loaded when the user navigates away from it
the top-level page contains frames that are not cacheable
the page is in a frame and the user loads a new page within that frame (in this case, when the user navigates away from the page, the content that was last loaded into the frames is what is cached)
Code example for prevent page caching on firefox:
window.addEventListener('pageshow', PageShowHandler, false);
window.addEventListener('unload', UnloadHandler, false);
function PageShowHandler() {
window.addEventListener('unload', UnloadHandler, false);
}
function UnloadHandler() {
window.removeEventListener('unload', UnloadHandler, false);
}
You can read more here.
Rotem
Hi,
If you are ASP.NET MVC Razor developer and you are looking for a nice solution to Combine, Compress and Manage your CSS and JavaScript files,
Well SquishIt can fit your needs.
Razor Code Sample:
@MvcHtmlString.Create(
SquishIt.Framework.Bundle.Css()
.Add("~/media/css/reset.css")
.Add("~/media/css/style.less")
.Add("~/media/css/handheld.css")
.Render("~/media/css/combined_#.css"))
@MvcHtmlString.Create(
SquishIt.Framework.Bundle.JavaScript()
.Add("~/media/js/geo.js")
.Add("~/media/js/jquery-1.4.4.js")
.Add("~/media/js/jquery.unobtrusive-ajax.js")
.Add("~/media/js/jquery.validate.js")
.Add("~/media/js/jquery.validate.unobtrusive.js")
.Render("~/media/js/combined_#.js"))
Output looks like this:
<link rel="stylesheet" type="text/css" href="/media/css/combined_312454.css" />
<script type="text/javascript" href="/media/js/combined_312454.js"></script>
You can read more here.
We are using SquishIt on the company I work and it look like a really nice and useful solution.
I hope you will find it useful on your company or project also :-)
Yours,
Rotem
היי,
היום העלינו את האתר של
ארטיזון לאוויר. האתר נכתב מחדש והועבר מטכנולוגיה של SILVERLIGHT ל-ASP.NET MVC 3.0
אני חייב לציין שמיקרוסופט עשו עבודה והחלטה מעולה לצאת עם ה-MVC וכתיבת האתר בטכנולוגיה זו עשתה לנו חיים קלים בהפרדה לשכבות, שליטה על קוד ה-HTML, אין שמירה של VIEWSTATE ושאר ירקות רקובים.
אומנם האתר מיועד לקנייה רק לתושבי דאלאס ארה"ב אבל אשמח אם תכנסו ותגידו מה דעתכם על האתר ובכלל תראו אתר LIVE שנכתב כולו ב-ASP.NET MVC 3.0
בנוסף אנחנו עדיין צחפשים אנשי .NET חזקים שיצטרפו לחברה.
ביי רותם
Hi All,
I'v notice a strange behavior when working with ASP.NET MVC 3.0 jquery unobtrusive ajax on forms HTML element on IE (internet explorer) 8.
Razor code example for generating ajax call on a form element using unobtrusive ajax: @using (Ajax.BeginForm("MyAction", "MyController", new AjaxOptions { HttpMethod = "POST" })){
Sometimes (not always) i'm getting a javascript error with the message "Falied" that come from the javascript file jquery.unobtrusive-ajax.js:
The line is:
$(
"form[data-ajax=true] :submit").live("click", function (evt) {
Well the only solution I can find is to modify jquery.unobtrusive-ajax.js code with the following code:
$("form[data-ajax=true]").find("submit").live("click", function (evt) {
This fix the javascript error and the ajax call works always on IE 8.
Until now I can explain why the error happened only on IE 8 and was not reproduce permanently on each page refresh.
If it happened to you, I would be happy to know if you find other solution to this strange problem.
Rotem
Hi,
I decided to share a nice diagram that can help you decide which WCF binding you should choose for your application or SOA architecture.
(If you can see the entire image you can download it using right click and "Save Picture As...")
היי,
בארטיזון החברה שאני עובד עשינו LIP DUB לשיר של האחים בלוז.
כנסו תראו כמה כיף לעבוד פה ואני מזכיר לכם שוב שעדיין מחפשים פה אנשי דוט נט ו-WEB.
ראש צוות דוט נט, ומפתחי דוט נט WEB.
אז שלחו לי קורות חיים:
חברת ארטיזון מחפשת אנשי דוט נט מנוסים וחזקים:
1. מומחה HTML, CSS, JAVASCRIPT להובלת כול פיתוחי החברה בתחום ה-UI.
2. ראש צוות דוט-נט תותח ומנוסה עם ידע וניסיון מעמיק באפליקציות WEB מרובות משתמשים.
3. תותחי דוט-נט שמחפשים לעבוד בטכנולוגיות החדשות ביותר.
בארטיזון עובדים בדוט-נט 4.0 עם TFS וכול הטכנולוגיות החדשות כולל סילוורלייט ותכנון לעבודה עם AZURE.
מי שנראה לו מעניין או יש לו חברים שמחפשים מוזמן לשלוח לי קורות חיים אל:
רותם
שלום לכולם,
יש לי שאלה לכול מומחי ה-SQL ו-DATABASE והשאלה היא:
רציתי לדעת מה הגישה המקובלת והמומלצת יותר היום לעבודה עם DATABASE שאמור להיות עמוס מבחינת גישות SQL ונתונים (נגיד DB כמו של פייסבוק או אמזון).
1. האם לעבוד ב-DB שונים לכול שירות? כלומר: DB למשתמשים, DB למוצרים, DB להזמנות וכו'... ככה אין כמעט JOIN אבל יש לחבר את התוצאות מהשירותים השונים במקרה שיש צורך ב-JOIN.
2. האם בכול זאת עדיף לעבוד עם DB אחד לבצע JOIN שיכולים להיות מורכבים ורק להפריד את הנתונים ל-DB שונים לפי לוגיקה מסויימת
3. האם יש גישה אחרת מומלצת
ברור לי כמובן שיש לעבוד עם מנגנוני CACHE כדי למנוע גישות ל-DB כמה שאפשר אבל עדיין אי אפשר להתחמק משמירת ושליפת הנתונים מה-DB. מה עושים אתרים גדולים היום כדי לפתור בעיות ביצועים ב-DB גדולים ועמוסים.
תודה רותם
Hi All,
Well after month of silent (7 I think) I got back with a new post on Jquery TreeView.
First you can download the plugin from here. I must say this plugin is amazing very fast even with large trees.
The problem of Jquery TreeView is the lack of RTL (Right To Left) support for languages like: Hebrew, Arabic etc...
If you got the same problem I have and you need Jquery TreeView RTL version you can download it from my blog right here.
To the AJAX fans I also add a nice cool ajax application example you can download it from here.
Hope it helps
Cheers
Rotem
Hi,
Have you ever bump into messeges like:
-
Cannot delete file: Access is denied
-
There has been a sharing violation.
-
The source or destination file may be in use.
-
The file is in use by another program or user.
-
Make sure the disk is not full or write-protected and that the file is not currently in use.
Well when such cases happeneds you really want to know which application lock your Files or Folders.
The Unlocker is the solution for you.
Just look for "unlocker" in Google or Bing or you can download it from here.
Bye Rotem
Hi All,
If you want to test and reproduce multi thread applications bugs there is a new tool from Microsft called: CHESS.
CHESS is a tool for finding and reproducing Heisenbugs in concurrent programs. CHESS repeatedly runs a concurrent test ensuring that every run takes a different interleaving. If an interleaving results in an error, CHESS can reproduce the interleaving for improved debugging. CHESS is available for both managed and native programs.
Great movie that explain CHESS: An Automated Concurrency Testing Tool
You must adopt this tool for your future multi threaded (concurrent programs) programs.
More information on Threading in C# can be found on Joseph Albahari great article here.
ימי המומחים מה שידוע גם כ-Expert Days יוצא לדרך ב-22 לנובמבר.
אז בתור אחד שהיה בכנס בשנה שעברה אני ממליץ בחום ללכת לכנס למסלול שמעניין אתכם.
השנה לפי מה שראיתי
באתר הכנס שמו דגש על הטכנולוגיות החדשות שאמורות לצאת בשנה הקרובה, לכן אני חושב שכדאי ללכת ולהתעדכן בטכנולוגיות החדשות שאמורות לצאת בשנה הקרובה.
מסלולים
מסלול המה חדש בויז'ואל סטודיו 2010 ודוט-נט 4.0 סוקר את כל
החידושים שיהיו בשנת 2010. המסלול מנוהל ע"י ורדי אייל.
מסלול הווב מכסה את כל הנושאים החדשים בתחום הווב שיהיו בויז'ואל סטודיו 2010.
המסלול מנוהל ע"י לנגלייבן ליאון מחברת SRL.
יש הרבה שיטות להתחבר למסד נתונים, אך מהי הדרך הטובה ביותר לארגון?
במסלול זה תיחשפו לכל הטכנולוגיות החדשות בתחום. המסלול מנוהל ע"י ורדי אייל.
WPF או Silverlight זאת השאלה? מסלול זה מביא את כל הטכנולוגיות החדשות
לפיתוח ממשק משתמש. המסלול מנוהל ע"י קוגמן גל.
ויזואל סטודיו 2010 מביא איתו מהפכה בתחום התקשורת, ע"י שיפור משמעותי של
שתי טכנולוגיות קיימות WCF ו-WF והשילוב בניהם. המסלול מנוהל ע"י ורדי אייל.
מסלול SQL Server 2008 מכסה מקצה לקצה את כל התחומים של מסד הנתונים.
המסלול מנוהל ע"י גלנצר גיא מחברת Madeira Information Technologies.
טכנולוגית ה- CRM של מיקרוסופט נכנסה השנה למספר רב של ארגונים, כמערכת CRM וככלי
פיתוח ארגוני. המסלול מנוהל ע"י ארדיטי יניב מחברת E4D Solution.
תהנו רותם
More Posts
Next page »