The My Site Personal Site Collection is created for each individual user thus customisation is not so easy. A developer is required here as the solution here is known as Feature Stapling.

Feature Stapling allows a Feature to be called when a Site Template is called during the provisioning process. This means you can run some code to change master pages, apply custom security, etc… to the site during the provisioning process. So when the site is displayed to the user all of the changes you implemented in your Feature has been applied.

I have just finished implementing a solution for a client which I am happy about as Personal Sites are now branded and users are not site collection administrators.

I have recently began work on developing a Capacity Planning tool for a government agency in SharePoint. This work is only a couple of days in but I thought I would share something I learn’t today in relation to charting/graphing.

If you are running .net framework 3.5 sp1 and VS2008 then you are in luck to use Microsoft’s free charting platform with Visual Studio add-ons and very complete sample project. This fantastic news and a great addition to business solutions.read about it here:

Note: The Chart control is built into VS2010 so no configuration or installation is necessary.

The chart currently displays dummy data but will in the future graph the data that is inside the grid.

I have done what you have said consistently several times without running PrepareToMove.

Create the new web apps in your DEV environment first making new databases for them.

Detach these 2 new content databases you created by making your new web apps from your SharePoint farm.

Have your DBA (or you can do it yourself if you know how) restore the content from the 1 old content databases to the 2 new content databases.

When the restore is complete, reattach the 2 new databases you just refreshed to your farm using the AddContentDB command in STSADM. Make sure to add -assignnewdatabaseID and -clearchangelog parameters to the AddContentDB command.

Check the SiteSynch table in your SSP Service database as indicated above and if the ‘Moving’ column is TRUE, run the PrepareToMove STSADM command using the -contentDB command with the name of your new content DB and the -undo parameter. Do this -undo command 2 times, once for each new contentDB.

This worked for me when I had to refresh 2 separate databases in my DEV farm from 1 production content database.

I noticed our SharePoint content database growing at a rate that didn’t match the content being added. I decided to look at some table storage and ran the SQL Server 2008 reports from Management Studio and ran the Disk Usage report. Fantastic report detailing table size, number of records, etc…

One table that stood out was the AuditData table which was 50Gb in size. SharePoint Auditing can take up so much database space especially if you are auditing an entire site collection. Auditing was capturing data since late 2007 and wasn’t being used at the company, so the decision to disable this functionality. Great…save space and system resources.

So I turned it off at the site collection in site settings.

So the next step moved to how do we remove these logs?

Truncate the table – fast but unsupported and I am not sure what state this will leave you in

Object Model – write code to remove entries

stsadm trimauditlog- only available after SP2 – This is the one I selected

I used the –url parameter instead of the -database parameter. I was receiving an object reference not set to an instance of an object error when using the -database parameter. I am not sure if it was because the site collection was migrated to a different database server and the audit logs was stored against a different database server.

I ran this command in 1 monthly intervals (which was painful) as there was a lot of data to clean up and the SQL database log file wouldn’t consume all the disk space. I would then manually shrink the log file DBCC ShrinkFile after every trim to free up space. I performed this action until the entire AuditData table was cleared.

So if your Content database is growing at an alarming rate then make sure you check your AuditData table and assess if you really need auditing enabled, especially for the entire site collection.

I am doing some work with the treeview control for displaying and selecting rooms in applications. When working with the treeview control you usually don’t know how many different levels of nodes you may be working with. Here are a couple of methods that will loop through all nodes in your treeview control.

When trying to retreive and view data from InfoPath repeating tables using a no code solution you have a couple of options.

1.
When publising your form you can select the column in the repeating table and modify the column function from (first) to (merge). This merges all the repeating values into one column so you can see all the values in your SharePoint View. One problem with this approach
is that the output doesn’t contain a delimiter for each column value so this makes it difficult for reporting

2.
Another option is to add a textbox to the form which will concatinate the values and seperate them via a deliminator (in this case a semi- colon ‘;’).

In the value area of the textbox add the following formula.
xdMath:Eval(xdMath:Eval(/my:travelRequest/my:trips/my:trip, ‘concat(concat(concat(my:Airline_Name, concat(” – “, my:Flight_Identifier)), concat(” – “, my:Destination_EndDate)), “;”)’), “..”)

To display this information in a SharePoint view you need to create a column in the Form Library for example FlightDetails and when you publish the form add a column mapping that maps FlightDetails to your textbox identifier.

Fill out a form and view the Flight information in a SharePoint view concatenated via a semi-colon. Now we have a ‘;’ deliminator we can easily extract/filter data when exported to an excel spreadsheet.

If you want to you can hide the textbox so users don’t see the value when filling out the form.

Turn paging on in the GridView control and wire up the Grid_PageIndexChanging eventprotectedvoid GridRequests_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridBind(true);//maintain sort direction as we are only navigating between pages
GridRequests.PageIndex = e.NewPageIndex;
GridRequests.DataBind();
}

This has always been a problem for developers with requirements to support multiple browsers. When writing code various browsers render the exact same peice of code differently. So the development process consists of programming workarounds so they render the same or very similar.

Now we have a free tool that we can use to test multiple browsers easily during our development process.

I have been developing inside SharePoint for a while now and while things are getting easier with tools I think this process for developing User Controls inside SharePoint gives me a lot of control.

I have a Graphical User Interface

I have a separate project to build and test outside of SharePoint

I can easily update and view my project html and binary code

Currently this process doesn’t create me any SharePoint Solution files to deploy across environments. I think to achieve this I will need to create a VS 2008 SharePoint Project…but so far these projects seem to add weight and time that I don’t want at the moment…while I am developing.

Create a VS2008 web project

In IIS create an IIS Application under your SharePoint web site that has a path to your VS2008 web project created above. This helps for updating content

In your VS2008 project create some user controls and test that they function

In VS2008 project properties under the Build Events tab point the Post Build events text box and add a copy statement to copy your .dlls and .pdbs to your SharePoint web sites bin directory. This will deploy a new .dll every time you build your VS2008 project. I had problems when I put the VS2008 project .dll into the GAC…it only worked when I put it into the SharePoint’s web sites bin directory

One of the most common programming issues I see when working at clients locations is the way the common .Net DataSet is managed. I see a lot of code written like the first example below which checks if the DataSet table contains any rows. The problem with Example 1 is it expects a couple of things. Firstly that a DataSet (ds) even exists and secondly that it also contains a table. This code will throw an exception if the DataSet is null or no DataSet table exists.

Example 1//this will throw an exception if ds is null or no table existsif(ds.Tables[0].Rows.Count > 0) { //process data }

I will be presenting at my local SharePoint user group tomorrow. This will actually be my first SharePoint user group presentation so I am really looking forward to meeting some new people and seeing what is happening in the SharePoint space.

I am talking about the Content Query Web Part and the abstract is below.

Leveraging the Content Query Web Part

Come and learn how to configure one of the most important MOSS web parts in your toolkit. We will walk-through SharePoint’s premier OOTB rollup web part and demonstrate how to display results in 2 or 3 column format and have multiple fields returned in the results. We will also open Visual Studio and demonstrate how to extend its functionality with paging and dynamic filtering.