Home | Blog | Screencasts | Projects
# Tuesday, October 14, 2008

I previously blogged about using the BDC with MOSS user profiles and how to set that whole process up. Well I thought that I might write a little about the BDC application definition file (ADF) that is imported into MOSS and is used by the BDC to generate the meta-data and to ultimately connect to the data source.

An ADF file contains metadata describing entities and methods to populate those entities.

These are the methods that are of interest to us, all have nice relevant names:

 

IDEnumerator – These methods can perform filtering and can be passed parameters, the idea is that it returns an ID (and a timestamp if possible), as it’s name implies it is used to enumerate all the ID’s (or primary keys). In the context of the profile import, if your key is say, an Active Directory email address, then the IDEnumerator should return the email address field.

Specific Finder – This method accepts an ID and returns just the information related to that ID. You’ll probably create a number of these using different filter descriptors.

 

Now that you have an idea of what the methods are and how they operate you can design web services that are low friction for the BDC.

You’ll need a web service that returns a list of ID’s (for the IDEnumerator), you’ll need a second webservice that accepts the same ID’s that were returned by the first method, this second method will comprise your Specific Finder methods.

Also don’t create trouble for yourself by building webservices that accept a large number of parameters, you’ll regret it, just keep it simple. The guys that developed the fantastic BDC Meta-Man product also have the same advice.

 

I’ve provided the SQL create statement and ADF file here.

Tuesday, October 14, 2008 9:05:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
BDC | code | MOSS
# Monday, October 13, 2008

I’ve put together a screencast that demonstrates how to configure a web application so that it can host MOSS MySites.

 

The basic steps are:

  • Create the web application
  • Create a site collection to be hosted in the newly created web application, make sure this is based on the ‘My Site Host Template’
  • Create a managed path for the MySites
  • Change the MySite settings in the SSP central admin to reflect the URL and managed path that was setup in the previous steps
  • Enable self service site creation so that new MySites are created when the user clicks on the My Site link

The high quality version can be found here or the youtube version:

 

Monday, October 13, 2008 7:48:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
configuration | MySites | Screencast | Sharepoint
# Friday, October 10, 2008

One of the main features of SQL Server 2008 is database backup compression. In SQL 2008 you can now specify the backup as:

BACKUP DATABASE ‘WSSDatabase’

TO DISK = ‘C:\WSSDatabase.bak’
WITH COMPRESSION;

Or if your GUI inclined:

SQL2008Compression

 

This will make managing your content databases a little easier, especially if your already getting heckled by your SAN Administrator or the poor guy trying to backup those 150GB backups.

 

The second feature is Transparent Data Encryption (TDE), this allows you to specify a key that is used for data encryption for example:

ALTER DATABASE ‘WSSDatabase’
SET ENCRYPTION ON;

The scenario where I think this feature works nicely is this; imagine your pay-role people want to store pay details, you could firstly ensure that the site collection they use is located in a nominated content database, then you could turn on the encryption and have another secured means of protecting your data.

 

Further information can be found here.

 

Those two features are pretty compelling, on all our new deployments we are recommending SQL 2008.

Friday, October 10, 2008 8:45:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
Sharepoint | SQL 2008
# Thursday, October 09, 2008

I’ve put together a screencast that shows how to use your data from an external source such as a SQL Server database and combine it with your user profiles.

The screencast shows how to:

  • Import the application definition to setup the BDC application
  • Setup a custom import connection of type business data catalog and how to set the key between active directory account and BDC data
  • Setting up custom profile property section (the example is cricket statistics)
  • Setting up custom profile properties that import data from the BDC data source
  • Start a full import
  • Perform a search which returns the user and show the new data that is displayed in the users profile page.

A good quality version of the screen cast can be found here (4 mins).

 

Or the low quality youtube version:

 

Thursday, October 09, 2008 11:01:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [1] - Trackback
Screencast | Sharepoint | BDC
# Wednesday, October 08, 2008

The question was asked:

How do I load up an XSLT from the style library like:

 

   1: XslCompiledTransform xslTransform = new XslCompiledTransform();   
   2: xslTransform.Load("/styles/file.xslt");  

 

When I do this I get a (401) unauthorized exception

 

Answer

You need to use an XmlUrlResolver and populate the credentials property like:

   1: XmlUrlResolver resolver = new XmlUrlResolver();   
   2: resolver.Credentials = CredentialCache.DefaultCredentials;   
   3:   
   4: XsltSettings settings = new XsltSettings(true, true);   
   5: transform.Load(XSLTUrl, settings, resolver);  

Wednesday, October 08, 2008 10:37:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
Q&A | Sharepoint
# Tuesday, October 07, 2008

Normally I wouldn’t recommend bulk creating a MySites, but what if you were bringing ten thousand plus users onto your portal at a single time? Imagine if they all hit the My Site link within a small time frame, would your server melt?

Maybe you would like to bulk create the MySites at a time that suits you to avoid this meltdown.

The following code might help you out:

 

   1: class Program
   2:     {
   3:         static void Main(string[] args)
   4:         {            
   5:             using (SPSite site = new SPSite("http://my.sharepoint.url"))
   6:             {
   7:                 ServerContext context = ServerContext.GetContext(site);
   8:  
   9:                 //initialize user profile manager
  10:                 UserProfileManager profileManager = new UserProfileManager(context);
  11:  
  12:                 //this just creates a mysite for everyone in the profile database                             
  13:                 foreach (UserProfile profile in profileManager)
  14:                 {
  15:                     Console.WriteLine("Creating a Personal Site for " + profile["PreferredName"] + "...");
  16:                     try
  17:                     {
  18:                         profile.CreatePersonalSite();
  19:                         Console.Write("Succcess!\n");
  20:  
  21:                     }
  22:                     catch (PersonalSiteExistsException)
  23:                     {
  24:                         Console.Write("Site already exists!\n");
  25:                     }
  26:                 }
  27:             }
  28:         }
  29:     }

 

It simply iterates through each user profile and calls the CreatePersonalSite() method on each user profile.

 

Of course the other big issue to consider is the impact of the content databases, these should all be created and some thought should be given as to the potential size of these databases. If you say have 10000 users each with 100MB Quota your potentially looking at a 100GB database, which might be a little hard to work with. So you should have an idea of the total number of users, the quota size of each MySite and then setup the content database limits. These values can be viewed from the ‘Content Databases’ Option under ‘SharePoint Web Application Management’ in the Application Management section of central admin:

ContentDatabases

 

The above page will let you control how your sites are distributed across your databases.

Tuesday, October 07, 2008 10:46:00 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
Sharepoint | MySites

I put in an entry into this year’s devsta competition, since the submission display page doesn’t work too well, I thought I’d post the full description of my entry here:

 

Console Connect – The Connected Console

 

What would Facebook like if it was around in the green screen terminal days? Console Connect provides this experience, it's the socially connected console, with ASCII art profile pictures and a friend list that is updated in real time when your friend's status changes or they come online enabling you to keep connected with your friends with real time messaging.

The console is delivered via a Silverlight control which provides the user with 3 rich green screen games: the classic pong game, space invaders and bomb drop. Your high scores are posted to a shared scoreboard for all to marvel.

Nothing says old school like a green screen ... are you ready to get connected?

 

 

ConsoleConnect

 

Once you login to your console session, you are presented your friends list with indicators that let you know when they come online.

You can search for new friends and instantly start following their status and online indicator. If your feeling happy and you want all your friends to know it, then select [1] and enter your status for all your friends to see.

The console supports messages, so you can instant message your friends, simply select the send message [2] menu option and type your message,
your friend will receive the message if they are logged into the console and it will also display next time they login.

To test these features you should open two consoles and login to each as a different user (the user 'demo' and 'sally').

 

 

Space

 

Any good social networking tool needs to have games that users can compete against each other, of course being a green screen application means
that all those fancy graphics are non existent. Select the applications menu [4] and select the [2] space invaders option. Level 1 is pretty easy if you move quickly to the right and attack slowly, level 2+ adds more difficulty when the alien ships start moving.

Your score will be posted to a shared scoreboard, so all your friends will be able to compete with you. Maybe you can find the hidden way to cheat this game?

 

 

 

 

 

 

 

PongAndBomber

 

If space invaders isn't your thing, how about a hard core pong session, this is a game of endurance, how hard core are you about beating your friends score?

The bomb drop game gives you control of a bomber (yes imagination is required ... you still have one? ) that needs to bomb a building. Each miss will take one of your three lives. When you score a direct hit the plane will fly at a higher altitude and the building will move closer. If you keep progressing your aircraft will be fitted with missiles that drop at a faster speed further increasing the challenge.

Again your scores will be posted to a shared scoreboard, your friends can be amazed that you played pong for an hour straight!

Tuesday, October 07, 2008 8:31:40 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [1] - Trackback
Work
# Monday, October 06, 2008

The SharePoint community have a number of useful tools that can aide you in your performance testing of MOSS. The tool that comes to mind is the SharePoint 2007 Test Data Population Tool, this tool can bulk load data into SharePoint. If you click on the Releases tab you will see a release: MOSS Performance Load Tests. This is a series of web tests that can be loaded up into visual studio team system:

 

PerfTesting

 

The visual studio load testing features can simulate multiple users over a period of time all running a defined test mix. In the above image the homepage is hit 9% of the time, whereas the general PageView test which is a broad selection of pages makes up 28% of the test mix. Your test mix will depend on how you perceive your users using the site.

Visual studio has a number of options that you can tweak such as:

  • Browser mix – provides a way to simulate multiple browser types i.e. mobile devices, firefox, IE etc ..
  • Network mix – your test network might not be the same as production, this allows you to test with network limitations in place
  • Load pattern – Constant, Step or Goal based, depending on what your testing, you could hammer your server with a constant load, or you could build up in a controlled manner.
  • Warm up time – You can warm the server up to avoid the initial compile times from impacting your results.

In the example above I’m using the test mix from the Microsoft document: Estimate performance and capacity requirements for portal collaboration environments, you can find other documentation for different portal types here.

Monday, October 06, 2008 9:46:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
Sharepoint | Performance
# Sunday, October 05, 2008

MOSS 2007 has the option to use a dedicated web front end server for crawling content:

Dedicatedcrawler

 

Why would you want to do this:

 

Advantages:

  • Search doesn’t compete with the end users – Large environments that need to crawl constantly can cause more traffic than normal user load, you don’t really want your users to experience slow pages just because your doing an index? By using a dedicated web front end that isn’t part of the load balanced cluster, your indexing won’t impact your users as much (I say as much, because you still need to think about the impacts of the database server).
  • Easy to move the WFE into the load balanced cluster – It’s a rather crude disaster recovery method, but it’s not that hard to move this box into the load balanced cluster if you really need the extra capacity or if one of your other servers fail. After all it’s just a normal web front end, but one that is reserved for the indexer.
  • Perfect place to run a backup central admin – You should always try to have more than one server running central admin (on a large farm anyway), that way if your main central admin server goes down, you still have a way to manage the farm.

 

Disadvantages:

  • More hardware – The obvious disadvantage to having an extra machine is the requirement of more hardware, which also means:
  • More cost – New hardware is an additional cost, but now that you have an idea of the advantages it brings, you can make a more informed decision.

 

 Joel has some other tips such as adding a robots.txt to servers that you don’t wish to participate in the indexing process.

Sunday, October 05, 2008 7:24:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
configuration | MOSS | Sharepoint | Search
Statistics
Total Posts: 191
This Year: 0
This Month: 0
This Week: 0
Comments: 41