Home | Blog | Screencasts | Projects
# Friday, October 31, 2008

With little effort you can make your site a little more search friendly, it’s possible to embed some xml into your site which your browser can use in its search box. Most modern browsers support OpenSearch, which is what this xml fragment is using.

 

The first step is to create the following xml, but replace the bits that are specific to your site:

 

   1: <?xml version="1.0" encoding="UTF-8"?>  
   2: <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">  
   3:     <ShortName>SharePoint Search</ShortName>  
   4:     <Description>Search for SharePoint</Description>  
   5:     <Url type="text/html" method="get" template="http://YourSite/SearchCenter/results.aspx?k={searchTerms}"/>  
   6:     <Image width="16" height="16">http://YourSite/favicon.png</Image>  
   7:     <InputEncoding>UTF-8</InputEncoding>  
   8:     <SearchForm>http://YourSite/SearchCenter/</SearchForm>  
   9: </OpenSearchDescription>  

 

In the master page, you will need to refer to this xml file:

 

   1: <link rel="search" type="application/opensearchdescription+xml" href="/Style%20Library/OpenSearch.xml" title="SharePoint Search">    

 

Finally you can drop down the search provider box in your browser to select your new search provider, there is no need to browse to the search centre again.

 

image

 

Little things like this can help entrench searching as the primary navigation method in an organisation.

Friday, October 31, 2008 12:18:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
Search | Sharepoint | Tip
# Tuesday, October 28, 2008

So last week I rebuild my work laptop, previously it was running Windows XP with 2GB of RAM. These days I’m almost always running a virtual machine running some form of SharePoint and I would constantly get frustrated with the performance of my laptop.

I did some pricing and found that 4GB of laptop RAM was around $110, I was shocked, so I headed down to the shop to pick it up. I knew that if I continued using a 32 bit OS that I wouldn’t be able to take full advantage of all the RAM.

 

xp

 

So my next step was to upgrade to 64 bit Vista, I grabbed my MSDN disk with Vista x64 SP1 and installed, I wasn’t to sure how it would go installing all of the 64 bit drivers for my Dell Latitude D630, but it turns out that Dell has great support for 64 bit, I downloaded them all and had a fully functional system in no time. As anyone who knows me will tell you that I’m a huge Vista fan, I really missed having all the cool Vista features on my work laptop, it really does feel to me that I’m more productive on a Vista machine.

So now a week later I wish I had upgraded sooner, I can now run two virtual machines both with 1GB of RAM allocated to them, but best of all I can swap between applications very smoothly.

Just for giggles this is what I see now:

 

image

Tuesday, October 28, 2008 10:00:00 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
Tip

The BDC isn’t just limited to data located in a database, it’s most powerful feature is its ability to call webservices. I previously posted a brief description of the types of webservices are easily consumed by the BDC.

The key to easily calling webservices from the BDC first starts with an understanding of the types of methods that the BDC supports:

  • Finder 
  • Specific Finder
  • IDEnumerator

If we take the common example of getting customers from a webservice we might can start thinking about the way we create the webservice so that it doesn’t become a painful exercise.

The first method we should think about is something that can return the primary key (or ID) of our data:

So a method like:

GetCustomerIDs  - This will return customer ID’s and will become our IDEnumerator

So the BDC will next need a method that will accept an ID that was returned by our GetCustomerIDs method above.

GetCustomerByID  - This will become a Specific finder method, the naming ‘specific’ really gives the game away, it’s specifically returning data based on an ID.

The final method is a generic finder method that can be used by the Business Data List webpart:

GetCustomers – This becomes a finder method, we can have more of these methods with each one returning a different subset of data as needed.

 

It’s fairly easy to now create a BDC Application Definition File (ADF) using a tool like BDC Meta-Man. But you also need to remember that the ADF references a .NET assembly. This assembly is the proxy to the webservice, this proxy is the exact same proxy that we get automatically generated for us by Visual Studio when we add a web reference.

So you can create a proxy that will be used by the BDC, you just create a web reference in visual studio and compile that into a signed assembly and make sure the ADF references this assembly correctly.

Once you perform the two steps of creating the ADF and corresponding proxy classes, your well on your way to using the BDC via webservices.

Tuesday, October 28, 2008 1:10:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
BDC | MOSS
# Sunday, October 26, 2008

You may have noticed in your coding adventures that some column names have had the spaces replaced with _x0020_. To understand why this is happening a little background is needed, a site column has two types of ID’s, the first is a unique name and the second is a unique ID. The ID is a GUID, however the unique name has two parts, the internal name and the display name, it is the internal name that has it’s space characters replaced with the hex value of the HTML space character: %20.

Now that you know why this happens, the way to prevent the _x0020_ characters using the web UI is to firstly create the column without any spaces (this will create the ID and the unique name), then after it has been created, you can go back and rename it (this will just updated the display name).

Sunday, October 26, 2008 10:09:00 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [1] - Trackback
Sharepoint | Tip
# Thursday, October 23, 2008

I read with interest Arpan’s article on Finding and Growing Great SharePoint Talent which covers the topic’s of developing and keeping great SharePoint talent in a broader context. I’m mostly concerned with the developer role, so I’ll focus on that.  

 

The Interview

The thing to extract here is their level of exposure to ASP.NET, depending on what role you want them to take in your SharePoint development you would at least want them to have a good grasp of ASP.NET. You really don’t want to spend time training them up on concepts that are generally related to ASP.NET development.

The next thing you should look for is their attitude towards SharePoint administration, the key to becoming an awesome SharePoint developer is knowing the product, if you want a developer to just develop some web parts then having a deep understanding of the product might not be needed, but if your looking for someone to tackle a wide range of SharePoint development tasks they need a broad understanding. I mean how can you develop a personalised web part if they can’t setup a development environment properly? or how can they build a feature or solution if they have no idea how they are used. Some developers will cringe at the thought of admin / setup work, but the fact is, it’s the best way to become familiar with the product.

 

On the Job - Day One

So you’ve picked someone who is going to become your superstar SharePoint developer, where do you start now? Do you leave them alone with a stack of books and training material? or do you throw some code at them and say start typing? There is no correct answer, each developer learns in a different way, you just have to work out what that way is. It’s probably not a huge stretch to start with the familiar topics like web parts but only after the developer has in fact used the SharePoint UI.

 

As time passes

Once the developer has done some admin and bits of development, they will start to speak and understand the SharePoint vocabulary, don’t expect them to instantly know the answer to all your development questions, even the seasoned developers need time to investigate the solutions, SharePoint is such a large product it’s not an easy task to know everything, but once you digest the core concepts a lot of stuff can be inferred and it gets easier to grasp new SharePoint related ideas. You’ll probably find that your administrators look to your developers at the first sign of trouble, which is another reason why your developers should experience the SharePoint world from an administrative perspective.

 

So in summary, I think ASP.NET skills provide the best leg up to SharePoint development combine that with someone prepared to sit and learn some administrative / setup tasks and you have the makings of a great SharePoint developer.

Thursday, October 23, 2008 9:31:00 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
Sharepoint

One of the cool things that MOSS offers is the ability to display the people search results ordered by social distance. You can see what result format was returned by looking at the search action links web part:

 

socialdisresults

The default people search results view can be changed in the Core results web part:

 

coreresultswp

 

The MSDN SharePoint blog has a detailed post which outlines how the colleague connections are formed:

  • Immediate colleagues which are formed using the manager profile field.
  • Colleagues added by you
  • Suggested colleagues

It’s also an interesting read to find out some small details like:

  • The first 3 pages of search results are grouped by colleague-ness: first your colleagues appear, then colleagues of your colleagues, then everyone else.
  • Within each group, the ordering is still by relevance.
  • When paging through results, another 3 pages of results will be grouped once you reach page 4, then page 7, etc.

 

Overall I think the feature works extremely well, although I’ve seen some users struggle with the feature, these users were typically expecting the results to be in alphabetical order like their previous pre-MOSS system. While I don’t agree with the concept since the results are returned by relevance (but in a social context) it is possible to sort the results alphabetically, Paul Galvin has posted some XSLT that does this. Remember that this is done outside of the search engine itself, so the XSLT is only going to sort the results per page. So its possible to have page 1 contain 10 results ordered alphabetically, then page 2 will contain 10 results that are again sorted alphabetically, which might cause problems to some users.

I think ultimately these users just need a little bit of training to understand the social distance format. Just like any search engine if you don’t get the results you are looking for on the first page, I really think you need to refine your search. If your just looking for a colleagues details the social distance is fantastic and saves lots of time, my experience is that I use the people search 90% of the time to find colleagues, of course your situation may be different.

Thursday, October 23, 2008 7:39:14 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
MOSS | Search
# Tuesday, October 21, 2008

By default SQL Server will auto grow your databases by 1 MB for your data file and 10% for your log files. There have been numerous discussions about the usefulness of this default value, but at the end of the day you should really understand how this will effect your database.

In the world of SharePoint it’s common for users to upload multiple mega-byte files, which will be stored in the content database and would cause the database file to grow and could potentially cause performance issues.

Another SharePoint scenario that needs consideration is the SSP databases, the indexing of content performs a large number of write operations of the metadata associated with the crawled content. It might be wise to monitor the performance of these databases to determine if changing the auto growth rate would help.

 

databasegrowth

 

If you came to the conclusion that you did want to change the default options for all new databases, then you can simply change the default values of the model database, you can do this by right clicking on the model database and selecting the button next to the file you wish to change:

 

defaultsizes

 

Like all performance related tips, it’s best if you conduct some of your own analysis.

Tuesday, October 21, 2008 11:17:00 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
SQL Server | Tip
# Monday, October 20, 2008

Scott Hanselman recently posted about the IIS 7 Rewrite module and how easy it is to setup and use, he covers the topic extensively, I just wanted to point out that this tool will also work with SharePoint.

I was recently in a position where the marketing guys had decided that the URL should be the promotion name of the marketing campaign, but it was both impractical and impossible (the URL had to point to a survey) to create a page in SharePoint that would suit their needs. Since the site was running IIS 7 we used the IIS 7 Rewrite module.

For example:

Say the requested URL was:  http://server/marketing/promo/

But we needed to post to:  http://server/Lists/Marketing Survey 1/overview.aspx

 

The first step after installing the rewrite module is to create a ‘Rule with rewrite map’:

 

rule1

 

Then choose the rule action type, in this case it is a rewrite action, give it a meaningful name:

 

rule2

 

Then add the mapping (right click in the panel that gets opened after the last step), the Original value is the URL you want your users to navigate to:

 

rule3

 

That’s it your done, now you can browse to your URL and your users will end up in the correct location:

 

endresult

Monday, October 20, 2008 8:48:00 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
IIS 7 | Sharepoint | Tip
# Sunday, October 19, 2008

Some of the major web 2.0 sites like facebook and twitter are providing REST based API’s to interact with their services, if your not familiar with Representational State Transfer (REST), then now might be the perfect time for you to come up to speed because it seems that Microsoft is planning on incorporating more REST features in .NET 4, we already have some REST support in the current generation of tools.

The basic idea of REST is to use the existing infrastructure that the web already provides, we have HTTP verbs such as GET, POST, DELETE and PUT, which map pretty well to the CRUD model we deal with often. The web provides us with a simple error handling model, we all understand 404, 501 and 403 error codes (file not found, server error, unauthorised access). The final building block is the URL itself, we can create descriptive URL’s such that any user can infer it’s intent just by looking at it, while some may disagree with my summation, I think all of these elements together define what REST is.

If we contrast all of this with the world of SOAP and webservices, we soon realise that the webservices/SOAP model has been over-engineered. Do we really need to re-invent error codes and the calling conventions that already sit on top of the web, do we need all this SOAP overhead, one end-point for a raft of operations? Of course there will still be a place for traditional webservices, I’m not saying they don’t work or are going away, they clearly work and will be around for a while.

The webforms model of ASP.NET hasn’t really made it easy to create REST services, it was never really designed for it, however the ASP.NET framework has made developing REST’ful services a lot easier.

The first feature that the MVC framework offers is the flexibility of offering a URL routing engine, so that it is possible to easily create nice URL’s, but more than that, the way MVC uses the convention of {controller}/{action}/{parameter} you end up with code that without much effort becomes very REST like.

The second feature that MVC offers is the way each action on a controller returns an ActionResult, the framework provides inherited result classes such as the JsonResult and ContentResult, in effect the one action can return multiple payloads of data (in this case either a JSON view or an XML view). While not strictly fitting to the REST definition, most modern REST API’s return data in a format that is most easiest to work with which is increasing becoming JSON for AJAX/Mashable operations.

 

With this background we can now focus our attention on SharePoint, currently there are two ways to work with the data stored:

  • Web services
  • Object Model

I’ve already touched on what the limitations of the web services are, the SharePoint object model really only concerns us if our code is working inside SharePoint (i.e. on the same machine/s as SharePoint).

 

The Benefits to SharePoint of a REST API

  • Enterprise mash-ability – the web is becoming more and more useful, one reason is that its now easier to mash together applications, look at any application that makes use of virtual earth or Google earth, flickr, twitter, live services etc. Imagine having this flexibility in your organisation, if your organisation has really embraced SharePoint then most likely it contains data that could be mashed into other systems, this REST framework is about exposing that data more easily.
  • It still fits with an organisations Service Oriented Architecture (SOA) in most cases. A lot of people feel strongly that SharePoint isn’t the single source of truth for data, that may be the case, but SharePoint is a tool that does aggregate data and adds value to it (a user might create a list with BDC data with additional columns describing some business function), this framework is designed to make this data more accessible to an organisation trying to construct some form of SOA.

The URL Format

A REST API that sits over the object model would provide the best of both options, we could craft a simple URL that returned the items that we are after such as:

 

http://mashserver/Site/            -- returns all sites
http://mashserver/Site/all/            -- same as above
http://mashserver/Site/get/{guid-id}    -- returns the selected site

http://mashserver/List/                  --returns all lists that the user has permissions for
http://mashserver/List/forsite/{site-guid-id}   -- returns all the lists for the given site id

http://mashserver/ListItems/get/{list-guid-id}  -- returns all the items in the list,

http://mashserver/BDC/   --Return all the BDC applications

http://mashserver/Permission/site/{site-guid}   --Return objects representing the security ACL’s on the given object

 

The REST API should expand across all areas of the SharePoint system. Each action should be decorated with an accepted verb type attribute which MVC provides.

 

The Return Values

 

We could build a HybridResult that looks at the HTTP headers to determine the accepted input and then either return JSON or XML:

 

In fact Omar has already provided a nice starting platform.

 

This HybridResult can also be smart enough to return a 404 if the object we are trying to serialize is null. If we get any security exceptions we can set the return status code to 403, again the MVC provides a nice mechanism to support this via it’s Error Handling attribute.

 

Problems

  • Do we build our own object model, reinvent the wheel?

I think the answer is yes, we can’t serialize the SharePoint object model to our needs as a REST API, in some cases we want to return properties in a form that would be easy to use from JavaScript. We often don’t want to return the whole object graph, if you ask for all the lists, you really don’t want to have a list object returned will a collection of list items. By using the new language features in .NET 3.5 we can build extension methods that provide a neat way to convert the existing Object Model entities to those created by the MVC framework.

  • Security – The double hop issue

Since the API is going to make heavy use of the object model, it’s going to have the same limitations as the object model, i.e. the API web sites will need to live on the same server as SharePoint unless the double hop authentication issue is taken care of via the use of Kerberos, which is a likely event in most larger organisation.

 

 Features - Thoughts?

 

So what do you think? Is a REST API for SharePoint something that would be useful? I’ve already started developing some proof of concept prototypes which I’ve included on the project’s Codeplex site:  http://www.codeplex.com/REST4SharePoint so please leave any feedback there.

 

What features do you think it should include?

What are your thoughts?

What obvious thing have I missed?

Sunday, October 19, 2008 9:23:00 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [1] - Trackback
ASP.NET MVC | codeplex | Sharepoint
# Friday, October 17, 2008

I wrote about setting Microsoft Search Server 2008 Express up and configuring it to index a web site, the search interface that I demonstrated was a standard SharePoint site based on the Search Centre Template. I thought it would be nice to show how easy it is to build your own search interface.

I think the big appeal about Microsoft Search Server 2008 Express is that it can be used without the full overhead of SharePoint. So with that in mind and the fact that I’m unhealthily in love with the MVC framework, I’ve put together a simple ASP.NET MVC sample that works with the search server:

 

The screen cast shows the sample application as well as an overview of the code:

 

 

The thing that is really appealing is that by using the ASP.NET MVC framework, you have complete control over the generated HTML, there is no nasty webpart hidden fields or the hideous viewstate.

I hope you come away with the idea that Search Server would be perfect for indexing your website or file shares etc, but that you ultimately have the power to present those results how you see fit.

 

You can download the source code to my sample application here. It makes use of the MVCContrib library for the pagination support and preview 5 of the MVC framework.

A list of all the default columns that are returned by the search web service can be found here:

  • WorkId
  • Rank
  • Title
  • Author
  • Size
  • Path
  • Description
  • Write
  • SiteName
  • CollapsingStatus
  • HitHighlightedSummary
  • HitHighlightedProperties
  • ContentClass
  • IsDocument
  • PictureThumbnailURL

If these don’t provide what you need then you can use the other enterprise search schema’s.

Friday, October 17, 2008 8:47:06 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [1] - Trackback

# Thursday, October 16, 2008

By default SharePoint will create a content source called ‘Local Office SharePoint Server sites’ such as:

 

contentS

 

This will contain the starting addresses of all the sites on your SharePoint server such as:

editContentS

 

Notice how it also includes the sps3://, this is the indexing of your user profiles.

 

My tip is to remove the sps3:// link from the default content source and add it as a new content source on it’s own.

 

The reasons why I think this is helpful:

  • By default you need to crawl all your other content just to update your user profile information.
  • You can schedule your profile crawls at a time that suits your active directory imports

In any case it’s worth considering breaking the profile crawl into it’s own content source.

Thursday, October 16, 2008 10:55:00 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
Search | Sharepoint | Tip

I’ve put together a screencast that carries on from my previous post on installing and configuring Microsoft Search Server 2008 Express.

This screencast covers:

  • Setting up a new external content source (my example is this indexing this site)
  • Viewing the crawl log to determine the success or failure of a crawl
  • Adding a search scope to give the end users the option to focus there search query to a particular area
  • Enabling the search scope in the site collection
  • Setting up the search centre page web parts to show the search scope dropdown

In the screen cast I mention that the navigation links in central admin or the search administration don’t link to the search scopes settings page. I manually added the url:  http://<server-name>/ssp/admin/_layouts/viewscopes.aspx?mode=ssp

 

The higher quality screencast can be found here or the youtube version:

Thursday, October 16, 2008 7:36:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
Screencast | Search Server
# Wednesday, October 15, 2008

You may not have heard about Microsoft Search Server 2008 Express, just as SQL Server Express is the little brother of SQL Server, Search Server 2008 Express is the little brother of MOSS. It offers most of the enterprise search capabilities of MOSS minus the BDC.

I’ve put together a screen cast of the install and initial setup of the product, you’ll find that the entire process is almost the same as WSS or MOSS, that is because the product is built from the same components. The one notable difference is the new Server Wizard page, it combines all the common settings such as app pool accounts, selection of the index server, content access accounts into one place.

The search administration is the same as MOSS with the infrastructure updates, in fact the infrastructure updates goal was to align the work done around the Enterprise Search Server space with the search capabilities of MOSS, new features like federated search etc.

 

I highly recommend taking a look at Search Server 2008 Express if you want to provide search to your organisation without the committing to a full MOSS install or even to increase the search capabilities of your WSS farm.

 

The install steps are:

  • Launch the installer, make sure you select the ‘Install all components’  from the advanced option if you wish to connect to a SQL Server, otherwise the stand alone option if you wish to use the SQL Express version.
  • The configuration wizard will run after the install (just like SharePoint), depending on your option, I choose to create a new farm.
  • Enter your database server name and the database access account, this account should have permissions to create databases.
  • Specify a port for central admin to run on, try to make this consistent across all your farms, it makes it easy to remember that way.
  • Once the setup completes, central admin will be launched, a page specific to Search Server will be presented. This page will ask for the content access account, the application pool account and various other options. I really like this consolidated page, hopefully we will see more of it in SharePoint 14
  • In my case the web application was created successfully, however the site collection wasn’t created, so I selected the create site collection option in central admin and used the search centre template.

 

The higher quality screen cast can be found here or the youtube version:

 

Of course you should also subscribe to the Microsoft Enterprise Search Blog to help stay up to date with this product.

Wednesday, October 15, 2008 7:27:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
Screencast | Search Server | setup
# Tuesday, October 14, 2008

So the big news is that Silverlight 2 has been released, I haven’t really paid much attention to Silverlight up until the Devsta competition which gave me the incentive to jump right in and start developing with it.

I remember on the first day of development of Console Connect I was really frustrated that I couldn’t get the exact layout of UI elements that I wanted, I hadn’t fully understood the power of the StackPanel. Once I got over that hurdle I found myself applying the same text styles to numerous textboxes which didn’t feel right, then I discovered the shared resources, by now the light was on and I was lovin it.

I was really impressed by how easy it was to pick up, I don’t recall having any problems at the code level, just the UI issues I previously mentioned. Within a week I had a couple of small games working and could do all the same things that I could in a winforms app like calling webservices and changing the UI in response to the users input. If I was a little more graphically inclined, my games could come to life with animations and sounds, but that is best left to those right side of the brain people.

One of my colleagues said to me that he didn’t think that Silverlight would get much widespread adoption, but my thoughts after having a good play with the technology are a little different.

I think the key is the shallow learning curve for .NET developers, something like this: 

 

Silverlearningcurve

 

Once you get over the little UI hump (which is basically the same for WPF) and learn a handful of things like data binding, resources and the way the UI can use panels, your just about at the top of the curve. I think Scott Hanselman had much of the same experience when started on his babysmash experiment.

So ultimately I think the success of Silverlight will be around the fact that developers can pick it up quickly and experience all that developer love from Microsoft. All the things that make development a breeze like a full debugger, intelli-sense and a framework that is familiar.

 

Or maybe I’m completely wrong and the rest of the world will have the same view as Ruby On Rail’s David Heinemeier Hansson who basically thinks that we are only scratching the surface with what can be done with Javascript and HTML, maybe rich internet applications will be a passing fad?

Tuesday, October 14, 2008 11:01:00 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [1] - Trackback
Silverlight

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