<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>Development</title>
        <link>http://www.vitendy.net/category/1.aspx</link>
        <description>General development thoughts and comments.</description>
        <language>en-US</language>
        <copyright>Vitendy</copyright>
        <generator>Subtext Version 2.1.2.2</generator>
        <item>
            <title>Dealing with SPListItemVersion and his cousin SPFileVersion during SPFile or SPListItem copying</title>
            <link>http://www.vitendy.com/archive/2009/10/03/dealing-with-splistitemversion-and-his-cousin-spfileversion-during-spfile-or.aspx</link>
            <description>&lt;p&gt;Since I spent so many hours on this, I figured I'll post this to remember...&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;When copying SPFiles from one doc library to another, a few things to keep in mind:&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;font size="2"&gt;SPFileVersion will not let you get a reference to the SPFile (per MSDN) so &lt;strong&gt;don't &lt;/strong&gt;do this: SPWeb.GetFile(SPFileVersion.Url) because SPFile.Item will be null&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;SPFileVersionCollection (SPFile.Versions) is not in sync with SPListItemVersionCollection. SPFile.Versions actually does NOT return the current version.  So, iterate through all SPFileVersions and use SPFile.Versions.GetVersionFromLabel(SPListItemVersion.VersionLabel)&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;To keep the check in comments with each version, use the following method to add a file to the target library: SPList.RootFolder.Files.Add(url,bytes,true,&lt;strong&gt;SPFileVersion.CheckInComments,&lt;/strong&gt;false)&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;Iterate through versions via a SortedDictionary by Created date property -- the goal is to use SPListItemVersion information to update the newly created SPFile meta data.&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;SPFile.Item.Update() will create a new version; UpdateOverwriteVersion() will not; use the latter with SPFileVersions; use the former when adding a new SPListItem, to set values and incremenet versions.&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;Upload the current version of SPFile outside the SPListItemVersions loop&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;Be mindful that SPListItemVersion returns Modified and Created values as non-local time, so convert it.&lt;/font&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;font size="2"&gt;Consider disabling item events during copy.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;A good reference:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Arial"&gt;&lt;a href="http://www.k2distillery.com/2007/10/copy-version-history-with_5.html"&gt;http://www.k2distillery.com/2007/10/copy-version-history-with_5.html&lt;/a&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2" /&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://www.vitendy.com/aggbug/27.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vitendy</dc:creator>
            <guid>http://www.vitendy.com/archive/2009/10/03/dealing-with-splistitemversion-and-his-cousin-spfileversion-during-spfile-or.aspx</guid>
            <pubDate>Sat, 03 Oct 2009 15:23:07 GMT</pubDate>
            <wfw:comment>http://www.vitendy.com/comments/27.aspx</wfw:comment>
            <comments>http://www.vitendy.com/archive/2009/10/03/dealing-with-splistitemversion-and-his-cousin-spfileversion-during-spfile-or.aspx#feedback</comments>
            <wfw:commentRss>http://www.vitendy.com/comments/commentRss/27.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Subtext refuses to send e-mail via the contact form</title>
            <link>http://www.vitendy.com/archive/2009/09/30/subtext-refuses-to-send-e-mail-via-the-contact-form.aspx</link>
            <description>&lt;p&gt;SubText is my choice blogging app for this Blog. It's .Net based, open source, and just nifty. Yesterday I had a cow with it though. The contact form refused to send notification e-mails. No error was generated. That was confusing, discouraging and frustrating -- since potential clients contact me via this blog.&lt;/p&gt;
&lt;p&gt;There were only two places that I knew of where changes could be made to the e-mail delivery mechanism. web.config file to set the smtp server and the contact form code to execute the delivery. &lt;/p&gt;
&lt;p&gt;The mystery deepened when I could setup SubText on a couple of spare servers. Contact form worked just fine. What gives?&lt;/p&gt;
&lt;p&gt;Well apparently during setup SubText requests an OPTIONAL e-mail address when setting up a user account for a blog. That e-mail address is used to deliver e-mail messages to from the contact form. Here all this time I was thinking it was the &lt;font face="Arial"&gt;HostEmailAddress in web.config that these messages would be routed to. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;After setting the e-mail address in the &lt;font face="Arial"&gt;&lt;strong&gt;subtext_Config&lt;/strong&gt; table in SQL. Messages started to work. Oh how magical!&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;All this to say, as a developer, I was just given a glimpse at what users may sometimes experience when I fail to clearly establish expectations for the operation of a system. Lesson learned!&lt;/p&gt;&lt;img src="http://www.vitendy.com/aggbug/26.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vitendy</dc:creator>
            <guid>http://www.vitendy.com/archive/2009/09/30/subtext-refuses-to-send-e-mail-via-the-contact-form.aspx</guid>
            <pubDate>Wed, 30 Sep 2009 22:00:01 GMT</pubDate>
            <wfw:comment>http://www.vitendy.com/comments/26.aspx</wfw:comment>
            <comments>http://www.vitendy.com/archive/2009/09/30/subtext-refuses-to-send-e-mail-via-the-contact-form.aspx#feedback</comments>
            <wfw:commentRss>http://www.vitendy.com/comments/commentRss/26.aspx</wfw:commentRss>
        </item>
        <item>
            <title>More MOSS search crawler issues </title>
            <link>http://www.vitendy.com/archive/2009/05/09/more-moss-search-crawler-issues.aspx</link>
            <description>&lt;p&gt;&lt;font face="Arial"&gt;&lt;strong&gt;"The crawler could not communicate with the server. Check that the server is available and that the firewall access is configured correctly.."&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;This error sometimes shows up in the Crawl Log in the SSP.&lt;/p&gt;
&lt;p&gt;The issue in my case was a custom database that the crawler account did not have access to. Of course an easy way to figure this out is to login to the website as the crawler account -- to see what it sees...  It worked. A quick adjustment of SQL permissions and voila, we're crawling again.&lt;br /&gt;
&lt;/p&gt;&lt;img src="http://www.vitendy.com/aggbug/23.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vitaly</dc:creator>
            <guid>http://www.vitendy.com/archive/2009/05/09/more-moss-search-crawler-issues.aspx</guid>
            <pubDate>Sat, 09 May 2009 19:45:33 GMT</pubDate>
            <wfw:comment>http://www.vitendy.com/comments/23.aspx</wfw:comment>
            <comments>http://www.vitendy.com/archive/2009/05/09/more-moss-search-crawler-issues.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://www.vitendy.com/comments/commentRss/23.aspx</wfw:commentRss>
        </item>
        <item>
            <title>MOSS Search Crawler not crawling content on Devevelopment machine</title>
            <link>http://www.vitendy.com/archive/2009/05/09/moss-search-crawler-not-crawling-content-on-devevelopment-machine.aspx</link>
            <description>&lt;p&gt;Pesky little thing. MS introduced a loopback security check for websites accessed locally on the server. &lt;/p&gt;
&lt;p&gt;To fix:&lt;font face="Arial"&gt;&lt;a href="http://support.microsoft.com/kb/896861"&gt;http://support.microsoft.com/kb/896861&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Click &lt;strong class="uiterm"&gt;Start&lt;/strong&gt;, click &lt;strong class="uiterm"&gt;Run&lt;/strong&gt;, type &lt;span class="userInput"&gt;regedit&lt;/span&gt;, and then click &lt;strong class="uiterm"&gt;OK&lt;/strong&gt;. &lt;/p&gt;
&lt;li&gt;In Registry Editor, locate and then click the following registry key:
&lt;div class="indent"&gt;&lt;strong class="uiterm"&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa&lt;/strong&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Right-click &lt;strong class="uiterm"&gt;Lsa&lt;/strong&gt;, point to &lt;strong class="uiterm"&gt;New&lt;/strong&gt;, and then click &lt;strong class="uiterm"&gt;DWORD Value&lt;/strong&gt;. &lt;/li&gt;
&lt;li&gt;Type &lt;span class="userInput"&gt;DisableLoopbackCheck&lt;/span&gt;, and then press ENTER. &lt;/li&gt;
&lt;li&gt;Right-click &lt;strong class="uiterm"&gt;DisableLoopbackCheck&lt;/strong&gt;, and then click &lt;strong class="uiterm"&gt;Modify&lt;/strong&gt;. &lt;/li&gt;
&lt;li&gt;In the &lt;strong class="uiterm"&gt;Value data&lt;/strong&gt; box, type &lt;span class="userInput"&gt;1&lt;/span&gt;, and then click &lt;strong class="uiterm"&gt;OK&lt;/strong&gt;. &lt;/li&gt;
&lt;li&gt;Quit Registry Editor, and then restart your computer.&lt;/li&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://www.vitendy.com/aggbug/21.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vitaly</dc:creator>
            <guid>http://www.vitendy.com/archive/2009/05/09/moss-search-crawler-not-crawling-content-on-devevelopment-machine.aspx</guid>
            <pubDate>Sat, 09 May 2009 19:09:43 GMT</pubDate>
            <wfw:comment>http://www.vitendy.com/comments/21.aspx</wfw:comment>
            <comments>http://www.vitendy.com/archive/2009/05/09/moss-search-crawler-not-crawling-content-on-devevelopment-machine.aspx#feedback</comments>
            <wfw:commentRss>http://www.vitendy.com/comments/commentRss/21.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Do you know your LDAP string?</title>
            <link>http://www.vitendy.com/archive/2008/11/02/do-you-know-your-ldap-string.aspx</link>
            <description>&lt;p&gt;You should. But here is a tool that can help get it:&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&lt;a href="http://www.infopathdev.com/files/folders/help_files/entry25827.aspx"&gt;http://www.infopathdev.com/files/folders/help_files/entry25827.aspx&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://www.vitendy.com/aggbug/16.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vitaly</dc:creator>
            <guid>http://www.vitendy.com/archive/2008/11/02/do-you-know-your-ldap-string.aspx</guid>
            <pubDate>Sun, 02 Nov 2008 19:16:59 GMT</pubDate>
            <wfw:comment>http://www.vitendy.com/comments/16.aspx</wfw:comment>
            <comments>http://www.vitendy.com/archive/2008/11/02/do-you-know-your-ldap-string.aspx#feedback</comments>
            <wfw:commentRss>http://www.vitendy.com/comments/commentRss/16.aspx</wfw:commentRss>
        </item>
        <item>
            <title>SharePoint Timer Service and custom jobs</title>
            <link>http://www.vitendy.com/archive/2008/10/29/sharepoint-timer-service-and-custom-jobs.aspx</link>
            <description>&lt;p&gt;When deploying custom &lt;font face="Arial"&gt;&lt;strong&gt;SPOneTimeSchedule&lt;/strong&gt; &lt;/font&gt;job definitions sometimes the timer service (OWSTIMER.EXE) just sorta sits there. Your job definition is created, but isn't executed. It will most likely eventually run, but I have better things to do than sit around wait for it. Setting the time for the job in the past seems to move things along faster. &lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;// Create new job&lt;br /&gt;
CustomJob MyJob = new CustomJob(Constants.JOB_NAME, webApp, properties.Definition.DisplayName);&lt;br /&gt;
MyJob.Title = Constants.JOB_TITLE;&lt;br /&gt;
&lt;/font&gt;&lt;font face="Arial"&gt;&lt;br /&gt;
// Set up the job to run once&lt;br /&gt;
&lt;font style="BACKGROUND-COLOR: #ffff00"&gt;MyJob.Schedule = new SPOneTimeSchedule(DateTime.Now.AddHours(-4));&lt;/font&gt;&lt;br /&gt;
MyJob.Update();&lt;br /&gt;
&lt;/font&gt;&lt;font face="Arial" /&gt;
&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" /&gt;&lt;/p&gt;
&lt;img src="http://www.vitendy.com/aggbug/15.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vitaly</dc:creator>
            <guid>http://www.vitendy.com/archive/2008/10/29/sharepoint-timer-service-and-custom-jobs.aspx</guid>
            <pubDate>Wed, 29 Oct 2008 16:17:57 GMT</pubDate>
            <wfw:comment>http://www.vitendy.com/comments/15.aspx</wfw:comment>
            <comments>http://www.vitendy.com/archive/2008/10/29/sharepoint-timer-service-and-custom-jobs.aspx#feedback</comments>
            <wfw:commentRss>http://www.vitendy.com/comments/commentRss/15.aspx</wfw:commentRss>
        </item>
        <item>
            <title>CLR .Net Versions</title>
            <link>http://www.vitendy.com/archive/2008/09/29/clr-.net-versions.aspx</link>
            <description>&lt;p&gt;Do you know the difference between .Net CLR versions? Is 2.0.50727.1433 newere than 2.0.50727.42? What's the difference? &lt;/p&gt;
&lt;p&gt;Here is a nice reference:&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&lt;a href="http://alt.pluralsight.com/wiki/default.aspx/Keith/DotnetVersionWiki.html"&gt;http://alt.pluralsight.com/wiki/default.aspx/Keith/DotnetVersionWiki.html&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://www.vitendy.com/aggbug/14.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vitaly</dc:creator>
            <guid>http://www.vitendy.com/archive/2008/09/29/clr-.net-versions.aspx</guid>
            <pubDate>Mon, 29 Sep 2008 16:09:30 GMT</pubDate>
            <wfw:comment>http://www.vitendy.com/comments/14.aspx</wfw:comment>
            <comments>http://www.vitendy.com/archive/2008/09/29/clr-.net-versions.aspx#feedback</comments>
            <wfw:commentRss>http://www.vitendy.com/comments/commentRss/14.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Import Excel Sheet to SQL Server 2005 database</title>
            <link>http://www.vitendy.com/archive/2008/07/15/import-excel-sheet-to-sql-server-2005-database.aspx</link>
            <description>&lt;p&gt;What should be a simple engagement turned into a headache this evening. Importing from Excel in Sql 2005 has become more cumbersome due to various 'issues' with the import/export wizard.  So here is a good solution:&lt;/p&gt;
&lt;p&gt;SELECT * INTO XLImport4 FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=C:\test\xltest.xls', [Customers$])&lt;/p&gt;
&lt;p&gt;May have to enable Ad Hoc Remote queries in SAC.&lt;/p&gt;
&lt;p&gt;May have to place the Excel file on the SQL server's file system.&lt;/p&gt;
&lt;p&gt;Reference: &lt;font face="Arial"&gt;&lt;a href="http://support.microsoft.com/kb/321686/en-us"&gt;http://support.microsoft.com/kb/321686/en-us&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://www.vitendy.com/aggbug/12.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vitaly</dc:creator>
            <guid>http://www.vitendy.com/archive/2008/07/15/import-excel-sheet-to-sql-server-2005-database.aspx</guid>
            <pubDate>Tue, 15 Jul 2008 08:20:42 GMT</pubDate>
            <wfw:comment>http://www.vitendy.com/comments/12.aspx</wfw:comment>
            <comments>http://www.vitendy.com/archive/2008/07/15/import-excel-sheet-to-sql-server-2005-database.aspx#feedback</comments>
            <wfw:commentRss>http://www.vitendy.com/comments/commentRss/12.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Setting up Google Analytics with Subtext</title>
            <link>http://www.vitendy.com/archive/2008/01/10/setting-up-ga-on-subtext.aspx</link>
            <description>&lt;p&gt;&lt;strong&gt;UPDATE: &lt;/strong&gt;There is another way, it's a Sitewide Tracking code, under Options, Configure, in your SubText management UI. (version 2.0+)&lt;/p&gt;
&lt;p&gt;SubText is the blog engine of my choice. Skinning is simple, it's free, it's written in .Net and it's feature rich. Now if I we could only get some visitor stats.  Google Analytics to the rescue.&lt;/p&gt;
&lt;p&gt;JavaScript tracking code is what makes GA work.  Adding the tracking code to SubText was simple enough. DTP.asxp is the page that SubText uses to dynamically render content. So we just insert the JavaScript snippet right above the &amp;lt;/body&amp;gt; tag and we're all set.&lt;/p&gt;
&lt;p&gt;GA takes a few hours for the stats to show up... still waiting.&lt;/p&gt;
&lt;h6&gt;&lt;em&gt;References:&lt;/em&gt; &lt;/h6&gt;
&lt;h6&gt;&lt;a title="http://idunno.org/archive/2007/04/21/Adding-Google-Analytics-to-Subtext.aspx" href="http://idunno.org/archive/2007/04/21/Adding-Google-Analytics-to-Subtext.aspx"&gt;http://idunno.org/archive/2007/04/21/Adding-Google-Analytics-to-Subtext.aspx&lt;/a&gt;&lt;/h6&gt;
&lt;h6&gt;&lt;a title="http://www.google.com/support/googleanalytics/bin/answer.py?answer=55488&amp;amp;topic=11126" href="http://www.google.com/support/googleanalytics/bin/answer.py?answer=55488&amp;amp;topic=11126"&gt;http://www.google.com/support/googleanalytics/bin/answer.py?answer=55488&amp;amp;topic=11126&lt;/a&gt;&lt;/h6&gt;&lt;img src="http://www.vitendy.com/aggbug/4.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vitaly</dc:creator>
            <guid>http://www.vitendy.com/archive/2008/01/10/setting-up-ga-on-subtext.aspx</guid>
            <pubDate>Thu, 10 Jan 2008 08:46:56 GMT</pubDate>
            <wfw:comment>http://www.vitendy.com/comments/4.aspx</wfw:comment>
            <comments>http://www.vitendy.com/archive/2008/01/10/setting-up-ga-on-subtext.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://www.vitendy.com/comments/commentRss/4.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Free Image Gallery DNN Module</title>
            <link>http://www.vitendy.com/archive/2008/01/06/free-dnn-module.aspx</link>
            <description>&lt;p&gt;I thought the name for this module is perfect. It's a gallery module that lots you page a single folder with arrows. I'll improve the basics at some point, but for now, it is what it is.  &lt;/p&gt;
&lt;p&gt;Download the&lt;a href="http://www.vitendy.com/downloadme/Vitendy.DNN.OSSGallery_01.00.01_Install.zip"&gt;Oh So Simple Gallery&lt;/a&gt; all zipped up and ready to go.&lt;/p&gt;
&lt;p&gt;&lt;font color="#808000" size="1"&gt;Warning: download and use at your risk. you should be comfortable with vb.net to fix anything or to make improvements.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://www.vitendy.com/aggbug/3.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vitaly</dc:creator>
            <guid>http://www.vitendy.com/archive/2008/01/06/free-dnn-module.aspx</guid>
            <pubDate>Sun, 06 Jan 2008 09:13:02 GMT</pubDate>
            <wfw:comment>http://www.vitendy.com/comments/3.aspx</wfw:comment>
            <comments>http://www.vitendy.com/archive/2008/01/06/free-dnn-module.aspx#feedback</comments>
            <slash:comments>5</slash:comments>
            <wfw:commentRss>http://www.vitendy.com/comments/commentRss/3.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>