<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Programming</title>
        <link>http://kjctech.net/blog/category/18.aspx</link>
        <description>Programming</description>
        <language>en-US</language>
        <copyright>Kent J. Chen</copyright>
        <managingEditor>kent@kjctech.net</managingEditor>
        <generator>Subtext Version 1.9.5.176</generator>
        <item>
            <title>Sending Authenticated Email in ASP.Net 2.0 - update</title>
            <link>http://kjctech.net/blog/archive/2008/05/13/sending-authenticated-email-in-asp.net-2.0---update.aspx</link>
            <description>&lt;p&gt;Apparently, settings described in my &lt;a href="http://www.kjctech.net/blog/archive/2008/05/03/send-authenticated-email-in-asp.net-2.0.aspx" target="_blank"&gt;previous post&lt;/a&gt; isn't good enough to make it work, it wasn't quite right indeed. There are a lot more stuff needed to be figured out.  Google isn't much helpful in this case, which is a little bit surprise, maybe this case is just so rare.&lt;/p&gt; &lt;p&gt;To recap what I need, I have a simple impersonate set to true web form that collects information and email them into a distribution group that receives email from Authenticated User Only in Exchange.  It might be easy when impersonate is set to false because then you can simply set up the user info and get authenticated in Exchange when sending the email.  I had it work without any problem in ASP.Net 1.1 but not so easy in 2.0.&lt;/p&gt; &lt;p&gt;It turned out the only way of doing so is:&lt;/p&gt; &lt;p&gt;1. hosting the form on the same server as Exchange,&lt;/p&gt; &lt;p&gt;2. set the deliveryMethod to "PickupDirectoryFromIis" in web.config file.&lt;/p&gt; &lt;p&gt;And then, the permission to do the PickupDirectoryFromIis started confusing me as I have no idea what permission should be granted.  For now, I just put whoever needs to use the form to local administrator group, which appears working fine.  But that can't be permanent, only temporarily.&lt;/p&gt; &lt;p&gt;Mission still has yet accomplished.&lt;/p&gt;&lt;img src="http://kjctech.net/blog/aggbug/611.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Kent J. Chen</dc:creator>
            <guid>http://kjctech.net/blog/archive/2008/05/13/sending-authenticated-email-in-asp.net-2.0---update.aspx</guid>
            <pubDate>Wed, 14 May 2008 06:23:33 GMT</pubDate>
            <wfw:comment>http://kjctech.net/blog/comments/611.aspx</wfw:comment>
            <comments>http://kjctech.net/blog/archive/2008/05/13/sending-authenticated-email-in-asp.net-2.0---update.aspx#feedback</comments>
            <wfw:commentRss>http://kjctech.net/blog/comments/commentRss/611.aspx</wfw:commentRss>
            <trackback:ping>http://kjctech.net/blog/services/trackbacks/611.aspx</trackback:ping>
        </item>
        <item>
            <title>Send Authenticated Email in ASP.Net 2.0</title>
            <link>http://kjctech.net/blog/archive/2008/05/03/send-authenticated-email-in-asp.net-2.0.aspx</link>
            <description>&lt;p&gt;To send emails from web form written in ASP.Net 2.0 to an email address that only receives emails from authenticated users, you need to set defaultCredentials="true" in web.config file with other SMTP settings, see below, or the email sent from the form will just go missing without leaving any trace.  For example:&lt;/p&gt; &lt;p&gt;&amp;lt;system.net&amp;gt;&lt;br /&gt;    &amp;lt;mailSettings&amp;gt;&lt;br /&gt;        &amp;lt;smtp deliveryMethod="Network"&amp;gt;&lt;br /&gt;            &amp;lt;network host="mailserver" port="25" defaultCredentials="true" /&amp;gt;&lt;br /&gt;        &amp;lt;/smtp&amp;gt;&lt;br /&gt;    &amp;lt;/mailSettings&amp;gt;&lt;br /&gt;&amp;lt;/system.net&amp;gt;  &lt;/p&gt;&lt;p&gt;Besides, you might also need to set up security authentication impersonate to true as well in web.config file in order to pass the proper authenticated credential to the mail server.&lt;/p&gt; &lt;p&gt;&amp;lt;authentication mode="Windows" /&amp;gt;&lt;br /&gt;&amp;lt;identity impersonate="true" /&amp;gt;&lt;br /&gt;&amp;lt;authorization&amp;gt;&lt;br /&gt;  &amp;lt;deny users="?" /&amp;gt;&lt;br /&gt;&amp;lt;/authorization&amp;gt;  &lt;/p&gt;&lt;p&gt;For people who don't know how to determine if the email address is set to only receive emails from authenticated users, if you are Microsoft Exchange user, you can easily find out from the following property window.  &lt;/p&gt;&lt;p&gt;&lt;img height="489" alt="image" src="http://www.kjctech.net/images/blog/SendAuthenticatedEmailinASP.Net2.0_14997/image.png" width="427" border="0" /&gt; &lt;/p&gt; &lt;p&gt;&amp;lt;update&amp;gt;&lt;br /&gt;please see &lt;a href="http://kjctech.net/blog/archive/2008/05/13/sending-authenticated-email-in-asp.net-2.0---update.aspx" target="_blank"&gt;updated post&lt;/a&gt; for more updated information.&lt;br /&gt;&amp;lt;/update&amp;gt;&lt;/p&gt;&lt;img src="http://kjctech.net/blog/aggbug/607.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Kent J. Chen</dc:creator>
            <guid>http://kjctech.net/blog/archive/2008/05/03/send-authenticated-email-in-asp.net-2.0.aspx</guid>
            <pubDate>Sun, 04 May 2008 06:51:05 GMT</pubDate>
            <wfw:comment>http://kjctech.net/blog/comments/607.aspx</wfw:comment>
            <comments>http://kjctech.net/blog/archive/2008/05/03/send-authenticated-email-in-asp.net-2.0.aspx#feedback</comments>
            <wfw:commentRss>http://kjctech.net/blog/comments/commentRss/607.aspx</wfw:commentRss>
            <trackback:ping>http://kjctech.net/blog/services/trackbacks/607.aspx</trackback:ping>
        </item>
        <item>
            <title>Hiding all borders in Firefox when using DataGrid</title>
            <link>http://kjctech.net/blog/archive/2008/02/18/hiding-all-borders-in-firefox-when-using-datagrid.aspx</link>
            <description>&lt;p&gt;Any idea how to hide all the borders in Firefox when using DataGrid to show the data table in ASP.Net? Setting up the DataGrid property &lt;strong&gt;&lt;em&gt;borderwidth = "none"&lt;/em&gt;&lt;/strong&gt; only works in IE. It shows solid line in whatever default color in Firefox. I used to just make the border lighter or nicer so it won't look too ugly but the real trick is, to set the property &lt;strong&gt;&lt;em&gt;gridlines = "none"&lt;/em&gt;&lt;/strong&gt;. Everything works perfectly as the way it should be in both browsers now.&lt;/p&gt; &lt;p&gt;So why doesn't &lt;strong&gt;&lt;em&gt;borderwidth&lt;/em&gt;&lt;/strong&gt; work? We all know that the DataGrid control will be rendered in &amp;lt;table&amp;gt; eventually when being called up in the client browser.  It puts a property &lt;strong&gt;&lt;em&gt;rules = "all"&lt;/em&gt;&lt;/strong&gt; in &amp;lt;table&amp;gt; by default in the client page unless you say no to the engine by setting &lt;strong&gt;&lt;em&gt;gridlines = "none"&lt;/em&gt;&lt;/strong&gt; in DataGrid. So what does this rules do? According to W3C.org,&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;blockquote&gt; &lt;p&gt;rules = none|groups|rows|cols|all [CI]&lt;br /&gt;    This attribute specifies which rules will appear between cells within a table. The rendering of rules is user agent dependent. Possible values:  &lt;/p&gt;&lt;p&gt;        * none: No rules. This is the default value.&lt;br /&gt;        * groups: Rules will appear between row groups (see THEAD, TFOOT, and TBODY) and column groups (see COLGROUP and COL) only.&lt;br /&gt;        * rows: Rules will appear between rows only.&lt;br /&gt;        * cols: Rules will appear between columns only.&lt;br /&gt;        * all: Rules will appear between all rows and columns. &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Aha, it explains why.  Apparently, &lt;strong&gt;&lt;em&gt;rules&lt;/em&gt;&lt;/strong&gt; will not be used when combining with border style but it rules all in FireFox.  Which one is more CSS-complaint then?  Sorry, I didn't check. &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.asp.net/cssadapters/" target="_blank"&gt;ASP.Net 2.0 CSS Friendly Control Adapters&lt;/a&gt; might works better in server controls like DataGrid because it does help to &lt;a href="http://aspnet.4guysfromrolla.com/articles/112906-1.aspx" target="_blank"&gt;create CSS friendly website&lt;/a&gt; that doesn't have any &amp;lt;table&amp;gt; in any rendered page in any client browser.  However, I am not that keen to use it so far as it also seems to effects quite a lot existing styles in my web projects.&lt;/p&gt;&lt;img src="http://kjctech.net/blog/aggbug/585.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Kent J. Chen</dc:creator>
            <guid>http://kjctech.net/blog/archive/2008/02/18/hiding-all-borders-in-firefox-when-using-datagrid.aspx</guid>
            <pubDate>Tue, 19 Feb 2008 07:12:04 GMT</pubDate>
            <wfw:comment>http://kjctech.net/blog/comments/585.aspx</wfw:comment>
            <comments>http://kjctech.net/blog/archive/2008/02/18/hiding-all-borders-in-firefox-when-using-datagrid.aspx#feedback</comments>
            <wfw:commentRss>http://kjctech.net/blog/comments/commentRss/585.aspx</wfw:commentRss>
            <trackback:ping>http://kjctech.net/blog/services/trackbacks/585.aspx</trackback:ping>
        </item>
        <item>
            <title>Testing, how can I do it better?</title>
            <link>http://kjctech.net/blog/archive/2008/02/16/testing-how-can-i-do-it-better.aspx</link>
            <description>&lt;p&gt;Being a single-man shop for building commercial website sometimes are really painful when coming down to testing because you are lack of so many resources to get it done right.  A recently discovered bug in my recent developed website caused great concern to my customer. The bug was fixed right after being discovered but I had to take one step further to get the website &lt;a href="http://www.hackersafe.com/" target="_blank"&gt;HackerSafe certified&lt;/a&gt; to finally settle it down. Obviously, the website passed the HackerSafe scan without any problem because the main problem wasn't the security vulnerabilities but the bug that failed to be caught because of the lack of qualified well-planned testing.&lt;/p&gt; &lt;p&gt;When I was at school learning software engineering, I was told that there is no software that is bug-free, meaning that making perfect software is nearly impossible and all you can do is to use whatever techniques and tools you have to test and eliminate as much bugs as possible to make the software as much close to perfect as possible. Testing or QA is so vital, even more nowadays, that any little ignorance would hurt the software to decrease the quality as the result. So how and what should I do, as a solo developer, to make better application next time by providing more efficient testing methodology?&lt;/p&gt; &lt;p&gt;First of all, I would adopt &lt;a href="http://en.wikipedia.org/wiki/Unit_testing" target="_blank"&gt;Unit testing&lt;/a&gt; mode when actually programing the application because it validates units of the code to make sure that they are working properly, and more importantly it &lt;a href="http://www.codinghorror.com/blog/archives/000265.html" target="_blank"&gt;forces me to stop and think about the test&lt;/a&gt;.  Could be a nice approach.  It apparently would discover and catch the bug mentioned above.&lt;/p&gt; &lt;p&gt;Secondly, making more detail testing plan in writing and complete it through before handing over for end user beta test.  And if possible, ask other testers who also has programming skills to test my application, mainly to test application's logical, structure, functionality, and usability.&lt;/p&gt; &lt;p&gt;Thirdly, convince and involve more end users who don't have programming skills to test to get more feedbacks and hidden bugs for the front-end interface and usability, or maybe new features.&lt;/p&gt; &lt;p&gt;Lastly, once the application goes public, check error log frequently to catch more bugs that usually are hidden and buried in these error logs.&lt;/p&gt; &lt;p&gt;Is it easy to accomplish?  Not really, because it is the way to go to assure the thing I am making is getting the better quality.&lt;/p&gt;&lt;img src="http://kjctech.net/blog/aggbug/583.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Kent J. Chen</dc:creator>
            <guid>http://kjctech.net/blog/archive/2008/02/16/testing-how-can-i-do-it-better.aspx</guid>
            <pubDate>Sat, 16 Feb 2008 09:33:49 GMT</pubDate>
            <wfw:comment>http://kjctech.net/blog/comments/583.aspx</wfw:comment>
            <comments>http://kjctech.net/blog/archive/2008/02/16/testing-how-can-i-do-it-better.aspx#feedback</comments>
            <wfw:commentRss>http://kjctech.net/blog/comments/commentRss/583.aspx</wfw:commentRss>
            <trackback:ping>http://kjctech.net/blog/services/trackbacks/583.aspx</trackback:ping>
        </item>
        <item>
            <title>The art of hyperlinking</title>
            <link>http://kjctech.net/blog/archive/2007/11/06/the-art-of-hyperlinking.aspx</link>
            <description>&lt;p&gt;Philipp Lenssen's recent &lt;a href="http://blogoscoped.com/archive/2007-10-24-n27.html" target="_blank"&gt;11 Link Usability Tips&lt;/a&gt; reveals a pretty good guideline when coding the links in the web html page, which was claimed as &lt;a href="http://www.codinghorror.com/blog/archives/000985.html" target="_blank"&gt;The art of hyperlinking&lt;/a&gt; by Jeff Atwood.&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Ensure your links are large enough to easily click.&lt;/li&gt; &lt;li&gt;The first link is the most important one.&lt;/li&gt; &lt;li&gt;Don't link everything.&lt;/li&gt; &lt;li&gt;Don't radically alter link behavior.  Very good point that I don't follow all time but will be from now on.&lt;/li&gt; &lt;li&gt;Don't title your link "Click Here".&lt;/li&gt; &lt;li&gt;Don't link things the user might want to select and copy.&lt;/li&gt; &lt;li&gt;Don't include icons on every link.&lt;/li&gt; &lt;li&gt;Don't make your content depend on links to work.  Good point too.  Not everyone will click on the hyperlinks. Either they're too busy to click every single link you put in front of them, or maybe they're reading your article in another format where they can't click on the links: print, offline, or mobile. Either way, it's important to provide the context necessary to make your content understandable without the need to visit whatever is behind those hyperlinks.&lt;/li&gt; &lt;li&gt;Don't hide your link.  Give them a distinct style, or underline them all time.&lt;/li&gt; &lt;li&gt;Don't mix advertising and links.  Single-underline is for the hyperlinks while double-underline is for advertisements.&lt;/li&gt; &lt;li&gt;Don't obfuscate your URLs.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Jeff also mentioned that Keyvan Nayyeri's &lt;a href="http://nayyeri.net/archive/2007/10/24/simplify-your-urls.aspx" target="_blank"&gt;Simplify your URLs&lt;/a&gt; would be a fantastic starting point.  And using &lt;a href="http://decenturl.com/" target="_blank"&gt;DecentURL&lt;/a&gt; to polish the ugly URL.&lt;/p&gt;&lt;img src="http://kjctech.net/blog/aggbug/543.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Kent J. Chen</dc:creator>
            <guid>http://kjctech.net/blog/archive/2007/11/06/the-art-of-hyperlinking.aspx</guid>
            <pubDate>Tue, 06 Nov 2007 19:19:59 GMT</pubDate>
            <wfw:comment>http://kjctech.net/blog/comments/543.aspx</wfw:comment>
            <comments>http://kjctech.net/blog/archive/2007/11/06/the-art-of-hyperlinking.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://kjctech.net/blog/comments/commentRss/543.aspx</wfw:commentRss>
            <trackback:ping>http://kjctech.net/blog/services/trackbacks/543.aspx</trackback:ping>
        </item>
    </channel>
</rss>