<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" 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:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>freachable.net</title>
    <link>http://freachable.net/</link>
    <description>Next generation's garbage</description>
    <language>en-us</language>
    <copyright>Hafthor Stefansson</copyright>
    <lastBuildDate>Thu, 19 Jun 2008 09:20:09 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.1.8102.813</generator>
    <managingEditor>blog@freachable.net</managingEditor>
    <webMaster>blog@freachable.net</webMaster>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=a84dd6c8-7046-4934-9d09-40bd69bcad8d</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,a84dd6c8-7046-4934-9d09-40bd69bcad8d.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,a84dd6c8-7046-4934-9d09-40bd69bcad8d.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=a84dd6c8-7046-4934-9d09-40bd69bcad8d</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">SharePoint has a great API for most things,
but some of things seem a bit lacking.<br /><br />
I recently had a need to auto-create folders inside a document library. Basically,
like mkdir with command extensions does on the command line. If directory x exists,
but x\y doesn't, mkdir x\y\z will mkdir x\y and mkdir x\y\z.<br /><br />
After some struggling, here's what I ended up with:<br /><br />
    <font color="#0000ff">Public Shared Sub</font> CreateDocLibFolders(<font color="#0000ff">ByVal </font>url <font color="#0000ff">As
String</font>)<br />
        <font color="#0000ff">Using</font> site <font color="#0000ff">As </font>New
SPSite(url)<br />
            <font color="#0000ff">Using </font>web <font color="#0000ff">As </font>SPWeb
= site.OpenWeb()<br />
                <font color="#0000ff">If </font>url.StartsWith(web.Url) <font color="#0000ff">Then</font><br />
                    <font color="#0000ff">Dim </font>folder <font color="#0000ff">As </font>SPFolder
= web.RootFolder<br />
                    <font color="#0000ff">For
Each </font>segment <font color="#0000ff">As </font>String <font color="#0000ff">In </font>url.Substring(web.Url.Length
+ 1).Split(<font color="#a52a2a">"/"</font>)<br />
                        <font color="#0000ff">Dim </font>nextfolder <font color="#0000ff">As </font>SPFolder
= web.GetFolder(folder.Url &amp; IIf(folder.Url.Length &gt; 0, <font color="#a52a2a">"/"</font>, <font color="#a52a2a">""</font>)
&amp; segment)<br />
                        <font color="#0000ff">If
Not</font> nextfolder.Exists <font color="#0000ff">Then</font><br />
                           
folder = folder.SubFolders.Add(nextfolder.Name)<br /><font color="#0000ff">                       
Else</font><br />
                           
folder = nextfolder<br /><font color="#0000ff">                       
End If<br />
                   
Next<br />
               
End If<br />
            End Using<br />
        End Using<br />
    End Sub</font><br /><br />
Okay, I know it doesn't look like much, but that code represents some hard won knowledge.
The main thing was dealing with folders that had spaces in them. Before, I was System.Web.HttpUtility.UrlDecode()ing
them, but my use of .Name on a .Exists=false proved to be much more elegant. Even
though I'm doing a GetFolder on a escaped url, the .Name property returns a nice,
suitable for passing into SubFolders.Add(), de%20ed name. But why use this ugly indirect
path string building technique? Well, I could not find an exception-free way of doing
existence testing of a folder other than web.GetFolder() which, of course, needs a
web relative url -- this lead to the more clunky looking GetFolder expression.<br /><blockquote><font color="#0000ff">RaiseEvent </font>OnReligiousArgument<br /></blockquote>For the two people that read this blog (me and uh, that might be an exagerated
figure) the reason my snippets have been in VB.NET lately is because I think VB.NET
is underloved in the SharePoint community. VSEWSS, for example, is a C# only club.
Heck with that. It doesn't provide enough juice to justify the opaqueness of its wsp
builder. VB.NET has some nice features and I like taking advantage of them -- I know
both cold and I make no apologies for choosing VB.NET. If you are one of those C#
1337ists... run the benchmarks and tell me its so much better. Tell me what it does
so much better that it makes up for the utter lack of exception filters, XML literals
(VB9), pleasant event raising, beyond 1980s-era switch/select case, optional parameters,
automatic by-reference parameters for callers, array resizing, and procedure scoped
static vars. I'm not saying C# is worse -- it's like the difference between ibuprofen
and acetaminophen. Minor advantages in some edge cases both ways but they all fix
most headaches.<br /><br />
I've seen some comparisons between the two languages before on the net, but none seemed
entirely complete. If I ever am put in jail with nothing but a toilet and a laptop
for a few years, perhaps I'd blog /the/ definitive list.<br /><br />
For those of you thinking of writing in your reasons why C# is soooo superior to VB.NET,
please refer to the <a href="http://en.wikipedia.org/wiki/Logical_fallacy">Logical
Fallacy article on Wikipedia</a> before embarrassing yourself. Reasons like "real
programmers use semicolons" or "only a moron would use a language with the word 'basic'
in the name" will be ridiculed mercilessly. There are some valid arguments for C#
and one could make an equally compelling valid case for it over VB.NET.<br /><p></p><img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=a84dd6c8-7046-4934-9d09-40bd69bcad8d" /></body>
      <title>SharePoint document library folders / Language rant</title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,a84dd6c8-7046-4934-9d09-40bd69bcad8d.aspx</guid>
      <link>http://freachable.net/2008/06/19/SharePointDocumentLibraryFoldersLanguageRant.aspx</link>
      <pubDate>Thu, 19 Jun 2008 09:20:09 GMT</pubDate>
      <description>SharePoint has a great API for most things, but some of things seem a bit lacking.&lt;br&gt;
&lt;br&gt;
I recently had a need to auto-create folders inside a document library. Basically,
like mkdir with command extensions does on the command line. If directory x exists,
but x\y doesn't, mkdir x\y\z will mkdir x\y and mkdir x\y\z.&lt;br&gt;
&lt;br&gt;
After some struggling, here's what I ended up with:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;Public Shared Sub&lt;/font&gt; CreateDocLibFolders(&lt;font color="#0000ff"&gt;ByVal &lt;/font&gt;url &lt;font color="#0000ff"&gt;As
String&lt;/font&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;Using&lt;/font&gt; site &lt;font color="#0000ff"&gt;As &lt;/font&gt;New
SPSite(url)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;Using &lt;/font&gt;web &lt;font color="#0000ff"&gt;As &lt;/font&gt;SPWeb
= site.OpenWeb()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;If &lt;/font&gt;url.StartsWith(web.Url) &lt;font color="#0000ff"&gt;Then&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;Dim &lt;/font&gt;folder &lt;font color="#0000ff"&gt;As &lt;/font&gt;SPFolder
= web.RootFolder&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;For
Each &lt;/font&gt;segment &lt;font color="#0000ff"&gt;As &lt;/font&gt;String &lt;font color="#0000ff"&gt;In &lt;/font&gt;url.Substring(web.Url.Length
+ 1).Split(&lt;font color="#a52a2a"&gt;"/"&lt;/font&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;Dim &lt;/font&gt;nextfolder &lt;font color="#0000ff"&gt;As &lt;/font&gt;SPFolder
= web.GetFolder(folder.Url &amp;amp; IIf(folder.Url.Length &amp;gt; 0, &lt;font color="#a52a2a"&gt;"/"&lt;/font&gt;, &lt;font color="#a52a2a"&gt;""&lt;/font&gt;)
&amp;amp; segment)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;If
Not&lt;/font&gt; nextfolder.Exists &lt;font color="#0000ff"&gt;Then&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
folder = folder.SubFolders.Add(nextfolder.Name)&lt;br&gt;
&lt;font color="#0000ff"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Else&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
folder = nextfolder&lt;br&gt;
&lt;font color="#0000ff"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
End If&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Next&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
End If&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Using&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Using&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/font&gt;
&lt;br&gt;
&lt;br&gt;
Okay, I know it doesn't look like much, but that code represents some hard won knowledge.
The main thing was dealing with folders that had spaces in them. Before, I was System.Web.HttpUtility.UrlDecode()ing
them, but my use of .Name on a .Exists=false proved to be much more elegant. Even
though I'm doing a GetFolder on a escaped url, the .Name property returns a nice,
suitable for passing into SubFolders.Add(), de%20ed name. But why use this ugly indirect
path string building technique? Well, I could not find an exception-free way of doing
existence testing of a folder other than web.GetFolder() which, of course, needs a
web relative url -- this lead to the more clunky looking GetFolder expression.&lt;br&gt;
&lt;blockquote&gt;&lt;font color="#0000ff"&gt;RaiseEvent &lt;/font&gt;OnReligiousArgument&lt;br&gt;
&lt;/blockquote&gt;For the two people that read this blog (me and uh, that might be an exagerated
figure) the reason my snippets have been in VB.NET lately is because I think VB.NET
is underloved in the SharePoint community. VSEWSS, for example, is a C# only club.
Heck with that. It doesn't provide enough juice to justify the opaqueness of its wsp
builder. VB.NET has some nice features and I like taking advantage of them -- I know
both cold and I make no apologies for choosing VB.NET. If you are one of those C#
1337ists... run the benchmarks and tell me its so much better. Tell me what it does
so much better that it makes up for the utter lack of exception filters, XML literals
(VB9), pleasant event raising, beyond 1980s-era switch/select case, optional parameters,
automatic by-reference parameters for callers, array resizing, and procedure scoped
static vars. I'm not saying C# is worse -- it's like the difference between ibuprofen
and acetaminophen. Minor advantages in some edge cases both ways but they all fix
most headaches.&lt;br&gt;
&lt;br&gt;
I've seen some comparisons between the two languages before on the net, but none seemed
entirely complete. If I ever am put in jail with nothing but a toilet and a laptop
for a few years, perhaps I'd blog /the/ definitive list.&lt;br&gt;
&lt;br&gt;
For those of you thinking of writing in your reasons why C# is soooo superior to VB.NET,
please refer to the &lt;a href="http://en.wikipedia.org/wiki/Logical_fallacy"&gt;Logical
Fallacy article on Wikipedia&lt;/a&gt; before embarrassing yourself. Reasons like "real
programmers use semicolons" or "only a moron would use a language with the word 'basic'
in the name" will be ridiculed mercilessly. There are some valid arguments for C#
and one could make an equally compelling valid case for it over VB.NET.&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=a84dd6c8-7046-4934-9d09-40bd69bcad8d" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,a84dd6c8-7046-4934-9d09-40bd69bcad8d.aspx</comments>
      <category>.NET Internals</category>
      <category>SharePoint</category>
    </item>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=1ba5a954-b901-481e-8752-f1810f887b4d</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,1ba5a954-b901-481e-8752-f1810f887b4d.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,1ba5a954-b901-481e-8752-f1810f887b4d.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=1ba5a954-b901-481e-8752-f1810f887b4d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
SharePoint advertises the fact that you can access files on a document library via
WebDAV. This is done via <a href="file://\\{server}\{site}\{doclibname}\">\\{server}\{site}\{doclibname}\</a> and
you can easily get to it with the list menu under "Actions", "Open with Windows Explorer". A
lesser known fact is that you can also use WebDAV to access the attachments collection
of a list with attachments enabled. This is done via <a href="file://\\{server}\{site}\Lists\{listname}\Attachments\{listitemid}\">\\{server}\{site}\Lists\{listname}\Attachments\{listitemid}\</a></p>
        <p>
You should be aware that the WebDAV folder for the list item will not exist until
a file has been added to the attachment collection. If you need it to always exist,
you can make an ItemAdded event handler that simply adds a file and deletes it, like
this:
</p>
        <p>
          <font color="#0000ff">Public Overrides Sub</font> ItemAdded(<font color="#0000ff">ByVal</font> properties <font color="#0000ff">As</font> Microsoft.SharePoint.SPItemEventProperties)<br />
   <font color="#0000ff">Const</font> tempFileName <font color="#0000ff">As</font><font color="#0000ff">String</font> = <font color="#a52a2a">"deleteme.txt"<br /></font>   <font color="#0000ff">If</font> item.Attachments.Count =
0 <font color="#0000ff">Then<br />
      Try<br />
         Me</font>.DisableEventFiring()<br />
         item.Attachments.AddNow(tempFileName,
System.Text.Encoding.ASCII.GetBytes(<font color="#a52a2a">"This is a temporary file.
If you find it, please delete it."</font>))<br />
         item.Attachments.DeleteNow(tempFileName)<br /><font color="#9acd32">        </font><font color="#006400"> '
Here we also save a WebDAV hyperlink<br /></font>         <font color="#0000ff">Dim</font> u <font color="#0000ff">As
New</font> Uri(item.Attachments.UrlPrefix)<br />
         item(<font color="#a52a2a">"AttachmentsLink"</font>)
= <font color="#0000ff">String</font>.Format(<font color="#a52a2a">"</font><a href="file://{0}{1"><font color="#a52a2a">file://{0}{1</font></a><font color="#a52a2a">},
Attachments"</font>, u.Host, u.AbsolutePath))<font color="#a52a2a"><br /></font>         item.Update()<br />
      <font color="#0000ff">Finally</font><br />
         Me.EnableEventFiring()<br />
      <font color="#0000ff">End Try<br />
   End If<br />
End Sub</font></p>
        <p>
          <font color="#000000">In the code above, I also set a hyperlink field so the user
has easy access to the WebDAV view of the list item. I simply added a hyperlink column
called "AttachmentsLink" to the list.</font>
        </p>
        <p>
          <font color="#000000">If you are having trouble using the WebDAV access, be sure
that your WebClient service is enabled and started, which is NOT the default on Windows
Server 2003.</font>
        </p>
        <p>
          <font color="#000000">There is a series of ItemAttachment events available and as
I mentioned before, the documentation for them is not very good. Hint: properties.AfterUrl
will indicate the added file. .BeforeUrl will indicate the file being deleted.</font>
        </p>
        <p>
          <font color="#000000">BUG: The thing to watch out for is that when using WebDAV, the
ItemAttachment events don't fire, but instead, an item event fires with .AfterUrl
or .BeforeUrl set, which it wouldn't ordinarily -- you can use this fact to choose
to reroute Item events to the appropriate ItemAttachment events in your event
code. It would be nice if you could poke in the proper properties.EventType, but it's
read-only so you need to make sure that any part of your ItemAttachment event code
can handle that.</font>
        </p>
        <font color="#000000">
          <p>
            <font color="#0000ff">Public Overrides Sub</font> Item{Whatever}(<font color="#0000ff">ByVal</font> properties <font color="#0000ff">As</font> Microsoft.SharePoint.SPItemEventProperties)<br /><font color="#006400">   ' Reroute for WebDAV event bug<br /></font>   <font color="#0000ff">If</font> properties.AfterUrl<font color="#0000ff"> IsNot
Nothing AndAlso <font color="#000000">properties.AfterUrl</font><font color="#000000">&lt;&gt;</font><font color="#a52a2a">""</font> Then <font color="#000000">ItemAttachmentAdding(properties)</font><font color="#006400"><font color="#0000ff">:
Exit Sub </font>'or ..Added( if -ed event.</font><br /></font>   <font color="#0000ff">If</font> properties.BeforeUrl <font color="#0000ff">IsNot
Nothing AndAlso <font color="#000000">properties.BeforeUrl</font><font color="#000000">&lt;&gt;</font><font color="#a52a2a">""</font> Then </font>ItemAttachmentDeleting(properties) : <font color="#0000ff">Exit
Sub</font><font color="#006400">'or ..Deleted( if -ed event</font><br /><font color="#0000ff"><font color="#006400"><br />
   ' Normal event code follows</font><br /></font><font color="#0000ff">End Sub</font></p>
        </font>
        <img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=1ba5a954-b901-481e-8752-f1810f887b4d" />
      </body>
      <title>SharePoint List Attachment Events and WebDAV bug / workaround</title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,1ba5a954-b901-481e-8752-f1810f887b4d.aspx</guid>
      <link>http://freachable.net/2008/06/12/SharePointListAttachmentEventsAndWebDAVBugWorkaround.aspx</link>
      <pubDate>Thu, 12 Jun 2008 23:50:50 GMT</pubDate>
      <description>&lt;p&gt;
SharePoint advertises the fact that you can access files on a document library via
WebDAV. This is done via &lt;a href="file://\\{server}\{site}\{doclibname}\"&gt;\\{server}\{site}\{doclibname}\&lt;/a&gt;&amp;nbsp;and
you can easily get to it with the list menu under "Actions", "Open with Windows Explorer".&amp;nbsp;A
lesser known fact is that you can also use WebDAV to access the attachments collection
of a list with attachments enabled. This is done via &lt;a href="file://\\{server}\{site}\Lists\{listname}\Attachments\{listitemid}\"&gt;\\{server}\{site}\Lists\{listname}\Attachments\{listitemid}\&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
You should be aware that the WebDAV folder for the list item will not exist until
a file has been added to the attachment collection. If you need it to always exist,
you can make an ItemAdded event handler that simply adds a file and deletes it, like
this:
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#0000ff&gt;Public Overrides Sub&lt;/font&gt; ItemAdded(&lt;font color=#0000ff&gt;ByVal&lt;/font&gt; properties &lt;font color=#0000ff&gt;As&lt;/font&gt; Microsoft.SharePoint.SPItemEventProperties)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;Const&lt;/font&gt; tempFileName &lt;font color=#0000ff&gt;As&lt;/font&gt; &lt;font color=#0000ff&gt;String&lt;/font&gt; = &lt;font color=#a52a2a&gt;"deleteme.txt"&lt;br&gt;
&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;If&lt;/font&gt; item.Attachments.Count = 0 &lt;font color=#0000ff&gt;Then&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Try&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Me&lt;/font&gt;.DisableEventFiring()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;item.Attachments.AddNow(tempFileName,
System.Text.Encoding.ASCII.GetBytes(&lt;font color=#a52a2a&gt;"This is a temporary file.
If you find it, please delete it."&lt;/font&gt;))&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;item.Attachments.DeleteNow(tempFileName)&lt;br&gt;
&lt;font color=#9acd32&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color=#006400&gt;&amp;nbsp;'
Here&amp;nbsp;we also save a WebDAV hyperlink&lt;br&gt;
&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;Dim&lt;/font&gt; u &lt;font color=#0000ff&gt;As
New&lt;/font&gt; Uri(item.Attachments.UrlPrefix)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;item(&lt;font color=#a52a2a&gt;"AttachmentsLink"&lt;/font&gt;)
=&amp;nbsp;&lt;font color=#0000ff&gt;String&lt;/font&gt;.Format(&lt;font color=#a52a2a&gt;"&lt;/font&gt;&lt;a href="file://{0}{1"&gt;&lt;font color=#a52a2a&gt;file://{0}{1&lt;/font&gt;&lt;/a&gt;&lt;font color=#a52a2a&gt;},
Attachments"&lt;/font&gt;, u.Host, u.AbsolutePath))&lt;font color=#a52a2a&gt;
&lt;br&gt;
&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;item.Update()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;Finally&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Me.EnableEventFiring()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;End Try&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br&gt;
End Sub&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;In the code above, I also set a hyperlink field so the user has
easy access to the WebDAV view of the list item. I simply added a hyperlink column
called "AttachmentsLink" to the list.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;If you are having trouble&amp;nbsp;using the WebDAV access, be sure
that your WebClient service is enabled and started, which is NOT the default on Windows
Server 2003.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;There is a series of ItemAttachment events available and as I
mentioned before, the documentation for them is not very good. Hint: properties.AfterUrl
will indicate the added file. .BeforeUrl will indicate the file being deleted.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;BUG: The thing to watch out for is that when using WebDAV, the
ItemAttachment events don't fire, but instead, an item event fires with .AfterUrl
or .BeforeUrl set, which it wouldn't ordinarily -- you can use this fact to choose
to&amp;nbsp;reroute Item events to the appropriate ItemAttachment events in your event
code. It would be nice if you could poke in the proper properties.EventType, but it's
read-only so you need to make sure that any part of your ItemAttachment event code
can handle that.&lt;/font&gt;
&lt;/p&gt;
&lt;font color=#000000&gt; 
&lt;p&gt;
&lt;font color=#0000ff&gt;Public Overrides Sub&lt;/font&gt; Item{Whatever}(&lt;font color=#0000ff&gt;ByVal&lt;/font&gt; properties &lt;font color=#0000ff&gt;As&lt;/font&gt; Microsoft.SharePoint.SPItemEventProperties)&lt;br&gt;
&lt;font color=#006400&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;' Reroute for WebDAV event bug&lt;br&gt;
&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;If&lt;/font&gt;&amp;nbsp;properties.AfterUrl&lt;font color=#0000ff&gt;&amp;nbsp;IsNot
Nothing AndAlso &lt;font color=#000000&gt;properties.AfterUrl&lt;/font&gt; &lt;font color=#000000&gt;&amp;lt;&amp;gt;&lt;/font&gt; &lt;font color=#a52a2a&gt;""&lt;/font&gt; Then &lt;font color=#000000&gt;ItemAttachmentAdding(properties)&lt;/font&gt;&lt;font color=#006400&gt; &lt;font color=#0000ff&gt;:
Exit Sub &lt;/font&gt;'or&amp;nbsp;..Added( if&amp;nbsp;-ed event.&lt;/font&gt;
&lt;br&gt;
&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;font color=#0000ff&gt;If&lt;/font&gt; properties.BeforeUrl &lt;font color=#0000ff&gt;IsNot
Nothing AndAlso &lt;font color=#000000&gt;properties.BeforeUrl&lt;/font&gt; &lt;font color=#000000&gt;&amp;lt;&amp;gt;&lt;/font&gt; &lt;font color=#a52a2a&gt;""&lt;/font&gt; Then&amp;nbsp;&lt;/font&gt;ItemAttachmentDeleting(properties)&amp;nbsp;: &lt;font color=#0000ff&gt;Exit
Sub&lt;/font&gt; &lt;font color=#006400&gt;'or ..Deleted( if -ed event&lt;/font&gt;
&lt;br&gt;
&lt;font color=#0000ff&gt;&lt;font color=#006400&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;' Normal event code follows&lt;/font&gt;
&lt;br&gt;
&lt;/font&gt;&lt;font color=#0000ff&gt;End Sub&lt;/font&gt;
&lt;/p&gt;
&lt;/font&gt;&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=1ba5a954-b901-481e-8752-f1810f887b4d" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,1ba5a954-b901-481e-8752-f1810f887b4d.aspx</comments>
      <category>SharePoint</category>
    </item>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=6cf44e35-d30d-4ec2-bc5b-ced628f6cc85</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,6cf44e35-d30d-4ec2-bc5b-ced628f6cc85.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,6cf44e35-d30d-4ec2-bc5b-ced628f6cc85.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=6cf44e35-d30d-4ec2-bc5b-ced628f6cc85</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
VMware workstation allows a maximum of 950GB. That's quite a bit more than VirtualPC
2007 allows. So what's my advise on sizing? As <a href="/2008/06/07/VirtualPCVirtualDiskFalseEconomy.aspx">before</a>,
do the max.
</p>
        <p>
Windows Server 2003R2 install makes 1,637,548,032 byte .vmdk. Still under 8% difference.
</p>
        <p>
"But I don't want to pay the extra 117MB." Really? That's pretty cheap compared to
what the space required to install a partition resizer later along with your time.
</p>
        <p>
"But I'm only going to use this virt for a couple of things." Great. Then when you
are done and delete it, you'll get a full refund of your extra space.
</p>
        <p>
"I don't want my virt blowing up my main machine by causing it to run out of disk
space." You could enable disk quotas.
</p>
        <img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=6cf44e35-d30d-4ec2-bc5b-ced628f6cc85" />
      </body>
      <title>VMware virtual disks sizing advice</title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,6cf44e35-d30d-4ec2-bc5b-ced628f6cc85.aspx</guid>
      <link>http://freachable.net/2008/06/09/VMwareVirtualDisksSizingAdvice.aspx</link>
      <pubDate>Mon, 09 Jun 2008 23:55:36 GMT</pubDate>
      <description>&lt;p&gt;
VMware workstation allows a maximum of 950GB. That's quite a bit more than VirtualPC
2007 allows. So what's my advise on sizing? As &lt;a href="/2008/06/07/VirtualPCVirtualDiskFalseEconomy.aspx"&gt;before&lt;/a&gt;,
do the max.
&lt;/p&gt;
&lt;p&gt;
Windows Server 2003R2 install makes 1,637,548,032 byte .vmdk. Still under 8% difference.
&lt;/p&gt;
&lt;p&gt;
"But I don't want to pay the extra 117MB." Really? That's pretty cheap compared to
what the space required to install a partition resizer later along with your time.
&lt;/p&gt;
&lt;p&gt;
"But I'm only going to use this virt for a couple of things." Great. Then when you
are done and delete it, you'll get a full refund of your extra space.
&lt;/p&gt;
&lt;p&gt;
"I don't want my virt blowing up my main machine by causing it to run out of disk
space." You could enable disk quotas.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=6cf44e35-d30d-4ec2-bc5b-ced628f6cc85" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,6cf44e35-d30d-4ec2-bc5b-ced628f6cc85.aspx</comments>
      <category>Virtualization</category>
    </item>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=3c2c9c21-239d-433e-8e84-2cebc1871333</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,3c2c9c21-239d-433e-8e84-2cebc1871333.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,3c2c9c21-239d-433e-8e84-2cebc1871333.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=3c2c9c21-239d-433e-8e84-2cebc1871333</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Don't be a cheapskate when VirtualPC 2007 asks you how much disk space to allocate
for your machine. Do the max! I just did a comparison of three identical installs
of Windows Server 2003 on a 8GB, 64GB and a 132GB (which is the max) disks. The difference?
Less than 2.5%. Here's the numbers:
</p>
        <p>
8GB - 1,514,532,352 bytes<br />
64GB - 1,537,721,344 bytes (22MB more)<br />
132GB - 1,552,535,040 bytes (36MB more)
</p>
        <p>
But why pay that extra space? If you ever had to grow one, you'd know why.
</p>
        <p>
But why 132GB? I don't even had that much space on my drive? Sure, but the beauty
of a virtual disk is that you can copy it off to another machine.
</p>
        <p>
That's a key point: Your virtual machine may outlive your real hardware.
</p>
        <p>
I'm gonna guess the difference on VMware is similiar.
</p>
        <img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=3c2c9c21-239d-433e-8e84-2cebc1871333" />
      </body>
      <title>VirtualPC virtual disk false economy</title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,3c2c9c21-239d-433e-8e84-2cebc1871333.aspx</guid>
      <link>http://freachable.net/2008/06/07/VirtualPCVirtualDiskFalseEconomy.aspx</link>
      <pubDate>Sat, 07 Jun 2008 01:20:00 GMT</pubDate>
      <description>&lt;p&gt;
Don't be a cheapskate when VirtualPC 2007 asks you how much disk space to allocate
for your machine. Do the max! I just did a comparison of three identical installs
of Windows Server 2003 on a 8GB, 64GB and a 132GB (which is the max) disks. The difference?
Less than 2.5%. Here's the numbers:
&lt;/p&gt;
&lt;p&gt;
8GB - 1,514,532,352&amp;nbsp;bytes&lt;br&gt;
64GB - 1,537,721,344 bytes (22MB more)&lt;br&gt;
132GB - 1,552,535,040 bytes (36MB more)
&lt;/p&gt;
&lt;p&gt;
But why pay that extra space? If you ever had to grow one, you'd know why.
&lt;/p&gt;
&lt;p&gt;
But why 132GB? I don't even had that much space on my drive? Sure, but the beauty
of a virtual disk is that you can copy it off to another machine.
&lt;/p&gt;
&lt;p&gt;
That's a key point: Your virtual machine may outlive your real hardware.
&lt;/p&gt;
&lt;p&gt;
I'm gonna guess the difference on VMware is similiar.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=3c2c9c21-239d-433e-8e84-2cebc1871333" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,3c2c9c21-239d-433e-8e84-2cebc1871333.aspx</comments>
      <category>Virtualization</category>
    </item>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=25894673-572b-4cb0-94f2-7f5ead749719</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,25894673-572b-4cb0-94f2-7f5ead749719.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,25894673-572b-4cb0-94f2-7f5ead749719.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=25894673-572b-4cb0-94f2-7f5ead749719</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
It's not at all clear from the documentation nor is it logically located in the object
model, but when you get a SharePoint attachment event (like ItemAttachmentAdding,
ItemAttachmentAdded, ItemAttachmentDeleting, ItemAttachmentDeleted) you get the properties.Attachment
collection, but the affected attachment is indicated by the properties.AfterUrl property
which gives a web.Url relative url to the attachment being evented on.
</p>
        <img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=25894673-572b-4cb0-94f2-7f5ead749719" />
      </body>
      <title>SharePoint List Attachment Events</title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,25894673-572b-4cb0-94f2-7f5ead749719.aspx</guid>
      <link>http://freachable.net/2008/06/05/SharePointListAttachmentEvents.aspx</link>
      <pubDate>Thu, 05 Jun 2008 23:09:49 GMT</pubDate>
      <description>&lt;p&gt;
It's not at all clear from the documentation nor is it logically located in the object
model, but when you get a SharePoint attachment event (like ItemAttachmentAdding,
ItemAttachmentAdded, ItemAttachmentDeleting, ItemAttachmentDeleted) you get the properties.Attachment
collection, but the affected attachment is indicated by the properties.AfterUrl property
which gives a web.Url relative url to the attachment being evented on.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=25894673-572b-4cb0-94f2-7f5ead749719" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,25894673-572b-4cb0-94f2-7f5ead749719.aspx</comments>
      <category>SharePoint</category>
    </item>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=1f3d0cdc-8b25-471e-8e0a-c4d74fc1fb48</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,1f3d0cdc-8b25-471e-8e0a-c4d74fc1fb48.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,1f3d0cdc-8b25-471e-8e0a-c4d74fc1fb48.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=1f3d0cdc-8b25-471e-8e0a-c4d74fc1fb48</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <a href="http://freachable.net/content/binary/iPhone 2008-01-16 008.jpg">
          <img src="http://freachable.net/content/binary/iPhone 2008-01-16 008 sml.jpg" border="0" />
        </a>
        <img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=1f3d0cdc-8b25-471e-8e0a-c4d74fc1fb48" />
      </body>
      <title>"No honey, I have to stay late at the office."</title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,1f3d0cdc-8b25-471e-8e0a-c4d74fc1fb48.aspx</guid>
      <link>http://freachable.net/2008/05/19/NoHoneyIHaveToStayLateAtTheOffice.aspx</link>
      <pubDate>Mon, 19 May 2008 00:36:17 GMT</pubDate>
      <description>&lt;a href="http://freachable.net/content/binary/iPhone 2008-01-16 008.jpg"&gt;&lt;img src="http://freachable.net/content/binary/iPhone 2008-01-16 008 sml.jpg" border=0&gt;&lt;/a&gt;&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=1f3d0cdc-8b25-471e-8e0a-c4d74fc1fb48" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,1f3d0cdc-8b25-471e-8e0a-c4d74fc1fb48.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=d30c6223-4cbb-45a8-a0d2-f71109e4b9f5</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,d30c6223-4cbb-45a8-a0d2-f71109e4b9f5.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,d30c6223-4cbb-45a8-a0d2-f71109e4b9f5.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=d30c6223-4cbb-45a8-a0d2-f71109e4b9f5</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Not actually supported. You really need to <strong>-o backup</strong> your SC before
you do it. If you didn't, try at least to backup your 12.0/Secure key in regedit and
copy the \Windows\SysMSI\*\*.cer. The content is PKI protected. I've dorked up a WSS3
install royally this way.
</p>
        <img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=d30c6223-4cbb-45a8-a0d2-f71109e4b9f5" />
      </body>
      <title>Uninstalling Search Server Express 2008 on WSS3</title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,d30c6223-4cbb-45a8-a0d2-f71109e4b9f5.aspx</guid>
      <link>http://freachable.net/2008/05/16/UninstallingSearchServerExpress2008OnWSS3.aspx</link>
      <pubDate>Fri, 16 May 2008 07:11:30 GMT</pubDate>
      <description>&lt;p&gt;
Not actually supported. You really need to &lt;strong&gt;-o backup&lt;/strong&gt; your SC before
you do it. If you didn't, try at least to backup your 12.0/Secure key in regedit and
copy the \Windows\SysMSI\*\*.cer. The content is PKI protected. I've dorked up a WSS3
install royally this way.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=d30c6223-4cbb-45a8-a0d2-f71109e4b9f5" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,d30c6223-4cbb-45a8-a0d2-f71109e4b9f5.aspx</comments>
      <category>SharePoint</category>
    </item>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=a5594aa7-d956-4e7b-b842-f120236d4e3b</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,a5594aa7-d956-4e7b-b842-f120236d4e3b.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,a5594aa7-d956-4e7b-b842-f120236d4e3b.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=a5594aa7-d956-4e7b-b842-f120236d4e3b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've tried out the bus some more.
</p>
        <p>
It has been an okay experience, but it would really make it more convenient if
they had more buses with consistent routes. I should be able to plan my trip by looking
at a map. I shouldn't have to consult a schedule and time trips and worry about missing
a connection.
</p>
        <p>
I was going to complain about busses that never came (twice), busses that came too
early (as much as six minutes), busses that run too late (as much as 10 minutes) and
make me miss connections, but all that would be no biggie if there were just more
busses.
</p>
        <p>
There's a built in inefficiency that comes from running on a schedule - the schedule
has to be built on a timeline that the bus can usually keep up with, so that means
that many times, the bus stops or drives slow so as to not run too early. Dumb.
</p>
        <p>
They should just go as fast as they can with no fixed schedule and only try to to
stay within some range of minutes behind the prior bus - only slowing down to prevent
run-away delay where a late bus gets more late because so many people have stacked
up waiting for it making for more stops on and off. Conversely, a fast bus keeps getting
closer to the bus in front of him because he is less likely to need to stop to pick-up
passengers and so becomes less likely to drop off.
</p>
        <p>
A couple opportunities for optimization exist too. Often a bus stop is just after
an intersection. If the bus is stuck at a red light anyway, it should offer to let
people off there instead as long as there aren't any people waiting at the stop or
bikes/wheelchairs needing to deboard. Also, there should be a way to indicate that
I can get off at this or the next stop. If no one needs to get off at this stop, go
ahead and skip it.
</p>
        <p>
They have some routes with these long articulated busses. Why? Just run twice as many
busses. It will make it more convenient and you can run them faster (because they
carry half the passengers, they'll make fewer stops.)
</p>
        <p>
I'm sure that Valley Metro has as many busses as they can afford (I think they're
about half mill a piece), but I say that more people would ride it if they could rely
on it and it had the same freedom of timing like driving.
</p>
        <p>
I am annoyed by the stupid fare system:
</p>
        <ol>
          <li>
Why would anyone buy the 3 and 7 day local passes? They are consecutive day passes
that are exactly 3 or 7x as expensive as a one day pass. I'm convinced this is some
lame strategy for handling $5s, $10s and $20s - take their money and an extra $2.50
for not having exact change. 
</li>
          <li>
Why can't I buy any number of one day passes? If all I have is a twenty when I walk
up to a bus, I should be able to just get 8 one day passes with one being for today
and the others for use any other day. Better yet, I get one card with 8 days loaded
on it. For the holders info, the reader should mark the card to indicate days bought
and a mark for each day spent so the rider can know when it'll be empty. 
</li>
          <li>
Why can't I purchase and print passes online? Encode a number, print a bar code, sync
numbers each night, if someone frauds it (prints and uses multiple copies), charge
them or blacklist the card and name. You wouldn't be able to print and use for the
same day, but that wouldn't be so bad - at least I'm not stuck waiting for the postal
mail.</li>
        </ol>
        <p>
It's all pretty clearly set up to try to take your money. It's not even subtle. I
suspect this has the opposite effect. Give someone a slight discount and the convenience
and I think they'll buy more. I might not take the bus because I don't have exact
fare. If I got, say, 10 one-day passes for $20, I would be encouraged to buy that
for the discount and encouraged to use them because I have them already. (There's
a natural decrease in perceived value of money already spent and so a higher readiness
to spend it. It's why arcades use tokens.)
</p>
        <p>
Finally, I'm annoyed by the handcuffed bus they're putting in. They call it light
rail, but it's just a skirted trolley that's slower, has fewer stops, more expensive, isn't
flexible and hogs two lanes of traffic 24/7. It also hoses up left turns and cross
street traffic. And the price? 1.4 Billion! At 20 miles of track, that's over $1100
per linear inch. I think that's about $4.6 per square inch given two ten foot wide
lanes. You could cover it in a three layers of twenty dollar bills for that money.
According to their docs, expected ridership goes from 26,000 to 50,000/day over ten
years - so over ten years, they'd have to charge every rider over $10 for each ride.
I didn't count for interest because it is claimed that financing costs are part of
the 1.4G$. I'm not sure this bargain counts for the operating cost. For the money
you can buy busses for the length of the track. Not bus service, you could buy enough
busses to park end-to-end for 20 miles!
</p>
        <p>
Here are some others annoyed by light rail:
</p>
        <ul>
          <li>
            <a href="http://www.coyoteblog.com/coyote_blog/2006/12/i_dont_get_ligh.html">http://www.coyoteblog.com/coyote_blog/2006/12/i_dont_get_ligh.html</a>
          </li>
          <li>
            <a href="http://jackalopepursuivant.typepad.com/jackalopepursuivant/2005/11/enjoy.html">http://jackalopepursuivant.typepad.com/jackalopepursuivant/2005/11/enjoy.html</a>
          </li>
          <li>
            <a href="http://commonsblog.org/archives/000731.php">http://commonsblog.org/archives/000731.php</a>
          </li>
        </ul>
        <p>
The ultimate answer? I'm imagining a system where people enter their start and end
points and the system on the fly tries to fit you on a van-sized vehicle that's already
going that way right now. Sort of a super traveling salesman type algorithm. No schedules,
minimal stops, no transfers, very few empty miles. That would make for a cool simulation.
It would essentially be like a cab, but without door to door service (traffic light
worth streets) and with the expectation that it is shared but you wouldn't have to
wait as long for it, it would cost a lot less and be more tree-huggie. The system could
perform a cost analysis for each vehicle to carry the passenger to their destination
(least wait, lowest transit time, lowest other passenger delay, lowest fuel costs
which should make it avoid using empty or near-empty vehicles.) It should also optimize
for refueling and operator breaks/shift-change. It should automatically account for
wrecks, construction and other sorts of traffic delays. It should try to have the
most route flexibility so it can broaden the on-the-way options. There will be a natural
tendency for people to pre-book a little, but just give a cost for last minute cancellations,
minimal waiting, and missed rides.
</p>
        <p>
Edit: It's called DRT or Demand Responsive Transport (<a href="http://en.wikipedia.org/wiki/Demand_responsive_transport">http://en.wikipedia.org/wiki/Demand_responsive_transport</a>)
</p>
        <img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=a5594aa7-d956-4e7b-b842-f120236d4e3b" />
      </body>
      <title>/pub/trans</title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,a5594aa7-d956-4e7b-b842-f120236d4e3b.aspx</guid>
      <link>http://freachable.net/2008/05/08/pubtrans.aspx</link>
      <pubDate>Thu, 08 May 2008 06:56:05 GMT</pubDate>
      <description>&lt;p&gt;
I've tried out the bus some more.
&lt;/p&gt;
&lt;p&gt;
It has been an okay experience, but&amp;nbsp;it would really make it more convenient if
they had more buses with consistent routes. I should be able to plan my trip by looking
at a map. I shouldn't have to consult a schedule and time trips and worry about missing
a connection.
&lt;/p&gt;
&lt;p&gt;
I was going to complain about busses that never came (twice), busses that came too
early (as much as six minutes), busses that run too late (as much as 10 minutes) and
make me miss connections, but all that would be no biggie if there were just more
busses.
&lt;/p&gt;
&lt;p&gt;
There's a built in inefficiency that comes from running on a schedule - the schedule
has to be built on a timeline that the bus can usually keep up with, so that means
that many times, the bus stops or drives slow so as to not run too early. Dumb.
&lt;/p&gt;
&lt;p&gt;
They should just go as fast as they can with no fixed schedule and only try to to
stay within some range of minutes behind the prior bus - only slowing down to prevent
run-away delay where a late bus gets more late because so many people have stacked
up waiting for it making for more stops on and off. Conversely, a fast bus keeps getting
closer to the bus in front of him because he is less likely to need to stop to pick-up
passengers and so becomes less likely to drop off.
&lt;/p&gt;
&lt;p&gt;
A couple opportunities for optimization exist too. Often a bus stop is just after
an intersection. If the bus is stuck at a red light anyway, it should offer to let
people off there instead as long as there aren't any people waiting at the stop or
bikes/wheelchairs needing to deboard. Also, there should be a way to indicate that
I can get off at this or the next stop. If no one needs to get off at this stop, go
ahead and skip it.
&lt;/p&gt;
&lt;p&gt;
They have some routes with these long articulated busses. Why? Just run twice as many
busses. It will make it more convenient and you can run them faster (because they
carry half the passengers, they'll make fewer stops.)
&lt;/p&gt;
&lt;p&gt;
I'm sure that Valley Metro has as many busses as they can afford (I think they're
about half mill a piece), but I say that more people would ride it if they could rely
on it and&amp;nbsp;it had the same freedom of timing like driving.
&lt;/p&gt;
&lt;p&gt;
I am annoyed by the stupid fare system:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Why would anyone buy the 3 and 7 day local passes? They are consecutive day passes
that are exactly 3 or 7x as expensive as a one day pass. I'm convinced this is some
lame strategy for handling $5s, $10s and $20s - take their money and an extra $2.50
for not having exact change. 
&lt;li&gt;
Why can't I buy any number of one day passes? If all I have is a twenty when I walk
up to a bus, I should be able to just get 8 one day passes with one being for today
and the others for use any other day. Better yet, I get one card with 8 days loaded
on it. For the holders info, the reader should mark the card to indicate days bought
and a mark for each day spent so the rider can know when it'll be empty. 
&lt;li&gt;
Why can't I purchase and print passes online? Encode a number, print a bar code, sync
numbers each night, if someone frauds it (prints and uses multiple copies), charge
them or blacklist the card and name. You wouldn't be able to print and use for the
same day, but that wouldn't be so bad - at least I'm not stuck waiting for the postal
mail.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
It's all pretty clearly set up to try to take your money. It's not even subtle. I
suspect this has the opposite effect. Give someone a slight discount and the convenience
and I think they'll buy more. I might not take the bus because I don't have exact
fare. If I got, say, 10 one-day passes for $20, I would be encouraged to buy that
for the discount and encouraged to use them because I have them already. (There's
a natural decrease in perceived value of money already spent and so a higher readiness
to spend it. It's why arcades use tokens.)
&lt;/p&gt;
&lt;p&gt;
Finally, I'm annoyed by the handcuffed bus they're putting in. They call it light
rail, but it's just a skirted trolley that's slower, has fewer stops, more expensive,&amp;nbsp;isn't
flexible and hogs two lanes of traffic 24/7. It also hoses up left turns and cross
street traffic. And the price? 1.4 Billion! At 20 miles of track, that's over $1100
per linear inch. I think that's about $4.6 per square inch given two ten foot wide
lanes. You could cover it in a three layers of twenty dollar bills for that money.
According to their docs, expected ridership goes from 26,000 to 50,000/day over ten
years - so over ten years, they'd have to charge every rider over $10 for each ride.
I didn't count for interest because it is claimed that financing costs are part of
the 1.4G$. I'm not sure this bargain counts for the operating cost. For the money
you can buy busses for the length of the track. Not bus service, you could buy enough
busses to park end-to-end for 20 miles!
&lt;/p&gt;
&lt;p&gt;
Here are&amp;nbsp;some others annoyed by light rail:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.coyoteblog.com/coyote_blog/2006/12/i_dont_get_ligh.html"&gt;http://www.coyoteblog.com/coyote_blog/2006/12/i_dont_get_ligh.html&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://jackalopepursuivant.typepad.com/jackalopepursuivant/2005/11/enjoy.html"&gt;http://jackalopepursuivant.typepad.com/jackalopepursuivant/2005/11/enjoy.html&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://commonsblog.org/archives/000731.php"&gt;http://commonsblog.org/archives/000731.php&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The ultimate answer? I'm imagining a system where people enter their start and end
points and the system on the fly tries to fit you on a van-sized vehicle that's already
going that way right now. Sort of a super traveling salesman type algorithm. No schedules,
minimal stops, no transfers, very few empty miles. That would make for a cool simulation.
It would essentially be like a cab, but without door to door service (traffic light
worth streets) and with the expectation that it is shared but you wouldn't have to
wait as long for it, it would cost a lot less and be more tree-huggie.&amp;nbsp;The system&amp;nbsp;could
perform a cost analysis for each vehicle to carry the passenger to their destination
(least wait, lowest transit time, lowest other passenger delay, lowest fuel costs
which should make it avoid using empty or near-empty vehicles.) It should also optimize
for refueling and operator breaks/shift-change. It should automatically account for
wrecks, construction and other sorts of traffic delays. It should try to have the
most route flexibility so it can broaden the on-the-way options. There will be a natural
tendency for people to pre-book a little, but just give a cost for last minute cancellations,
minimal waiting, and missed rides.
&lt;/p&gt;
&lt;p&gt;
Edit: It's called DRT or Demand Responsive Transport (&lt;a href="http://en.wikipedia.org/wiki/Demand_responsive_transport"&gt;http://en.wikipedia.org/wiki/Demand_responsive_transport&lt;/a&gt;)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=a5594aa7-d956-4e7b-b842-f120236d4e3b" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,a5594aa7-d956-4e7b-b842-f120236d4e3b.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=bd93b7b6-748b-4df2-b2ec-6b133bfd82a4</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,bd93b7b6-748b-4df2-b2ec-6b133bfd82a4.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,bd93b7b6-748b-4df2-b2ec-6b133bfd82a4.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=bd93b7b6-748b-4df2-b2ec-6b133bfd82a4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I just noticed that you can use a regular SharePoint calculated field to create a
calculated Url or email address. If the result of your calculated field contains
text that looks like a url or an email address, SharePoint will render it as such,
&lt;a&gt; wrapping it. This is the same behavior as regular text fields. Nifty.
</p>
        <img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=bd93b7b6-748b-4df2-b2ec-6b133bfd82a4" />
      </body>
      <title>SharePoint Calculated Fields</title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,bd93b7b6-748b-4df2-b2ec-6b133bfd82a4.aspx</guid>
      <link>http://freachable.net/2008/05/02/SharePointCalculatedFields.aspx</link>
      <pubDate>Fri, 02 May 2008 18:28:38 GMT</pubDate>
      <description>&lt;p&gt;
I just noticed that you can use a regular SharePoint calculated field to create a
calculated Url or email address.&amp;nbsp;If the result of your calculated field contains
text that looks like a url or an email address, SharePoint will render it as such,
&amp;lt;a&amp;gt; wrapping it. This is the same behavior as regular text fields. Nifty.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=bd93b7b6-748b-4df2-b2ec-6b133bfd82a4" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,bd93b7b6-748b-4df2-b2ec-6b133bfd82a4.aspx</comments>
      <category>SharePoint</category>
    </item>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=c5b9fb76-4c68-44b4-8588-2ce4e43fb9a8</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,c5b9fb76-4c68-44b4-8588-2ce4e43fb9a8.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,c5b9fb76-4c68-44b4-8588-2ce4e43fb9a8.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=c5b9fb76-4c68-44b4-8588-2ce4e43fb9a8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
For anyone trying to fix random reboot problems with your d-link WBR 2310, I have
the solution:
</p>
        <p>
Stop what your doing and throw it away. Seriously.
</p>
        <p>
I was going to buy a Linksys WRT54GL, but I didn't want to wait. Couldn't get it at
Fry's. I got a Belkin F5D9230 from Target. Why Belkin? Because they haven't failed
me yet (well, because I haven't bought a router from them before). Why Target? I don't
like Best Buy and Target has a more liberal return policy.
</p>
        <p>
The setup was easy once I peeled off those pesky stickers telling me to read the manual
(pfft.) and install the software (as if). I gave it the freshest firmware, configured
it and it is running great. Momentary flail: Had to reboot my cable modem. Other than
that, it's all good. Really good range.
</p>
        <img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=c5b9fb76-4c68-44b4-8588-2ce4e43fb9a8" />
      </body>
      <title>D-Link WBR-2310: Problem solved</title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,c5b9fb76-4c68-44b4-8588-2ce4e43fb9a8.aspx</guid>
      <link>http://freachable.net/2008/04/28/DLinkWBR2310ProblemSolved.aspx</link>
      <pubDate>Mon, 28 Apr 2008 05:34:56 GMT</pubDate>
      <description>&lt;p&gt;
For anyone trying to fix random reboot problems with your d-link WBR 2310, I have
the solution:
&lt;/p&gt;
&lt;p&gt;
Stop what your doing and throw it away. Seriously.
&lt;/p&gt;
&lt;p&gt;
I was going to buy a Linksys WRT54GL, but I didn't want to wait. Couldn't get it at
Fry's. I got a Belkin F5D9230 from Target. Why Belkin? Because they haven't failed
me yet (well, because I haven't bought a router from them before). Why Target? I don't
like Best Buy and Target has a more liberal return policy.
&lt;/p&gt;
&lt;p&gt;
The setup was easy once I peeled off those pesky stickers telling me to read the manual
(pfft.) and install the software (as if). I gave it the freshest firmware, configured
it and it is running great. Momentary flail: Had to reboot my cable modem. Other than
that, it's all good. Really good range.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=c5b9fb76-4c68-44b4-8588-2ce4e43fb9a8" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,c5b9fb76-4c68-44b4-8588-2ce4e43fb9a8.aspx</comments>
      <category>Hardware</category>
    </item>
  </channel>
</rss>