Friday, August 15, 2008

A/B and Multivariate Testing Landscape

A new white paper was just released that will be of interest to those of you working in the Analytics arena.  It is a quick read and full of valuable information.

http://img.en25.com/Web/Ascentium/AB%20and%20Multivariate%20Testing%20Landscape_0.pdf

Monday, July 14, 2008

Windows Server 2008 MOSS Development Machine with Hyper-V – Part I

This is the first, in a multi-part ‘series’ on using Windows Server 2008 as your development O/S, and utilizing the recently released Hyper-V functionality to ease SharePoint 2007 development.  Here I’ll cover getting the new Hyper-V running, and in the next part, I’ll cover SharePoint installation, and how you can (hopefully) benefit from Server 2008.

There are numerous reasons to run Windows Server 2008 on your development PC.  Here were the selling points for me:

  • Take advantage of many of the new features of Vista, while still being able to install and run server applications.
  • Performance improvements over Vista due to the extremely modular installation.
  • Stability.
  • Hyper-V performance benefits over Virtual PC

First, Make sure you have supported hardware:

You must be on an x64 based machine, with a CPU that supports hardware virtualization.  Most of the Intel Core 2 Duo’s seem to, as well as AMD’s AMD-V line.

I’m utilizing a Lenovo Thinkpad T60p.

Most machines appear to ship with the CPU hardware virtualization support disabled in the BIOS.  On my Thinkpad I found the settings under Config->CPU.  Also, after you change this setting you must POWER OFF your machine and turn it back on.  Simply resetting the machine does not appear to let the CPU change modes.

How to Setup Hyper-V

Throughout this process, you’ll be rebooting so often that you’ll feel like you are running Windows 95.  I’ll try to streamline things from my experience to save you some time.

From this point forward, assumes you have installed Windows Server 2008 x64 on your hardware, but not yet configured it.

Go download the RTM update to bring your Hyper-V to the final release.  (2008 shipped with a pre-release version)

http://www.microsoft.com/downloads/details.aspx?FamilyId=F3AB3D4B-63C8-4424-A738-BADED34D24ED&displaylang=en

Once the update is installed, you’ll need to restart, and Windows will perform some reconfigurations at both shutdown and startup.

Once you are back, Server Manager should open, if not go ahead and launch it.

In Server Manager,  at the top level, under the “Roles Summary” you currently may not have much of anything.

 image

Go ahead and click “Add Roles” and choose Hyper-V.

image

Follow through the wizard.  The only important thing you’ll need to choose is some information around network adapters.

The role is now added, but isn’t enabled or available.  Go ahead and restart.

image

After some major reconfigurations, you’ll be back, and you’ll see Hyper-V in your Roles Summary.

image

If you’ve ensured your CPU virtualization support was enabled in the BIOS, you can now expand the Hyper-V manager from the Server Manager tree, and right click to “Connect To Server”

image 

Go ahead and connect to localhost.

image

Now when you click your server name, you’ll get an actions menu on the right, and you can click “New” to create a new machine.

image

There is a very nice wizard for setting up your virtual machine.  (Alternatively, you could have attached a preexisting one).

Take note of the installation options section, where you can choose an ISO to install the OS from.  I installed Server 2008 Standard on my first virtual machine, as it is virtualization ‘aware’, and performs very well.  I will later create one for Server 2003 as well, to test on multiple environments.

Make sure you get enough memory allocated!

image

Once you’ve created it you can go ahead and start it:

image

And There she is!

image

image

In the next part, I will discuss installing SharePoint on our Server 2008 virtualized machine, as well as the resulting development workflow.

Friday, July 11, 2008

Configure SharePoint Logs From Code

If you want to configure SharePoint via code you can use the methods available in the Microsoft.SharePoint.Administration namespace.

For example, to configure the Usage Logs:

                SPUsageSettings usageSettings = SPWebService.AdministrationService.UsageSettings;

usageSettings.LoggingEnabled = true;
usageSettings.NumberLogFiles = 5;
usageSettings.LogFilesDirectory = "c:\\logs";
usageSettings.UsageProcessingEnabled = true;

usageSettings.SetProcessingInterval(1, 0, 1, 0);

usageSettings.Update(false);

Wednesday, July 9, 2008

SharePoint as a Platform for Internet Facing Websites

Andrew made a post yesterday that really got me thinking about some of the great successes some big names have had with SharePoint on public facing websites.

In many cases, MOSS has a very compelling story around use as a public website.  The ability to have both internally and externally facing security zones and the benefits it offers to content publishing can be very powerful.  Couple this with other features such as forms services, workflow and search -- And you will often realize that the benefits far outweigh any additional expense in initial development.  In fact, depending on what features you are leveraging, development may be substantially less expensive than other platforms.

Also, lets not forget Microsoft has very modest licensing costs for public facing MOSS sites relative to platforms offered by other vendors.

With this in mind, I've decided to start compiling a list of commercial companies with public facing SharePoint sites.  Hopefully those considering the platform, or unaware of it's capabilities, can use this list to gain some insight into the ways others have been successful on the platform so far.

Some of these sites have undergone extreme customizations to play efficiently on the web, others are far more 'standard'.

Some of these are sites that I've played a role in developing, others were developed by far smarter folks, and three of them came off Andrew's post.  If you have any more, please post a comment and we'll get them included!

  1. http://www.gamesforwindows.com
  2. http://www.oldcastleprecast.com
  3. http://www.hawaiianairlines.com
  4. http://www.onvia.com
  5. http://www.kpmg.com/
  6. http://www.swiss.com/
  7. https://www.ocps.net/
  8. http://www.ascentium.com  (WSS only)
  9. http://www.spinebreakers.co.uk
  10. http://www.ohchr.org
  11. http://www.conservation.org
  12. http://www.sja.ca
  13. http://www.worldvision.ca
  14. http://www.viacom.com
  15. http://www.glu.com/
  16. http://ibiza.ministryofsound.com/
  17. http://www.nppl.com/
  18. http://www.marines.mil/
  19. http://www.stemilt.com/
  20. http://www.kroger.com/
  21. http://eu-shop.swatch.com/
  22. http://www.swissarmy.com/
  23. http://www.volvocars.com/
  24. http://www.lojack.com/
  25. http://www.jabra.com/

Thursday, June 26, 2008

Extranet Hardening - Perimeter Port Requirements

One of the most common extranet scenarios is the back-to-back perimeter model, wherein your entire SharePoint farm lives in the perimeter network with it's own domain controller, while maintaining a trust relationship with the corporate network.

So, the next time someone asks you  "What ports do I need open for Office SharePoint Server?" -- Hopefully you can reference this.

image

Above is a loose diagram of the scenario I'm discussing.  This is a simplified version of a drawing in Microsoft's Extranet Topologies Document.

Between the Internet and the Perimeter network, the following must be available:

Incoming Outgoing Port Description
* * TCP 80 Client Access
* * TCP 443 Client Access (SSL)
  * TCP 25 SMTP, Outgoing email
* * TCP 56737, 56738 (SSL) Office Server Web Services
*   TCP 135 + RPC Port Single Sign-on Service

 

Between the Corporate Network and the Perimeter network, the following must be available:

Incoming Outgoing Port Description
* * TCP 80 Client Access
* * TCP 443 Client Access (SSL)
  * TCP 25 SMTP, Outgoing email
  * TCP 80/443 Content Publishing

 

Additionally, to maintain a domain trust between corporate and perimeter domains you will need tcp/udp 135 (rpc), 389 (ldap), 636, 3268, 3269, 53 (dns), 88, 445 (ds), 789 (kerb)

Please let me know if you have any amendments to this from your experience, and I'll add the information in!

Wednesday, June 4, 2008

Visual Studio Extensions for WSS 1.2 Released

VSeWSS 1.2 was released today, and you can now leverage Visual Studio 2008 to build your SharePoint projects instead of Visual Studio 2005.

http://blogs.msdn.com/sharepoint/archive/2008/06/04/announcing-the-vsewss-version-1-2.aspx

It also appears the SharePoint team has launched a new development oriented site with documentation, samples, videos, and a fully prepared development VPC.

http://www.mssharepointdeveloper.com/

The site is cosmetically very attractive, although it seems to have a bit of a marketing spin to it as opposed to helping developers.  Oh, and it's not based on MOSS.   The VPC download and some of the "Did You Know?" items there are really great though!

Thursday, May 15, 2008

Content Editor Web Part JavaScript Error

After installing SharePoint (MOSS) SP1, I ran into a problem with many of my Content Editor Web Parts (CEWP) wherein when you press 'edit' instead of showing the nice toolbar, you get a javascript error.

image

"Object does not support this property or method"  on line 169.

I debugged the javascript using Visual Studio, and it was immediately apparent that a string cast was needed in line 168 of assetpicker.js.

You can find this javascript file here:

Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033\assetpicker.js

The area of code in question looks like this:

    for( var i in propArray )
{
var nameValuePair=propArray[i].split("=");
if(nameValuePair.length==2)
{
objectToPopulate[nameValuePair[0]]=decodeURIComponent(nameValuePair[1]);
}
}


The line in question is where the variable 'nameValuePair' is created, and assigned the value from propArray[i].split("=").  The members of propArray aren't strings, and as such the split command isn't available.



Change that one line to use a javascript string cast.  Which can be done by wrapping "String(...)" around the array.  (In red below)



    for( var i in propArray )
{
var nameValuePair=String(propArray[i]).split("=");
if(nameValuePair.length==2)
{
objectToPopulate[nameValuePair[0]]=decodeURIComponent(nameValuePair[1]);
}
}


That change is on line 168.  Try making it in the javascript, and clear your temporary internet files/browser cache, then revisit your SharePoint site.  The toolbar should show up now.