Lance's TextBox

About Me       - Also see my RSS simple services site.

  Home  |   Contact  |   Syndication    |   Login
  510 Posts | 7 Stories | 379 Comments | 258 Trackbacks

News

Lance Robinson is a product manager and software developer in Durham, Chapel Hill, Raleigh, and surrounding areas. More about Lance.

 Subscribe Add to Technorati Favorites

 

 

 

 


 

 

Search My Blog:

 

 

Twitter












Tag Cloud


Archives

Post Categories

Blogs

Miscellanous

Noteworthy Stuff

Popular Posts

Tuesday, June 30, 2009 #

RSSBus (@rssbus) is promoting a "limited time offer - one per company" free 10-user site license for the RSSBus SharePoint Web Part.  I don't know how long it will be available, but here is the link.

The timing of this offer is quite nice for me since I have started the blog post series "10 DIY SharePoint Web Parts".

Tags: SharePoint, RSSBus, WebPart


picturerotatorThis post marks the beginning of a series of postings, containing examples of SharePoint WebParts that anybody can build all by themselves.  After that intro you’re probably already wondering what the catch is, and yep, there is one.  These examples will require the use of the highly acclaimed RSSBus SharePoint WebPart

To read all posts in this series, or to get started with the RSSBus WebPart, go here.

 And now…let’s get on with it!

#1 – SharePoint Image Rotator

Step one is to make sure you have the RSSBus Web Part installed.  See here for instructions.

Step two, choose your images and upload them to a Picture Library.  This should be a Picture Library that is located within the same site that you plan to add the RSSBus Web Part to.  If you need to use a Picture Library that is located in a different site, that can be done as well but is a bit more complicated.

Finally, step three, add the RSSBus WebPart to your page and paste the following template into its source editor.  This template might look a little scary, but don’t worry – its not going to bite.

<!-- Set the Picture Library that you want to use  -->
<rsb:set attr="list" value="Picture Library" />

<!-- Call the spListItems operation, save the results. -->
<
rsb:call op="spListItems" save="pictures" />

<!-- Call the feedRandom operation to randomize the saved spListItems results -->
<
rsb:call op="feedRandom?feed=[[_feeds.pictures | urlencode]]" pagesize="1">
<!-- Output the image as html -->
<img src="[[sp:url]]" width=”150px” border="0" align="right" />
</rsb:call>

Like I said, this template might look a little scary, but its not.  Just paste it into the source editor, change "Picture Library” to the name of your library, and yes, we’re already done!  For best results, size the pictures before uploading them to your library and delete the width=”150px” setting from the img tag in the HTML.

 

See all posts in this series:  10 DIY SharePoint Web Parts.
Browse RSSBus Connectors.
Basic RSSBus Scripting Cheat Sheet.

 

Tags: , ,

Saturday, June 27, 2009 #

I got the email below yesterday from the folks at "All About Beer" magazine - those that host the yearly Beer Festival in Raleigh and Durham.  I don't know about you - but I don't want to my favorite small micro-breweries knocked out of business due to unfair taxation.  We're already paying enough taxes on beer and wine.

If you are a citizen of North Carolina, I would ask that you take a minute to do the two quick things suggested in the email.  Thanks!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Stop Unfair Beer Taxation In North Carolina
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dear LANCE,

The cost of your favorite beer will jump significantly if a proposed beer tax is instituted. Our passion and our brewery friends are being unfairly singled out by the governor and you can stop it with just a little bit of effort.

Governor Perdue is planning to impose a greater 'sin tax' on beer and wine.  (She initially pushed to almost double the level of excise tax.)  Please go on line and e-mail the governor and your legislators to tell them that a beer and wine tax increase is a bad idea.

Beer and wine lovers are not "sinners," nor we did not cause the recession, and we should not be singled out as a solution.
Many of the 100 North Carolina micro breweries and wineries could be put out of business with a tax increase.
North Carolina has 6th highest beer tax in the country and the 16th highest on wine.
North Carolina beer and wine taxes currently contributes close to $3 billion.
North Carolina already generates more beverage tax than more populous New York state!

I'm asking you to do two things. 

First, please go to www.governor.state.nc.us and the 'Contact Us' link, where you will find a space to enter a comment, like "Don't threaten our fledgling brewing industry with a tax increase.  We're already paying more than our fair share."  You can also go to www.ncleg.net   Enter your zip code to find your legislators and send them an e-mail.  This is a zip plus four.  If you don't know yours, use the county feature to get your representatives' addresses.

Second, please go to www.stopthencbeertax.com.  Fill this in and it will be printed and collated with other forms and hand delivered the the appropriate elected official.

Doing both of these things will make a huge difference.  Please pass this along to your beer-loving network.  This is urgent. 

Cheers,

Daniel Bradford
Publisher


Monday, June 08, 2009 #

I have been free of my monstrous cable tv bill for many months now, and I love it!  Woooo!  A while back I posted about how I want to get revenge on Cable companies by helping as many people as I can kill their cable service in favor of free HD tv over the air and over the Internet.

There are other “free TV” guides on the Internet – but they suck because they are too generic, too technical, or not technical enough.  Hopefully this one doesn’t suck.  Let me know if you have any questions – if you tell me that you are going to cancel your cable tv service, I will answer all your questions.

Over the Air HD

Most people (including me until not long ago) don’t realize that tv stations all over the place are broadcasting over-the-air (OTA) HD signals, and that the quality of those signals can be better than what you can get over cable or satellite (because these OTA signals don’t use all the lossy compression that cable and satellite signals do).  Buying a UHF digital antenna, available at your local hardware store or online, will allow you to pickup these signals, for free.  Of course you won’t be able to pick up cable networks like TNT, ESPN, MTV, and Comedy Central with this – instead I just get whatever signals are broadcast in my geographic location.  In my case those are FOX/HD, CBS/HD, NBC/HD, ABC/HD, PBS/HD, CW/HD, WRDC/HD, and some spanish channels.  Sweet! 

The OTA antenna gives me access to HD pictures from all the major networks:  FOX, CBS, NBC, ABC, PBS, plus the CW (whatever that is) and WRDC which is a local network.  This pretty much covers most of the tv shows that I watch, except a few that come on cable channels like Good Eats, Colbert Report, Daily Show, Psych, Monk, and a few others I’m not willing to mention.  But, don’t stress.  Most of those other shows I can catch online.  More on that later in this post.

There are three criterion to consider when purchasing a digital antenna:

  1. Range: You can get short-range, mid-range, and long-range antennas.  To decide which you should get, visit antennaweb.org, enter your address, and it will show you all the broadcasting networks in your area, and how far away they are, and what kind of range your antenna will need.
  2. Mounting:  Antennas can be tv-side, atic mounted, or roof mounted.  For best results you’ll want the roof mount, for which you’ll probably want to get a pro to mount it for you (ask at your local hardware store and they can probably handle that job for you).  I personally have my DB4 antenna mounted in my attic, and it does a fine job for me.  The tv-side antennas, like the Philips PHDTV1 Silver Sensor, sit right on top of or beside your tv and do a good job for short range signals.
  3. Directional/Multi-Directional:  If you purchase a directional antenna, you’ll have to point it in the direction in which you want it to pick up signals.  If you purchase a multi-direction antenna, no pointing is necessary, it will pick up signals from all directions.  Obviously I recommend multi-directional.

Internet TV

Many people don’t have an interest in Internet TV because they don’t want to watch tv on their laptop or on their desktop computer.  That’s completely understandable.  But most of those people don’t realize that it is extremely easy to connect your computer to your tv!  You can take this as far as you want to go – from literally just connecting the computer video output to your tv, to having a dedicated computer sit next to your tv, to adding a remote control to your computer, etc.

  1. Basic Setup

    For the basics, all you need is one of those cables that people use every day to connect their computer to their computer monitor (this is called an RBG cable).  Most televisions purchased in the last 10 years will have a connection on the back for such a cable.  Just connect the two, and use your television remote to put it into “PC Input” mode.  At first you may not see anything, but on your computer look for the function key (Fnc) and the F8 button.  Pressing Fnc and F8 simultaneously should toggle the computer through its possible output modes – including the one that outputs to television output.  F8 is commonly labeled “crt/lcd” or something similar.

     

  2. Advanced Setup

    If you want to get a little more nerdy with your setup, you’ll want a dedicated PC for your tv (aka, a DVR or PVR).  There are a lot of choices here, but since most people are comfortable with Windows, probably the easiest solution is just to buy a cheap PC with Windows Media Center pre-installed on it (ie Vista Home Premium, which comes with Windows Media Center).  This will not only give you convenient access to the Internet from your tv, but you can also connect a digital antenna to this PC and get free HD over the air.  Media Center PC’s usually come with one tv-tuner card, but you can add one or more additional tv tuner cards.  When you buy another tv tuner card, you’ll most likely get a remote control bundled with it.  I also recommend a wireless keyboard for browsing the net, something compact that you can hide away in a coffee table drawer or beside the couch.  If you just want somebody to tell you exactly what to buy, let me know and I can talk you through a shopping list.  There’s more on setting up your own DVR later in this post.

  3. Content

    There are many choices for watching fresh television content online.  Network websites, Hulu.com, Amazon UnBox, etc.

    a.  TV Network/Channel Websites: All of the major networks and channels provide on-demand viewing for many of their top shows, including NBC (The Office, etc), ABC (LOST, Grey’s Anatomy, etc), FOX, and CBS.  CBS is the worst, they only provide 1 or 2 episodes at a time, if any.

    b.  Hulu.com.  My new favorite website of all time.  Hulu.com lets you view an unlimited amount of free tv and movies.  The quality of the content here is great!  On Hulu you can watch The Office, Daily Show, Colbert Report, Family Guy, and many many more.  You can create an account, and “subscribe” to television shows, so that when a new episode airs it will be added to your queue.  Thank you Hulu!  I love you and will cherish all of your advertisements.

    c.  Amazon UnBox – ok, this one is not free.  But, you can purchase entire seasons (or single episodes) of television shows.

    d.  NetFlix – if you already have a NetFlix account, you can watch an amazing amount of content for free over the Internet through Netflix’s “Instant” play-now functionality.  This includes movies and television show seasons that have already been released on DVD.

Free DVR

If you’re into setting up something more advanced, you’ll want to setup your own DVR.  I built a dvr out of some spare parts from an old PC and a few purchases from Tiger Direct.  I got a second one buy just buying a cheapo Vista Home Premium (which comes with Windows Media Center), also from Tiger Direct. 

What you want in a DVR:

  1. A nice graphics card, but you don’t need anything special.  Contrary to popular belief, whatever comes pre-installed on the PC is probably enough! 
  2. SATA hard drive.  You’ll want a SATA drive.  I recommend two.  One for your OS and software, and one dedicated to tv tuner recordings. 
  3. Lots of ram.  Its cheap, so you may as well stock up for best performance.
  4. Vista home premium pre-installed.  Vista Home Premium, which comes with Windows Media Center, works great and requires almost zero setup time to get started!  If you are afraid of Vista, you can go the XP route as well.  Also, I hear great things about the Windows 7, the successor to Windows Vista.

Other Options

  1. Internet service provider:  AT&T offers high speed DSL service.  Currently high speed DSL is not available in my area, so for now I will stick with Road Runner for my Internet connection.  Verizon also has high speed service in some areas.
  2. DVD only.  Many people are killing their tv watching completely except for purchasing full season DVD’s of television shows they want to watch.  If you go this route, I recommend a Netflix plan.

 


Thursday, June 04, 2009 #

An update to the IMAP ACL Manager has been published.

Release Information June 4th, 2009 - Release V2.5:
  • Added check/un-check all box
  • Verify through UI that permission change applies to subfolders
  • Added status bar and "busy" indicators
  • Bug fix: logoff and re logging on resulted in folder tree not showing.
  • Bug fix: avoid "busy performing current action" errors.

You can manage user permissions in Exchange and other mail servers with the same commands by using the IMAP protocol instead of server-specific tools.  Here is how!

Jumping right in, these all use get-imap and set-imap from NetCmdlets:

#1 – Get ACL Here’s a one-liner to get the ACL for a specific folder in an account. In this particular case, my main INBOX has a subfolder named RESUMES, and I want to see who has what permissions to this folder.

 

PS C:\> get-imap -server $mymailserver -cred $mycred -folder INBOX.RESUMES -acl                                                  

Mailbox Rights User
------- ------ ----
INBOX.RESUMES lrswipcda lancer
INBOX.RESUMES lrswipcd sahils
INBOX.RESUMES lrswipcd derekm
INBOX.RESUMES lrswipcd johnh
INBOX.RESUMES lrswipcd robc
INBOX.RESUMES lrswipcd blakeb


PS C:\>

 

Of course, the permissions are:

l=look, r=read, s=keep, w=write, i=insert, p=post, c=create, d=delete, a=administer. For more information on those and what they mean, check the NetCmdlets documentation or the server documentation.


 

 

#2 – Set A Complete List of User Rights - Now I want to set the rights of the user derekm to a specific list of rights. In this case I want to set his rights to only l and r (look and read). I don’t want him to be able to insert, move, delete, etc, emails (resumes) from this folder. To set the list, I just specify the rights as a string, ie:

 

PS C:\> set-imap -server $mymailserver -cred $mycred -folder INBOX.RESUMES -acluser derekm –acl “lr”                                
PS C:\> get-imap -server $mymailserver -cred $mycred -folder INBOX.RESUMES -acl | ?{$_.User -eq "derekm"}

Mailbox Rights User
------- ------ ----
INBOX.RESUMES lr derekm


PS C:\>

 

Here, using set-imap I just specify the user that I want to modify the rights of (-acluser) and the rights I want that user to have (-acl).


 

 

#3 – Remove A Specific Right from a User – To remove a specific right from a user, I can do that by using the “-“ prefix. For example, If I decide that johnh should not have delete rights in the folder:

 

PS C:\> set-imap -server $mymailserver -cred $mycred -folder INBOX.RESUMES -acluser johnh -acl "-d"                    
PS C:\> get-imap -server $mymailserver -cred $mycred -folder INBOX.RESUMES -acl | ?{$_.User -eq "johnh"}

Mailbox Rights User
------- ------ ----
INBOX.RESUMES lrswipc johnh


PS C:\>

 

Now instead of setting a complete list of rights, as in #2, I’d just removed one specific right.


 

 

#4 – Add a Specific Right to a User – If I want to add a specific right to a user, I can do that by using the “+” prefix. For example, if I want to add the delete right back to johnh:

 

PS C:\> set-imap -server $mymailserver -cred $mycred -folder INBOX.RESUMES -acluser johnh -acl "+d"                    
PS C:\> get-imap -server $mymailserver -cred $mycred -folder INBOX.RESUMES -acl | ?{$_.User -eq "johnh"}

Mailbox Rights User
------- ------ ----
INBOX.RESUMES lrswipcd johnh


PS C:\> get-bufferhtml > C:\test.htm

 


#5 – Remove All Rights from a User – To completely remove all rights from a specific user, I have to explicitly remove all ri ghts (using the “-“ prefix). After this, they cannot do anything at all with the folder, or even see the messages in a folder. I’ll remove all of the rights from john:

 

PS C:\> set-imap -server $mymailserver -cred $mycred -folder INBOX.RESUMES -acluser johnh -acl "-lrswipcda"            
PS C:\> get-imap -server $mymailserver -cred $mycred -folder INBOX.RESUMES -acl

Mailbox Rights User
------- ------ ----
INBOX.RESUMES lrswipcda lancer
INBOX.RESUMES lrswipcd sahils
INBOX.RESUMES lr derekm
INBOX.RESUMES lrswipcd robc
INBOX.RESUMES lrswipcd blakeb


PS C:\>

 

Now you can see that john no longer has any rights in the INBOX.RESUMES folder.

In a nutshell, when setting rights, if the ACL parameter value starts with a plus, the rights are added to any existing rights for the identifier. If the ACL parameter value starts with a minus, the rights are removed from any existing rights for the identifier. If the ACL parameter value does not start with a plus or minus, the rights replace any existing rights for the identifier.

Hope this helps!

Technorati Tags: , , ,

Wednesday, June 03, 2009 #

Here is a PowerScript function to automate the process of getting/logging the current number of connections to a particular Web Server.  It will tell you the number of connections for each site on the server, so you can see the number of SharePoint connections, SharePoint Central Admin connections, etc.  Thanks to MOW and Lee Holmes for their examples of using the PerformanceCounter class in PowerShell.

function Get-WebServiceConnections()
{
$results = @{}
$perfmon = new-object System.Diagnostics.PerformanceCounter
$perfmon.CategoryName = "Web Service"
$perfmon.CounterName = "Current Connections"

$cat = new-object System.Diagnostics.PerformanceCounterCategory("Web Service")
$instances = $cat.GetInstanceNames()

foreach ($instance in $instances)
{
$perfmon.InstanceName = $instance
$results.Add($instance, $perfmon.NextValue())
}
write-output $results
}

This will give me output like so:

PS C:\> Get-WebServiceConnections

Name Value
---- -----
_Total 12
SharePoint Central Administ... 1
SharePoint - 80 9
Default Web Site 2




PS C:\> $conns = Get-WebServiceConnections
PS C:\> $conns["SharePoint - 80"]
9
PS C:\>

 

You could set the CounterName to any of the other Web Service counters that are available, to do things like measure incoming and/or outgoing bytes per second, the number of incoming HTTP requests per second, etc.  To see a list of all available counters, use the GetCounters() method of the PerformanceCounterCategory ($cat in the example above, ie $cat.GetCounters(“SharePoint – 80”)).

Also, to get more information, you can use $perfmon.NextSample() instead of .NextValue().  NextSample() will return the enture CounterSample object, including RawValue and BaseValue (used to determine the value returned by NextValue()), TimeStamp, etc.


Tuesday, June 02, 2009 #

Many people configure email alerts in SharePoint through SharePoint Designer Workflows.  The process is simple and useful, here it is outlined at End User SharePoint.  In a nutshell, you create a workflow that sends out an alert, attach the workflow to a document library or list in SharePoint, tell SharePoint to run the workflow whenever the library/list changes.

The options for sending the alert in SharePoint out of the box are limited to sending a plain email.  I want more.  Enter the /n software SharePoint Extensions, a set of customizable actions for use in your workflows.  I have blogged before about using the /n software Email action to get advanced email features like file attachments, authentication, ssl, firewall navigation, delivery receipts, attachments, etc.  But now…  there’s much more.

Specifically, I use the XMPP and SMPP actions to make sure that I know when items in certain lists are changed.  I have several lists that are important, and I want an IM sent over our local Jabber (XMPP) network to me whenever they are changed.  I have one list that is important enough that I want a text message (SMS/SMPP) sent to me whenever it is changed (the picture here is a screenshot of such a message being received on my iPhone), so I know about it no matter where I am at the time.  Here’s how I do this:

First, I make sure that the /n software SharePoint Extensions are installed and activated on the server.  Next, I bring up SharePoint Designer, and create my new workflow.  When it comes time to set the Actions for the workflow, click on “More Actions” and select “/n software ShrePoint Extensions”.  This will list a bunch of actions including one for XMPP and another for SMPP (text messages).  Just choose one, fill in the inputs (server, from address, to address, etc), save the workflow, and voila.

These actions can be customized, too.  Here are instructions for how to customize these actions.


Thursday, May 21, 2009 #

I find that helping people troubleshoot FTP connectivity issues is much easier if they have PowerShell installed.  I can just have them run the NetCmdlets ftp cmdlets with the –debug switch, which displays a trail of information about the communication over the wire.  In this way you can see every command send to the server and every response coming back from the server, including what ports a server is attempting to use for ftp data connections.  Very often ftp transfer connectivity errors are the result of firewall/ftp server configuration error, and being able to see this raw communication without a network sniffer is quite handy.

PS C:\> get-ftp -server $myserver -user myusername –password ******* -debug                                                    
DEBUG: VerbsCommon.Get-FTP started processing.

Confirm
Continue with this operation?
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): a
DEBUG: Info: Connecting to FTP server.
DEBUG: Server: 220 (vsFTPd 2.0.4)
DEBUG: Client: USER myusername
DEBUG: Server: 331 Please specify the password.
DEBUG: Client: PASS *******
DEBUG: Server: 230 Login successful.
DEBUG: Client: PASV
DEBUG: Server: 227 Entering Passive Mode (10,0,1,1,225,79)
DEBUG: Client: LIST
DEBUG: Server: 425 Can’t open data connection.
DEBUG: at nsoftware.NetCmdlets.Commands.Core.cs.a(Int32 A_0)
at nsoftware.NetCmdlets.Commands.GetFTP.DoSSL()

Send-FTP : FTP protocol error: 425 Can’t open data connection.

In the example above, you can see that the get-ftp cmdlet sends the PASV command in order to transfer some data (a directory listing).  The server response to the PASV command shows the ip and port that the client should connect to (10.0.1.1 is the ip address, and (225*256) + 79 is the port).  That IP address (10.0.1.1) is obviously wrong since I am attempting to FTP to a server outside of my local network.  This is one example of a misconfigured FTP server.

Right away, with one PowerShell command, I know the cause of the problem and where to go to fix it.

Technorati Tags: , ,

Tuesday, May 19, 2009 #

The default RSS feeds in SharePoint are very basic and I want them to contain more information.  I managed this by generating my own RSS feeds.  Here is how I did it:

First, install the RSSBus SharePoint WebPart.  After running the setup, go to the Site Collection Features page to activate the Web Part.  In order to create custom RSS feeds, you’ll also need to activate the “RSSBus Service Handler” feature. 

I created a special document library for my feeds, I called it “Really Simple Services”, since RSS feeds can really be thought of as exactly that.  For my first feed, I added a new document to the library and named it sp-rss.rst, with the following contents:

<rsb:info title="My Custom RSS Feed" description="This is my custom RSS feed description" />

<!-- this could also come as input in the URL -->    
<rsb:set attr="list" value="Shared Documents"/>
<rsb:set item="_meta" attr="rss:title" value="Custom SharePoint RSS: [list]" />        
    
<rsb:call op="spListItems" output="out">
  <rsb:push title="[rss:title | def('untitled item')]">
  [out.*]
  </rsb:push>
</rsb:call>

Now I can call this custom RSS feed as you would expect, ie http://myserver/Really Simple Services/sp-rss.rsb. Except when I hit that URL instead of downloading a document, I’ll get an RSS feed.  This example generates an RSS feed out of a specific list, but I can change it so that it generates an RSS feed out of *any* list by getting the list from the URL.  For example:

<rsb:info>
  <input name="list" default="Shared Documents" />
</rsb:info>

<rsb:set item="_meta" attr="rss:title" value="Custom SharePoint RSS: [list]" />        
    
<rsb:call op="spListItems" output="out">
  <rsb:push title="[rss:title | def('untitled item')]">
  [out.*]
  </rsb:push>
</rsb:call>

If I now call the same URL, I’ll still get the Shared Documents.  But if I add a specific list to the URL, I’ll get that list instead, ie: http://myserver/Really Simple Services/sp-rss.rsb?list=Other Documents. The difference in the script itself is that the “list” name has been moved from an rsb:set (hard-coded) to the rsb:info input. 

Technorati Tags: , , ,