DarenHan's Blog

I am a Dot net asp.net developer working with VS 2005 and SQL 2005 now.

June 2008 - Posts



From the author of codebetter:

" I'm excited to finally release the official, and completely free, Foundations of Programming EBook. This essentially contains all 9 Foundation parts including a conclusion and some typical book fluff (table of content, acknowledgement and so on). A number of spelling errors were corrected, along with some small technical changes and clarifications - largely based on feedback, so thanks for everyone who provided it! Otherwise it's exactly the same as what's been posted here over the past several months. "

Download the free ebook
http://codebetter.com/files/folders/codebetter_downloads/entry179694.aspx

Posted by darenhan | 1 comment(s)
We got a Production issue about this following error:
System.MissingFieldException - Field Not Found: ?.s_webServicesFactoryType

Googling on it does not yield any useful results so we turn to microsoft support staff.

They advise us to

Method 1:
1. Check the ASP.net IIS Tab whether there is same version of asp.net being used for the web app.
2. If the asp.net Tab is missing,

    Check if only one version of ASP.NET is allowed in the web service extensions. If it is, the Tab will not appear since 2 versions are installed but only 1 is allow in the web server extensions.

  Other links to solve the missing tab:
http://weblogs.asp.net/plip/archive/2006/05/25/Where_2700_s-the-ASP.NET-Tab-in-IIS_3F00_-It_2700_s-Missing_2100_-I_2700_ve-installed-.NET-2.0-_2E002E002E00_.aspx

http://dotnet.org.za/ahmeds/archive/2005/04/26/19028.aspx


Method 2: do a NGEN
1. Open a command window,
2. Navigate to the .Net Framework 1.1 directory, which should be %windows%\Microsoft.Net\Framework\v1.1.4322\
3. Run this command (without the quotation marks) “ ngen System.runtime.remoting.dll “
4. After this operation, you can check the GAC assemblies for the result, there should be native version of remoting.dll. To do this you can navigate to %windows%\assembly\ path, and can run this command (without the quotation marks) “ dir /a /s /b System.runtime.remoting.*.* ”

Posted by darenhan | with no comments
I did a benchmark of my project aspx pages that are written in asp.net 1.1 and observe some improvements in viewstate and overall page size.

Before Change of Code,
ReportMapping_Selection.aspx has page size of 39 kb
has viewstate size of 16 kb

After Change of Code,
ReportMapping_Selection.aspx has page size of 33 kb
has viewstate size of 12 kb


Before Change of Code,
AddReportMapping_Selection.aspx has page size of 53 kb
has viewstate size of 43 kb

After Change of Code,
AddReportMapping_Selection.aspx has page size of 17 kb
has viewstate size of 4 kb

I did use a free tool though called ViewStateHelper.

Forumula  - >  Page Size = ViewState + HTML markup

Viewstate can be reduced by using html controls to an extent but it is not a full-proof solution.

Scenario 1:
For example, datagrid in asp.net don't have an equivalent client-side control. Imagine a datagrid with 1,600 rows of data on 1 single page. Yes, I can probably improve the viewstate by disabling the viewstate row by row but however due to the large amount of data, HTML markup remains big.

According to the above forumla, if I have a small viewstate but big HTML markup size, I still  stuck with a big page like 4 megs? That is where pagination comes in. Lol.

Scenario 2:
If I use viewstate to store my datatable on a page, and with each click of a button, it refresh the datatable, it will result in viewstate being different at different points of the day. That is where Caching comes in.

By looking at Scenario 1 and 2, you will notice both are common Viewstate problems but have varying solutions. So there is no hard and fast way to reduce a page size but rather you use the tool you are blessed with to solve a problem at hand depending on Scenarios.


Posted by darenhan | 2 comment(s)
Since when did AOL started radio business? I was skeptical but did a trial on the online player which stream 150+ CBS Radio stations from around the US, including 30+ news, sports and talk stations.

Much better than our local radio stations I will say.

http://player.play.it/player/aolPlayer.html?ur=1&us=1&id=757
Posted by darenhan | with no comments
http://www.sitepoint.com/popup/popup.php?zone=2&popupid=114

as above title.
Posted by darenhan | 4 comment(s)
I saw this being advertised on Channelnewsasia TV. Looks like a J2ME client though..sighed. It can connect to your facebook and friendster sites, push email, mobile IM, rss feeds etc.

http://monet.morange.com/

Posted by darenhan | with no comments
http://www.giveawayoftheday.com/
Posted by darenhan | with no comments