<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>Sean's Blog</title>
        <link>http://geekswithblogs.net/seanfao/Default.aspx</link>
        <description>My Development Blog</description>
        <language>en-US</language>
        <copyright>Sean Fao</copyright>
        <managingEditor>sean.fao@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <image>
            <title>Sean's Blog</title>
            <url>http://geekswithblogs.net/images/RSS2Image.gif</url>
            <link>http://geekswithblogs.net/seanfao/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>Configuring Execel Services for Impersonation</title>
            <link>http://geekswithblogs.net/seanfao/archive/2008/10/22/126025.aspx</link>
            <description>If you're trying to impersonate a Windows identity in an Excel Services UDF, make sure to configure the Excel Service access mode to delegation, rather than the Trusted Subsystem model (default).  This can be done with the following commands:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;stsadm -o set-ecssecurity -accessmodel delegation -ssp &lt;em&gt;sspname&lt;/em&gt;&lt;br /&gt;
stsadm -o execadmsvcjobs&lt;br /&gt;
iisreset&lt;/code&gt;
&lt;p&gt;Failing to do so could result in hours of frustration!  Specifically, if you always go down the error path in the following code, this is likely the problem:&lt;/p&gt;
&lt;code&gt;if ((wi = Thread.CurrentPrincipal.Identity as WindowsIdentity) == null)&lt;br /&gt;{&lt;br /&gt;    throw new InvalidOperationException("An error occurred during the Impersonation process");&lt;br /&gt;}&lt;/code&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=126025"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=126025" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/seanfao/aggbug/126025.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sean Fao</dc:creator>
            <guid>http://geekswithblogs.net/seanfao/archive/2008/10/22/126025.aspx</guid>
            <pubDate>Wed, 22 Oct 2008 20:26:51 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/seanfao/comments/126025.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/seanfao/archive/2008/10/22/126025.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/seanfao/comments/commentRss/126025.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/seanfao/services/trackbacks/126025.aspx</trackback:ping>
        </item>
        <item>
            <title>Importing a Namespace In An ASPX Page</title>
            <link>http://geekswithblogs.net/seanfao/archive/2008/08/21/124619.aspx</link>
            <description>This next post might be rather obvious to most of you, but I figured I wasn't the only one that didn't know how to do this.  I was recently working with a new ASP.NET MVC project and got tired of typing out the fully qualified class names.  This seems like something that would be rather common, but a quick Google search didn't turn up anything useful.  I figured that there had to be a way to import a namespace, so intellisense to the rescue, I noticed that there was an &amp;lt;%Import %&amp;gt; directive.  Sure enough, that did the trick.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: rgb(255, 255, 0);"&gt;&amp;lt;%@&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0);"&gt;Import&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Namespace&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="SubSonic"&lt;/span&gt; &lt;span style="background-color: rgb(255, 255, 0);"&gt;%&amp;gt;&lt;/span&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=124619"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=124619" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/seanfao/aggbug/124619.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sean Fao</dc:creator>
            <guid>http://geekswithblogs.net/seanfao/archive/2008/08/21/124619.aspx</guid>
            <pubDate>Fri, 22 Aug 2008 00:02:17 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/seanfao/comments/124619.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/seanfao/archive/2008/08/21/124619.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/seanfao/comments/commentRss/124619.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/seanfao/services/trackbacks/124619.aspx</trackback:ping>
        </item>
        <item>
            <title>Random Exceptions</title>
            <link>http://geekswithblogs.net/seanfao/archive/2008/04/23/121588.aspx</link>
            <description>I was recently working on an application that was known for throwing random exceptions at various times for no apparent reason.  Frustrated, I wrote this snippet of code to ease the tension.  I just thought I'd share it with you.&lt;br /&gt;
&lt;br /&gt;
Program.cs&lt;br /&gt;
&lt;code&gt;using System;
using System.Collections.Generic;

namespace RandomConsoleTests
{
    class RandomConsoleTests
    {
        static void Main(string[] args)
        {
            ThrowRandomException();
        }

        public static void ThrowRandomException()
        {
            throw ExceptionFactory.CreateRandomException();
        }
    }
}&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
ExceptionFactory.cs&lt;br /&gt;
&lt;code&gt;using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Configuration.Provider;
using System.Data;
using System.IO.IsolatedStorage;
using System.Net.Mail;

namespace RandomConsoleTests
{
    public static class ExceptionFactory
    {
        public static Exception CreateRandomException()
        {
            Random rand = new Random();
            switch (rand.Next(0, 20))
            {
                case 0:
                    return new ApplicationException();
                case 1:
                    return new ProviderException();
                case 2:
                    return new SettingsPropertyIsReadOnlyException();
                case 3:
                    return new SettingsPropertyNotFoundException();
                case 4:
                    return new SettingsPropertyWrongTypeException();
                case 5:
                    return new IsolatedStorageException();
                case 6:
                    return new SmtpException();
                case 7:
                    return new SystemException();
                case 8:
                    return new AccessViolationException();
                case 9:
                    return new AppDomainUnloadedException();
                case 10:
                    return new ArgumentException();
                case 11:
                    return new ArithmeticException();
                case 12:
                    return new ArrayTypeMismatchException();
                case 13:
                    return new BadImageFormatException();
                case 14:
                    return new CannotUnloadAppDomainException();
                case 15:
                    return new KeyNotFoundException();
                case 16:
                    return new WarningException();
                case 17:
                    return new TimeoutException();
                case 18:
                    return new OutOfMemoryException();
                case 19:
                    return new DataException();
                case 20:
                    return new InvalidOperationException();
                default:
                    return new Exception();
            }
        }
    }
}&lt;/code&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=121588"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=121588" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/seanfao/aggbug/121588.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sean Fao</dc:creator>
            <guid>http://geekswithblogs.net/seanfao/archive/2008/04/23/121588.aspx</guid>
            <pubDate>Wed, 23 Apr 2008 18:50:50 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/seanfao/comments/121588.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/seanfao/archive/2008/04/23/121588.aspx#feedback</comments>
            <slash:comments>8</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/seanfao/comments/commentRss/121588.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/seanfao/services/trackbacks/121588.aspx</trackback:ping>
        </item>
        <item>
            <title>Commerce Server Starter Site on Non-Standard Port</title>
            <link>http://geekswithblogs.net/seanfao/archive/2008/04/03/120992.aspx</link>
            <description>If you install the Commerce Server starter site on a port other than port 80, you will run into a couple of issues.  The problem is that Microsoft coded the site to drop the port number.  To correct the problem, open the &lt;span style="color: rgb(128, 0, 0);"&gt;App_Code\SiteContext.cs&lt;/span&gt; file and comment out the following line of code (it's on line 247, for me):&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;builder.Port = -1; // Removes the port setting from the site.&lt;/code&gt;&lt;br /&gt;
Add the following line of code in its place (note, update port numbers to match your sites configuration):&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;builder.Port = secure ? 8443 : 8080;&lt;/code&gt; &lt;br /&gt;
&lt;span style="color: rgb(255, 0, 0);"&gt;UPDATE:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The &lt;span style="color: rgb(128, 0, 0);"&gt;User\Login.aspx.cs&lt;/span&gt; file also needs to be updated.  Located the following line in the OnInit() method and change the -1 to match the port number for which SSL is configured to run on your site:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;builder.Port = -1; // Change this to your sites SSL port&lt;/code&gt;&lt;br /&gt;
&lt;span style="font-family: monospace;"&gt; &lt;br /&gt;
&lt;/span&gt;Hope that helps...&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120992"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120992" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/seanfao/aggbug/120992.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sean Fao</dc:creator>
            <guid>http://geekswithblogs.net/seanfao/archive/2008/04/03/120992.aspx</guid>
            <pubDate>Thu, 03 Apr 2008 16:13:52 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/seanfao/comments/120992.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/seanfao/archive/2008/04/03/120992.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/seanfao/comments/commentRss/120992.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/seanfao/services/trackbacks/120992.aspx</trackback:ping>
        </item>
        <item>
            <title>Simple Lesson: Choosing between structs and classes</title>
            <link>http://geekswithblogs.net/seanfao/archive/2008/01/12/118492.aspx</link>
            <description>It seems to me that one of the most underused features of the C# (or Visual Basic) language is the structure.  Developers are often lead to believe that use of classes yield performance benefits.  While this is often the case, structures have their own set of advantages that, when used in the right situation, will yield important, and sometimes substantial performance benefits.  This blog post is intended to help demystify some of the confusions between structures and classes.&lt;br /&gt;
&lt;br /&gt;
In their simplest form, classes and structures in C# are very similar.  In fact, often times, you may simply replace the class keyword with the struct keyword, and your classes can instantly be converted into a struct:&lt;br /&gt;
&lt;br /&gt;
public class Person&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public struct Person&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Indeed, from the standpoint of a text editor, these two entities are identical except for the class and struct keywords.  At the system level, however, these two entities behave very differently.  As most C# developers know, the biggest difference between the two entities is that the class is a reference type, whereas the struct is a value type.  A slightly more educated C# developer would also point out that the struct is stored in the &lt;a href="http://en.wikipedia.org/wiki/Stack_%28data_structure%29"&gt;stack&lt;/a&gt;, whereas the class is stored in the &lt;a href="http://en.wikipedia.org/wiki/Heap_%28data_structure%29"&gt;heap&lt;/a&gt;.  This is an important concept to understand because it is this reason that structures have the potential for increased performance in some situations, but also one of their biggest drawbacks, in other situations.&lt;br /&gt;
&lt;br /&gt;
By being stored in the stack, the runtime (CLR) can create, read, update and remove value types very quickly, with minimal overhead.  It is important to note, however, that the stack is limited.  In fact, you should never create a value type with an instance size greater than 128 bits (16 bytes).&lt;br /&gt;
&lt;br /&gt;
In contrast to value types, reference types store a pointer in the stack that points to an object found in the heap.  By storing reference types in the heap, the amount of memory is limited to the available physical RAM found in the computer that the code is executing on (there is, of course, the concept of swapping, which increases the theoretical limit of available memory; however, that goes beyond the scope of this article).  Following is a simple example of objects types stored in the heap (please excuse the artwork, I'm certainly not a designer):&lt;br /&gt;
&lt;br /&gt;
&lt;img alt="Memory" title="Memory" src="http://img217.imageshack.us/img217/6596/memorymx3.jpg" /&gt;&lt;br /&gt;
&lt;br /&gt;
From looking at this simple diagram, it should  be obvious that  accessing something from the stack can be faster than accessing something from the heap.  This is because the processor has direct access to something stored on the stack, whereas it has to do a lookup and then 'fetch" of anything found on the heap.  There is actually more to it, but for the sake of simplicity, I'll leave it at that.&lt;br /&gt;
&lt;br /&gt;
Another important concept to realize is that, because they are stored in the stack, value types create a second copy of the value when they are copied.  That is, the stack will contain two or more instances of the value each time it is copied.  Reference types, on the other hand, are not copied.  Instead, only the pointer is copied.  In other words, when you copy a reference type, the object itself is not copied, only the pointer is copied.  This obviously has its benefits; especially for large objects.&lt;br /&gt;
&lt;br /&gt;
So then, the important question is, when should you use a structure versus a class?  Following is a simple list of requirements that should help you decide when to use a structure.&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;Represents a single value&lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;Will not be changed after its creation&lt;/li&gt;
    &lt;li&gt;Will not be cast to a reference type (for more information, read up on &lt;a href="http://msdn2.microsoft.com/en-us/library/yz2be5wk.aspx"&gt;boxing and unboxing&lt;/a&gt;)&lt;/li&gt;
    &lt;li&gt;Has an instance size less than 128 bits (16 bytes)&lt;/li&gt;
&lt;/ul&gt;
If your entity does not meet those requirements, your best choice is going to be the use of a class.&lt;br /&gt;
&lt;br /&gt;
For more information on the differences between classes and structures, be sure to check out &lt;a href="http://msdn2.microsoft.com/en-us/library/2hkbth2a(VS.80).aspx"&gt;Microsoft's page&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Update:&lt;br /&gt;
&lt;br /&gt;
Rick Minerich has posted a terrific series of articles related to memory management.  I highly recommend reading all three, but for those of you that would like to jump straight ahead to managing the size of the stack, please jump to part 3: &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.atalasoft.com/cs/blogs/rickm/archive/2008/04/03/net-memory-managment-part-1-basic-housekeeping.aspx"&gt;Part 1 – Basic Housekeeping&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.atalasoft.com/cs/blogs/rickm/archive/2008/04/15/improving-performance-through-stack-allocation-net-memory-management-part-2.aspx"&gt;Part 2 – Improving Performance Through Stack Allocation&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.atalasoft.com/cs/blogs/rickm/archive/2008/04/22/increasing-the-size-of-your-stack-net-memory-management-part-3.aspx"&gt;Part 3 – Increasing the Size of your Stack&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118492"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118492" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/seanfao/aggbug/118492.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sean Fao</dc:creator>
            <guid>http://geekswithblogs.net/seanfao/archive/2008/01/12/118492.aspx</guid>
            <pubDate>Sat, 12 Jan 2008 16:32:12 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/seanfao/comments/118492.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/seanfao/archive/2008/01/12/118492.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/seanfao/comments/commentRss/118492.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/seanfao/services/trackbacks/118492.aspx</trackback:ping>
        </item>
        <item>
            <title>Unblocking Blocked File Types in SharePoint 2007</title>
            <link>http://geekswithblogs.net/seanfao/archive/2007/11/12/116814.aspx</link>
            <description>If you are attempting to access a blocked file type in SharePoint 2007, you will receive the following error:&lt;br /&gt;
&lt;br /&gt;
&lt;font size="-1"&gt;The following file(s) have been blocked by the administrator&lt;br /&gt;
&lt;br /&gt;
The following describes how to resolve the issue:&lt;br /&gt;
&lt;br /&gt;
&lt;/font&gt;
&lt;ol&gt;
    &lt;li&gt;Browse to the &lt;span style="font-weight: bold;"&gt;Central Admin&lt;/span&gt; site&lt;/li&gt;
    &lt;li&gt;Select the &lt;span style="font-weight: bold;"&gt;Operations&lt;/span&gt; tab&lt;/li&gt;
    &lt;li&gt;Under the &lt;span style="font-weight: bold;"&gt;Security Configuration&lt;/span&gt; section, click the link for &lt;span style="font-weight: bold;"&gt;Blocked file types&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;Select the &lt;span style="font-weight: bold;"&gt;Web Application&lt;/span&gt; that you would like to modify from the drop down list&lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;Each blocked file extension displayed in the list is blocked by SharePoint.  To enable the blocked file extension, simply remove it from the list.&lt;/li&gt;
&lt;/ol&gt;
Hope that helps!&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=116814"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=116814" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/seanfao/aggbug/116814.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sean Fao</dc:creator>
            <guid>http://geekswithblogs.net/seanfao/archive/2007/11/12/116814.aspx</guid>
            <pubDate>Tue, 13 Nov 2007 03:03:08 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/seanfao/comments/116814.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/seanfao/archive/2007/11/12/116814.aspx#feedback</comments>
            <slash:comments>10</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/seanfao/comments/commentRss/116814.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/seanfao/services/trackbacks/116814.aspx</trackback:ping>
        </item>
        <item>
            <title>Programmatically Wiring Up the DOM onunload Event in ASP.NET</title>
            <link>http://geekswithblogs.net/seanfao/archive/2007/11/07/116685.aspx</link>
            <description>If you've ever attempted to programmatically add a DOM event to the &amp;lt;body&amp;gt; tag in your ASP.NET application, you have probably noticed that there isn't an easy way to do so.  The problem is that there is no way to get a reference to the body tag in the code behind.  A simple solution might be to add the ID and runat="server" attributes to the body tag.  This would be a nice little trick to get a reference to the &amp;lt;body&amp;gt; tag in the code behind of the current page, but what if, for example, a control you were writing required some client-side garbage collection when the user leaves the page?  The DOM onunload event would be a nice place to start, but this attribute is applied to the &amp;lt;body&amp;gt; tag.  Forcing anybody that uses your control to add the appropriate attributes to their body tag is asking a bit much, not to mention error prone.  A control should provide the implementation for everything that is required for it to operate so that the client need not worry about the details.&lt;br /&gt;
&lt;br /&gt;
We obviously have the tools necessary register a startup script; however, there isn't anything available that will register a script that is run when the user leaves the page.  Or is there?  After a little bit of brainstorming, I came up with a simple solution that I think solves the problem.  The solution: Use JavaScript to programmatically wire up the DOM onunload event!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt; Page.ClientScript.RegisterStartupScript(typeof(MyControl), "Unload.js", "&amp;lt;script type=\"text/javascript\"&amp;gt;window.onunload = function () { alert('Dont leave me!!!'); };&amp;lt;/script&amp;gt;", false);  &lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
In short, this code snippet registers a startup script that configures the DOM onunload event.  When the browser loads the page, the JavaScript is executed, thereby registering the appropriate onunload event, which is run when the user leaves the page.&lt;br /&gt;
&lt;br /&gt;
This code could easily be modified to be more friendly towards any other onunload events that might already be wired up; or, to add any other attribute to the &amp;lt;body&amp;gt; tag by using JavaScript.&lt;br /&gt;
&lt;br /&gt;
Hope this helps...&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=116685"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=116685" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/seanfao/aggbug/116685.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sean Fao</dc:creator>
            <guid>http://geekswithblogs.net/seanfao/archive/2007/11/07/116685.aspx</guid>
            <pubDate>Wed, 07 Nov 2007 17:48:51 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/seanfao/comments/116685.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/seanfao/archive/2007/11/07/116685.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/seanfao/comments/commentRss/116685.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/seanfao/services/trackbacks/116685.aspx</trackback:ping>
        </item>
        <item>
            <title>SharePoint Error When Configuring Authentication</title>
            <link>http://geekswithblogs.net/seanfao/archive/2007/09/19/115451.aspx</link>
            <description>I recently had an issue while trying to configure the authentication provider for a SharePoint 2007 site.  Regardless of the authentication provider that I selected, clicking the save button would result in the following error:&lt;br /&gt;
&lt;br /&gt;
An object of the type Microsoft.SharePoint.Administration.SPWebApplicationProvisioningJobDefinition named "Provisioning 1aa06c49-f543-41c2-b3f6-ce7884a9b71d" already exists under the parent Microsoft.SharePoint.Administration.SPWebService named "".  Rename your object or delete the existing object.&lt;br /&gt;
&lt;br /&gt;
After coming up short on answers from multiple Google searches, I dug into the Timer job Status page under the Operations tab of Central Administration and noticed that for every attempt I made to configure authentication for a site that there were two jobs being created.  One job would pass while the other would fail.  Previously unknown by me, the SharePoint site had been configured in a Server Farm configuration, so the two jobs that I saw coincided with the two servers in the farm (the job had to be provisioned to each server in the farm).  After a quick investigation, it was determined that the two servers were running different versions because a hot fix had been applied to one, but not the other.&lt;br /&gt;
&lt;br /&gt;
In my situation, this was a new SharePoint install and, not being familiar with configuring SharePoint in a server farm, I was able to temporarily remove the second server from the farm and move forward without any errors.  The real test, however, would be to apply the patch to the second server and go through the process again.&lt;br /&gt;
&lt;br /&gt;
There were other constraints, beyond the scope of this post, that made temporarily removing the second server more ideal than simply applying the patch to see where it got me.  I will update this blog when I have added the second server back into the equation.&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=115451"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=115451" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/seanfao/aggbug/115451.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sean Fao</dc:creator>
            <guid>http://geekswithblogs.net/seanfao/archive/2007/09/19/115451.aspx</guid>
            <pubDate>Wed, 19 Sep 2007 12:04:16 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/seanfao/comments/115451.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/seanfao/archive/2007/09/19/115451.aspx#feedback</comments>
            <slash:comments>16</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/seanfao/comments/commentRss/115451.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/seanfao/services/trackbacks/115451.aspx</trackback:ping>
        </item>
        <item>
            <title>How To: Disable Clear Type for Office 2007</title>
            <link>http://geekswithblogs.net/seanfao/archive/2007/08/17/114754.aspx</link>
            <description>It could be that I have something wrong with my eyes, but the ClearType fonts that Microsoft now uses for its new Office 2007 suite is incredibly painful to my eyes. If you would like to disable ClearType fonts in Office 2007 and/or have Office respect system settings, try the following:
&lt;ol&gt;
    &lt;li&gt;Start -&amp;gt; Run -&amp;gt; Regedt32&lt;/li&gt;
    &lt;li&gt;Navigate to the following key: HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common&lt;/li&gt;
    &lt;li&gt;Add the following DWORD value: "RespectSystemFontSmooth"&lt;/li&gt;
    &lt;li&gt;Set the value to 1&lt;/li&gt;
    &lt;li&gt;Close RegEdit&lt;/li&gt;
&lt;/ol&gt;
That's it. Naturally, restart Office if it's already running, but you should notice that the Office 2007 suite now respects the system settings for font smoothing.&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=114754"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=114754" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/seanfao/aggbug/114754.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sean Fao</dc:creator>
            <guid>http://geekswithblogs.net/seanfao/archive/2007/08/17/114754.aspx</guid>
            <pubDate>Sat, 18 Aug 2007 01:08:23 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/seanfao/comments/114754.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/seanfao/archive/2007/08/17/114754.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/seanfao/comments/commentRss/114754.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/seanfao/services/trackbacks/114754.aspx</trackback:ping>
        </item>
    </channel>
</rss>