Rexiology::Work

Microsoft, Information Technologies...

Community

News

  • From Taiwan, living and working at Tokyo, Japan.




Recent Posts

Tags

Microsoft Sites

Other Sites

Blog pools

Bloggers

Archives

Site Info



Locations of visitors to this page




Logos & Chicklets


GeoURL


Rex's Certifications
Rex's Certifications


Creative Commons授權條款
本 著作 係採用
Creative Commons 授權條款



December 2005 - Posts

Mail server listed in SORBS database may be blocked by other mail server...

 

It's a common scenario in Taiwan that people got ADSL from ISP with 8 floating IPs but contains 1 IP that can be set to fixed ip. For people using Chunghwa Telecom (Hinet) , there was an online page to set one of your floating ip into a fixed ip.

The IP set to fixed one by above setting seems to become a fixed ip, but generally in the mapping of the internet (which is defined by ISP) this is still considered as dynamic assigned IPs (a long-term leased dynamic ip). therefore if using this IP as static ip for binding your DNS server and Mail server, it will still be caught and listed in some spam fighting filtering database, such as SORBS .

My situation was that one of the mail server I managed was not able to send mail to Microsoft.com , after checking the mail log, found that it was blocked by Microsoft mail server due to my mail server been listed in SORBS database as dynamic assigned ip address. mail log file like this:

Thu 2005-12-29 16:53:04: <-- 550 5.7.1 Your IP address xxx.xxx.xxx.xxx appears to be dynamically assigned.  For more information see http://www.sorbs.net/lookup.shtml?xxx.xxx.xxx.xxx . If you have visited the SORBS site and still have issues, please email [[admin email of MS]].

after checking SORBS database for this IP, which was like this:

Netblock: xxx.xxx.xxx.xxx/xx (xxx.xxx.xxx.xxx-xxx.xxx.xxx.xxx)
Record Created: Thu Dec 1 10:53:56 2005 GMT
Record Updated: Thu Dec 1 10:53:56 2005 GMT
Additional Information: Dynamic/Generic IP/rDNS address, use your ISPs mail server or get rDNS set to indicate static assignment.
Currently active and flagged to be published in DNS
If you wish to request a delisting please do so through the Support System.

which stated that this ip address was still a dynamic ip address.

It would be a good practice to assign a specific dynamic ip with a rDNS PTR record with domain name at ISP to indicate that the ip is a fix ip. otherwise there is another way to get specific IP excluded in SORBS database, which is stated in the dynamic ip faq:


We also operate a self-help exclusion interface that allows the owner of a system to quickly exclude a single IP address (or, in some cases, multiple IP addresses) from the DUHL. For this to be possible, the following criteria need to be met:

  • The MX record of a domain needs to contain a host name that maps to the IP address involved. The Time to Live of the MX record needs to be at least 43200 seconds.
  • The A record for the host name needs to have a TTL of at least 43200 seconds.
  • The reverse DNS PTR record for the IP address involved needs to map back to the name given in the MX record, and to have a TTL of at least 43200 seconds.
  • If there are multiple MX entries, these rules apply to them all.

When all these conditions are met, please go to https://www.dnsbl.au.sorbs.net/scgi-bin/dulexclusions to request quick exclusion for your mail server.


just found that normally windows dns server set the default TTL time to 1 hour, must set to 1 day to fit the requirement, and waiting for the dns propagation.

now more and more mail servers are using those public spam-defending database to check spam mails, thus it's necessary to check your own mail server to see if you are listed in it in order to avoid some mail problems.

Technorati Tags: email , smtp , sorbs

 

FreeTextBox 3.1.1 in a showModalDialog window...

 

Just updated to version 3.1.1 of FreeTextBox to my working project. had some problems of switching back using external files of button images and javascripts, also noticed that according to the readme file stated (inside the download zip file):

External Files - Before FreeTextBox 3.0, all images, javascript and xml were stored as external files. By default, FreeTextBox looks in
   /aspnet_client/FreeTextBox/ for these files. If you want to store the files in a different location, you need:
  
   - Tell FreeTextBox which kind of files to look for external resources: JavaScriptLocation=ExternalFile, ToolbarImages=ExternalFile, ButtonImagesLocation=ExternalFile - Set the SupportFolder property of your FreeTextBox instance to the directory where you copied the files. For example, if your website is stored at www.mysite.com/FreeTextBoxFiles/, you should set SupportFolder="/FreeTextBoxFiles/".

   <FTB:FreeTextBox id="FreeTextBox1" SupportFolder="~/myfolder/FreeTextBox"  JavaScriptLocation="ExternalFile"
 ToolbarImages="ExternalFile ButtonImagesLocation="ExternalFile" runat="server" />

But! after following the instructions, found that the new dll no longer had "ButtonImagesLocation" property!

Also noticed that when opening a showModalDialog window via IE browser, the context menu will not function anymore. a search to Google found that this seems to be a bug of IE browser and there was someone trying to fix this up by providing self-made context menu, which is not what I need therefore will just put a SelectAll button provided by FreeTextBox to work around this problem for now. there was also another post about this at FreeTextBox Forum (my team member Chris found it!), as I couldn't get external file working, not able to try out (although Chris said that it's already fixed up in the new version javascript). Got too many code left to finish and no time to worry about this small issue!

Extremely busy!!! Orz...

Technorati Tags: freetextbox , asp.net , programming

 

Merry Christmas 2005...

 

Merry Xmas...

I think the coming year will be an exciting year for I.T world!

Merry Christmas and Happy New Year...

 

Posted: 2005/12/23 14:52 by rextangtw | with no comments
Filed under:
NHibernate Tips - composite-id behaviors different after 1.0

 

Just encountered this problem. in previous projects when using a composite-id tag to map a table with composite keys, it's just as simple as to write the mapping with key-property tag for the keys in table. after starting using 1.0 release, it's now different. there will be error message said:

composite-id class must override Equals()

A search to Google got some information about this.

if one just ignores composite primary keys in the table and mapping one of the composite keys in the mapping file as primary key, the returning objects after query will be missing data with the same primary key specified in mapping file and only return one of them, means it will group the data with the primary key specified in mapping file and return only one row.

Seems now if one is going to map a composite-id , the composite-id keys must self-form to a component that implements Serializable, Equals(), and HashCode() to self-identify itself as a key. as showing in articles here , here , and here .

Sounds like not very convenient to map a composite-primary-keys-table to object now, even just for retriving data out of database. to fast workaround this. just came out a quick way to avoid using a composite-id mapping.

Using a view to form the primary key field which containing the string of those composite primary keys with seperator. for example, if the composite primary keys are field1 and field2 , just create a view with all the fields of original table plus a field, namely like "PKey", which contains concat of field1 + "_" + field2 , that can uniquely identify a row in the view, just like what a composite primary keys did. for a quick mapping of how to write sql in different database server to concat string of different fields, check out this article.

by using this quick workaround, the mapping file back to the simple form, just have a id tag with the PKey field as primary key, and the objects back from HQL query go normal just as expected.

This quick workaround should only be ok for doing functions that just retrive data out from a data store to map to the domain objects. this should not be a good way for mapping data that need writing data back to the data store. be cautious about this!

Technorati Tags: hibernate , nhibernate , orm , database , programming

 

Hanselman: Xbox 360 as Media Hub

 

[via Scott Hanselman]

After read Scott's comprehensive review of XBox 360 , I think I'll also get one when it's available for sale at Taiwan!!

Technorati Tags: microsoft , xbox 

 

New AOL Suite beta build...

 

As a long time being an AOL member, It's nice to try out their new beta AOL Suite build, just announced 2 days ago.

Click to enlarge the desktop image...

As seeing on the screenshot, seems AOL is giving up using MDI windows and now every window belongs to desktop.

As Google got their own Sidebar, Yahoo! got their own Widget Engine, and Microsoft is planning their own Sidebar in Vista, AOL to acts as the biggest online service provider in USA also now got their own NavBar (seems everyone all wants to grab a corner on the desktop...), although NavBar only got its own apps (Mail, AIM, Pictures, AOL Explorer, etc) inside, seems no extensibilities for developers (well, AOL is focused on normal users...)

Am always LOVE AOL Radio (that's the major reason I use AOL service), nice streaming, nice sound quality, as usual!

noticed now AOL got their own browser called AOL Explorer, which is as usual, build upon Microsoft Internet Explorer.

Click to enlarge 

It acts like a wrapper to original IE window, and provides auto authentication to AOL member service (if you specified auto login). also noticed that as IE got tabbed windows already, AOL Explorer built on top of the original tabbing capability furthermore provides a small window of a small screenshot of the tab content that mouse hover across, given user a quick preview of what's on the window. although this might be normal to some other fancy browsers (at least not current IE or FireFox), or on a Apple Mac, that's really a good function to have in a nice browser design.

RSS Feed support also provided on AOL Explorer, just like what FireFox and next version of IE (IE7?) supported, now the browser noticed if current page got a feed meta data inside and notify you to see if you want to subscribe the feed or not. nice!

AOL Mail now provides, like what it said in the app window, "Unlimited storage" to AOL members. well, no matter it's a truth or just a marketing term, it distinguished itself to those major online mail providers like Google (2GB+ for free), Yahoo! (2GB for paid user), Hotmail (2GB for paid user).

Well, beside those, comprehensive content is just a must for the success of AOL service...

Seems every major internet player is trying so hard to gain users, and it should be going more interesting at year 2006, Let's see!

Technorati Tags: aol , browser , service

 

Sorting Collection using IComparer

 

Just a quick pickup if you forgot how to use a IComparer to sort collections like ArrayList with objects inside using properties inside objects.

Here is a nice / quick / clear example for this.

Collectiona and Object Ordering by Chandra Kant Upadhyay, 2002/06/03

Abstracts: .Net SDK provides a number of collection classes in the System.Collections namespace. We use these collection classes to store objects inside them and perform some operation on them later on as per application logic. Many times we need to re-order objects stored inside these collection. Most collection classes provide a method called Sort() to re-order their elements. The objective of this article is to use Sort() method to order elements stored in a collection class in a generic fashion.

Technorati Tags: c# , asp.net , programming

 

Posted: 2005/12/14 14:00 by rextangtw | with no comments
Filed under: ,
Yahoo! Widget Engine 3.0 ...

 

Just got an upgrade notice from Yahoo! Widget to upgrade to a 3.0 version. as I've already had a previous version installed.

Yahoo! Widget Engine 3.0

After installation seems nothing paticular happened, all the old widgets running well except now it will tell you that most of the old widgets are not signed widgets from Yahoo! or other company. also it said there were about 15 new Yahoo! widgets available for use right the way.

Technorati Tags: yahoo , widget , konfabulator 

 

Using right Chinese weekday string on ASP.NET Calender Control

 

This happened while modifying CommunityServer source code for this blog site (also happened on all the asp.net applications using calender control). because of the host operating system is Traditional Chinese, this happened often while using a standard ASP.NET Calender Control for the blog calender. the weekday string will be displayed using locale settings of the OS. thus normally the weekday string in first letter would like "S,M,T,W,T,F,S" in English OS, when it comes to a Chinese OS, it will become "星,星,星,星,星,星,星" in the locale. (this should be ok in Japanese locale since the first char represents the weekday like "日,月,火,水,木,金,土").

To solve this, a search to Google found the article here and here and here, just temporarily set a locale and modify the AbbreviatedDayNames array to any string you like, while the layout of the calender control begins. noticed that in order not to change the whole application locale permanently, it should be a proper way to just chage it while the calender control layout.

To be specifically, this modification happened at \src\controls\utility\UnStyledCalender.cs file in CommunityServer source code.

(this source code display is using CSAH )

\src\controls\utility\UnStyledCalender.cs, after modification.

   14 namespace CommunityServer.Controls

   15 {

   16     /// <summary>

   17     /// The UnStyledCalendar control removes all of the style output by the default Calendar control.

   18     /// </summary>

   19     public class UnStyledCalendar : Calendar

   20     {

   21         /// <summary>

   22         /// Overrides the default HtmlTextWriter for a one which does not emit style attributes

   23         /// </summary>

   24         /// <param name="writer"></param>

   25         protected override void Render(HtmlTextWriter writer)

   26         {

   27             base.Render (new NonStyleWriter( writer) );

   28         }

   29 

   30         // #Rex Tang# Added 2005/11/20

   31         // fixed the problem if Culture is Chinese cause the FirstLetter property to display wrong weekday names

   32 

   33         protected System.Globalization.CultureInfo originalculture;

   34 

   35         protected override void OnLoad(EventArgs e)

   36         {

   37             base.OnLoad (e);

   38 

   39             // preserve the original culture.

   40             originalculture = System.Threading.Thread.CurrentThread.CurrentCulture;

   41 

   42             // change the culture info for calender control

   43 

   44             if (originalculture.Name == "zh-TW")

   45             {

   46                 string[] dayNames = {"日", "一", "二", "三", "四", "五", "六"};

   47                   System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo("zh-TW");

   48                   culture.DateTimeFormat.AbbreviatedDayNames = dayNames;

   49                   System.Threading.Thread.CurrentThread.CurrentCulture = culture;

   50             }

   51 

   52         }

   53 

   54         protected override void OnUnload(EventArgs e)

   55         {

   56             base.OnUnload (e);

   57 

   58             // restore back the culture.

   59             System.Threading.Thread.CurrentThread.CurrentCulture = originalculture;

   60 

   61         }

   62 

   63         // Rex Added end...

   64 

This should solve the problem that calender control displays wrong letters while layout itself in a locale other than English.

Technorati Tags: communityserver , asp.net , calender , programming

 

C# Source site...

 

[via Will Asrari]

A nice open-souce projects index that's all written in C#, some useful open-source projects are there, nice to dig out something for working.

C# Source site.

Technorati Tags: c# , asp.net , programming

 

Posted: 2005/12/12 13:04 by rextangtw | with no comments
Filed under: ,
Article: Introducing Custom Entity Classes...

 

This is sort of old article published March this year at ASP.NET developer center, but it is worth a read if you are interesting in domain object design and the mapping to rational data object.

Karl Seguin started from the very begining that talks about the problems ADO / ADO.NET faces on using them as parameter passing medium, later introduces a proper approach to make a better domain object model, also provide a concept of mapping to rational data model. another worth of this article is that in the last of it there are lots of useful links that's also worth to have a read, also covers the necessity of code generation and O/R mapping in this kind of application design.

On the Way to Mastering ASP.NET : Introducing Custom Entity Classes - Karl Seguin, March 2005

Technorati Tags: orm , asp.net , programming

 

ASP.NET 2.0 APP_DATA sql files permission problems...

 

Just helping debugging some ASP.NET 2.0 project tonight, not bad an experience to the new .NET 2.0 world.

We've encountered a problem of letting the project running under IIS. the error string includes something like this:

Database 'D:\WEBSITES\BENDIK\APP_DATA\ASPNETD.MDF' cannot be upgraded
because it is read-only or has read-only files. Make the database or files
writeable, and rerun recovery.
An attempt to attach an auto-named database for file
d:\customers\bendik\App_Data\aspnetdb.mdf failed. A database with the same
name exists, or specified file cannot be opened, or it is located on UNC
share.

By refering to some posts via a Google search, found that the problem should be file access permission. after granting "Network Service" to APP_DATA folder (and files inside), this error was solved. then next error occured like this:

Procedure or Function 'aspnet_Profile_GetProperties' expects parameter '@TimeZoneAdjustment', which was not supplied.

another Google Search found some posts, and according to this post said, the membership database schema seems changed between beta 2 and the RTM. to solve this, it is needed to delete (backup) the original database and let asp.net 2.0 generate a new one by using asp.net configuration tool.

So, the database is created back and the schema is right now. but another error occurs (chain reaction!? Orz) :

[SqlException (0x80131904): Cannot open user default database. Login failed.

This project should be using membership features and there should be permission problems on SQL 2005 Express releated to this issue. The account related to this error message is "Network Service" account. so the first instinct is trying to add this account to sql express to let it pass the login. and now got the new problem, where to add? there is no GUI for SQL 2005 Express. another Google search leaded me to SQL 2005 Express page, and there was a SQL Server Management Studio Express GUI that's just the GUI of SQL Server 2005, but for express edition to use. so I just downloaded and installed it. but unfortunately found no file based database via the GUI. some posts related to this issues here and here and here, and also including the use of SSEUtil (SQL Server Express Utility), but still not clearly explained and solved this problem.

Later found that asp.net is using the account defined in it's running application pool to do the impersonation to connect the database. as for debugging or demo purpose, I'll just change to another account like a "Local Machine" in the ASP.NET 2.0 application pool trying to avoid this problem, and it worked.

now pages are able to display but since there were not fully configured on membership database, some pages still got error messages. that should be another story and should be easily solved later.

If the project is not running on IIS, instead by using VS.NET 2005's own web server, it should be rare that above problems would happen. Some of the post links above also stated that there maybe problems when putting sql Mdf/Ldf files under a web folder (ASP_DATA folder), since the iis worker process will block the use of those files by sql server express. I don't know if this would happen anyway, but we should put it in another way. When we put things from development environment to a testing / beta / or production site, we might need to also upgrade our database engine to a production one, means that we should not use a SQL Server Express on production environment. putting the database from a file-based one to a server-based one would eliminate many of those permission problems and make things simpler, also doing this gaining a better connectivity / scalibility for volume users applications.

Membership features are new in ASP.NET 2.0 , there should be many stuffs needed to read on the document to get a better understanding about it. and I do started to find that new VS.NET 2005 IDE is more friendly then VS.NET 2003. very glad to see that!!

Technorati Tags: membership , asp.net , programming

 

Posted: 2005/12/11 0:33 by rextangtw | with 1 comment(s)
Filed under: ,
Yahoo! buys Del.icio.us

 

[via Slashdot] [via CNet News] [via Del.icio.us blog]

Another big news before X'mas and end of this year.

Just spent some time read those stories, also browsed to all the comments in del.icio.us blog. well, good words and bad words both existed.

I do think that for business part this should be a good news for Yahoo! itself to become the so-called "a leading social networking company" . but I do think that Yahoo! should be more careful on dealing with those good applications that people love to use and advertisments they wants to spread in those applications.

Either good or bad, congratulations to del.icio.us, this means you've successed!

Technorati Tags: yahoo , del.icio.us

 

Posted: 2005/12/10 15:09 by rextangtw | with no comments
Filed under: ,
Another Tool List from MSDN blogs...

 

[via DotNetInterop in MSDN blogs]

Right after I saw James Avery's article in this month's MSDN magazine, there is another good tool-list post published today at DotNetInterop blog in MSDN blogs.

Some good stuffs like AnkhSVN (a VS.NET SVN addin) and Jalindi Igloo (a VS.NET CVS addin) should be very useful for people using those 2 main stream source control repositories (VSS should be main stream too...). Also another goodies and some others like CSAH that James also mentioned in magazine. I am going to evaluate NUint, TestDriven.NET, as well as CruiseControl.NET to further make my projects more automatic and healthy.

both of these 2 articles didn't mentioned one of my favorite tool, it's log4net , a logging framework for developers to write log files out while system running. it's another good stuff for debugging, and I do love it! maybe it's too "essential" a basic tool for every developer that worth not mentioning, anyway... :)

Tools never enough, especially good tools that really make developers / architects / PMs doing their works more efficiently!

Technorati Tags: addin , visualstudio , programming

 

VMWare 5.5 was out (5.5.0, build 18463), not beta / rc anymore...

 

[via Larkware] [via VMWare website]

Final 5.5.0 version was out at 2005/11/29 , with build number 18463 ... download page is here.

Some cool new features listed below, via What's New page.

What's New in VMware Workstation 5.5?

VMware has added powerful new functionality and support to the latest release of VMware Workstation:

Support for 64-bit guest operating systems
Experimental support for 2-way Virtual SMP
Ability to open and convert Microsoft virtual machines or Symantec LiveState Recovery images

Via the Workstation user interface, users can now easily:

  • Open Microsoft virtual machines and Symantec LiveState Recovery images. In this process, the initial virtual machine or image is left untouched in its native format and any modifications are saved in a much smaller VMware-formatted file that is linked to the initial image.  (hint: VPC images are now able to be a base image of a linked clone, no need to convert to VMWare image! This beats everything!!! really sorry, Microsoft...)
  • Convert Microsoft virtual machines and Symantec LiveState Recovery images into complete, full VMware virtual machines. The initial virtual machine is left untouched.

Users working in a multi-vendor environment can standardize on the VMware platform, or reuse their libraries of physical machine images when building or deploying a virtual infrastructure.

VMware Player included*
New support for select 32- and 64-bit host & guest operating systems and hardware
Toolbar customization
New wireless networking capabilities for Linux hosts
Enhanced autodetect
Enhanced command line interface

Manage snapshots of virtual machines with vmrun commands. Users can now quickly create, delete, list, and go to specific snapshots.

Other great features

  • Enhanced autoconnect automatically reconnnects manually connected USB devices
  • Enhanced snapshot manager allows users to select and delete multiple snapshots at once
  • Workstation 5.5 emulates a new Ethernet adapter type (the Intel PRO/1000 MT Adapter) for Workstation virtual machines with supported 64-bit guest operating systems
  • Enhanced product update checking, including an option to Check Now for any Workstation updates
  • On Linux host, the Workstation user interface better represents a chosen desktop appearance theme and supports high- and low-contrast themes for the visually impaired
  • Display resizing features, Autofit Guest and Fit Guest Now, on Windows are now available for Linux guests

* VMware Player is a free product that is not supported by VMware, either as a standalone product or as part of VMware Workstation 5.5.

Another must have tool I think everyone should need!!

Technorati Tags: vmware , virtualpc , virtual machine