Welcome to MSDN Blogs Sign in | Join | Help

Customizing MySite in MOSS 2007

Support case volumes coming in for MOSS 2007 is huge.  When we try and help customers to find answers to complex problems/questions, many a times we end up learning great stuffs & things that sometime make us yell “Wow, it’s amazing stuff man!!”.  Well, this was one of such “case” and I thought I’d share this out.

 

The requirement was as simple as it could be.  Customizing MySite in MOSS 2007.  Well, that’s fairly simple I though!  And immediately had the following questions bugging me:

 

1.       We cannot create a custom site definition for MySite as the template ID is hard coded in the source!  So, is there any other way?

2.       Well if that’s not possible, can I modify the SPSPERS folder? No way!

3.        Would creating a custom master page help?  Well, it could have, but that requires laying hands on OOB files which is owned by Microsoft – so don’t do it at any cost J

 

Feature the savior

 

Thankfully, we have this very useful and new feature in MOSS/WSS called Features.  It’s a new innovation that allows us to switch on a particular stuff on different scopes (farm, web, site).  With a little help from SharePoint API’s & carefully designing a feature.xml & element.xml file,  I was finally able to get a solution ready that works like charm!  Not to forget, I had to hit my head hard against a concrete wall before I could reach there.  Hopefully, this write up will save time for most of you who might think of customizing MySite in MOSS 2007.

 

First thing first – create a custom master page

 

This was very simple for me.  I just had to copy the default.master page file into a folder and write the text “y0 man! MOSS 2007 feature rocks!” sentence within the <BODY> tag.  Obviously, this is something you wouldn’t call as customization, but in a way it is – you know what I mean? J

 

The default.master page found under the TEMPLATE\GLOBAL folder structure under 12 hive is the master page used by MySite by default.  I am going to try to be a bit more visually descriptive in my posts, so below is a screenshot:

Grab a copy of this file and put in another folder where you would also be putting your feature files soon.  Customize whatever you want in that file.  When I say this, I assume you know what you are doing J  Once you do that and believe you have the master page you want, proceed further.

 

Do I need to do something with Visual Studio 2005 at all?

 

Yes, you have to.  You need to create a new class library in Visual Studio 2005.  Add reference to Microsoft.SharePoint.dll (this is actually displayed as Windows® SharePoint® Services).  Add a using directive to both Microsoft.SharePoint & Microsoft.SharePoint.Administration namespaces.  And derive your main class from SPFeatureReceiver.  I used the below code for the specific case I worked on…

 

using System;

using System.Diagnostics;

using System.Collections.Generic;

using System.Text;

using Microsoft.SharePoint;

using Microsoft.SharePoint.Administration;

 

namespace MySiteFeatureStaple

{

    public class MySiteFeatureStaple : SPFeatureReceiver

    {

        public override void FeatureInstalled(SPFeatureReceiverProperties properties)

        {

            //throw new Exception("The method or operation is not implemented.");

        }

 

        public override void FeatureUninstalling(SPFeatureReceiverProperties properties)

        {

            //throw new Exception("The method or operation is not implemented.");

        }

 

        public override void FeatureActivated(SPFeatureReceiverProperties properties)

        {

            SPSecurity.RunWithElevatedPrivileges(delegate()

            {

                EventLog eventlog = new EventLog();

                eventlog.Source = "MySiteFeatureStaple";

                eventlog.WriteEntry("Starting Activation of the MySite Master Page Switcher Feature");

                try

                {

                    SPSite mysite = properties.Feature.Parent as SPSite;

                    SPWeb myweb = mysite.RootWeb;

                    if (myweb.WebTemplate == "SPSPERS")

                    {

                        using (myweb)

                        {

                            myweb.Description = "MySite :: " + DateTime.Now.ToShortDateString();

                            if (myweb.MasterUrl.Contains("default.master"))

                            {

                                myweb.MasterUrl = myweb.MasterUrl.Replace("default.master", "sridhar.master");

                                myweb.ApplyTheme("MyReflector");

                            }

                            myweb.Update();

                            eventlog.WriteEntry("Found site using 'SPSPERS' template & updated it with the custom master page");

                        }

                    }

                    if (myweb.WebTemplate == "SPSMSITEHOST")

                    {

                        using (myweb)

                        {

                            myweb.Description = "MySite :: " + DateTime.Now.ToShortDateString();

                            if (myweb.MasterUrl.Contains("default.master"))

                            {

                                myweb.MasterUrl = myweb.MasterUrl.Replace("default.master", "sridhar.master");

                                myweb.ApplyTheme("MyReflector");

                            }

                            myweb.Update();

                            eventlog.WriteEntry("Found site using 'SPSMSITEHOST' template & updated it with the custom master page");

                        }

                    }

                }

                catch (Exception e)

                {

                    eventlog.WriteEntry(String.Format("Error activating MySite master page switcher feature {0} : ", e.Message));

                }

            });           

        }

 

        public override void FeatureDeactivating(SPFeatureReceiverProperties properties)

        {

            SPSecurity.RunWithElevatedPrivileges(delegate()

            {

                EventLog eventlog = new EventLog();

                eventlog.Source = "MySiteFeatureStaple";

                eventlog.WriteEntry("Starting De-activation of the MySite Master Page Switcher Feature");

                try

                {

                    SPSite mysite = properties.Feature.Parent as SPSite;

                    SPWeb myweb = mysite.RootWeb;

                    if (myweb.WebTemplate == "SPSPERS")

                    {

                        using (myweb)

                        {

                            if (myweb.MasterUrl.Contains("sridhar.master"))

                            {

                                myweb.MasterUrl = myweb.MasterUrl.Replace("sridhar.master", "default.master");

                                myweb.ApplyTheme("none");

                            }

                            myweb.Update();

                            eventlog.WriteEntry("Removed custom master page from site using 'SPSPERS' template");

                        }

                    }

                    if (myweb.WebTemplate == "SPSMSITEHOST")

                    {

                        using (myweb)

                        {

                            if (myweb.MasterUrl.Contains("sridhar.master"))

                            {

                                myweb.MasterUrl = myweb.MasterUrl.Replace("sridhar.master", "default.master");

                                myweb.ApplyTheme("none");

                            }

                            myweb.Update();

                            eventlog.WriteEntry("Removed custom master page from site using 'SPSMSITEHOST' template");

                        }

                    }

                }

                catch (Exception e)

                {

                    eventlog.WriteEntry(String.Format("Error de-activating MySite master page switcher feature {0} : ", e.Message));

                }

 

            });

        }

    }

}

 

I don’t really think the RunWithElevatedPrivileges() call is required, however…. J

 

There are specific aspects that need your attention on the above code.  As you might have seen, SPFeatureReceiver is an abstract class and so we have implemented all the abstract methods in it irrespective of whether we are using them or not.  The code specifically “looks for” MySite and swaps the default.master page with sridhar.master page.  As I said, I tried this out for a customer’s scenario.  You can change this to suit your needs.  I’ve also used ApplyTheme() method to apply a custom theme (wondering how to do this? Here you go) to MySite.  Additionally, as any good software programmer does, I’ve added few lines for logging stuffs regarding what’s happening or if something has gone wrong.

 

Compile this project.  Install the assembly file into GAC.

 

We are not done yet – most important part is to create the feature we need

 

So, we have our DLL that will perform the logic of checking whether a site is a MySite or not and if so, apply a custom master page and a custom theme to it.  Now, we need to create a feature to be able to install/uninstall & activate/deactivate it at will.

 

There’s no hard & fast rule in creating a feature.xml & element.xml file.  Just pop open a notepad file, name it feature.xml and add the following tags as shown below:

Oh yes, if you use Visual Studio 2005 things would be easier for you.  My suggestion for working with XML in Visual Studio 2005:

 

1.       Create a new XML file with name feature.xml

2.       Pop open the XML file’s properties.

3.       You should see a schemas option in the properties window.

4.       For working with features (i.e., creating feature.xml & element.xml files) you can add a reference to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML\wss.xsd file.

5.       This will make things easier for you as you’ll experience IntelliSense™.

 

Coming to the above feature.xml file, it’s pretty simple to understand.  It has a GUID (generated using GUIDGEN), a title, description, version.  The important attributes though are:

·         Scope:  The scope at which the feature would be activated.  For this discussion, I have specified “Site”, which means the feature will be installed at the site collection level.  “Web” would be at a particular site level.  “Farm” would be at the farm level and will be available universally to all sites falling under the farm.

·         ReceiverAssembly/ReceiverClass: Since we are installing the assembly in GAC, we have to sign it with a strong name.  The full assembly name after signing needs to be specified for ReceiverAssembly.  The ReceiverClass name depends on your namespace and your main class name.

·         There’s a <ElementManifests> tag under which the location of the custom master page file is specified.  I had this master file put in the same folder as the feature and so I just provide the master page file name.  There’s also another location that points to MySiteFeatureStapleElement.xml (element.xml file as it is known).  You’ll see what that is in the next section.

 

Create element.xml file

The element.xml file I created looks like what is shown below:

It’s just a description of what, where & how the custom master page is, while in the feature we just defined it.  As you can see, it talks about where to upload the custom master page to, what’s the file name, is it ghostable or not and a unique name.

 

Note: The element.xml file can be named anything e.g., sharepointrocks.xml.  But make sure the feature.xml is named as is and that the correct element.xml file is referenced in feature.xml file.

 

Installing Custom MySite Feature

 

That’s it, you are almost done!  Now, you just need to install/activate this feature to see the magic J  Goto 12 hive BIN folder and use the stsadm tool:

 

stsadm –o installfeature –name <feature name>

stsadm –o activatefeature –name <feature name> -url <http://sharepointurl>

 

In case you are wondering which URL you need to specify?  It should be the URL of the web application that you created for MySite.  Even if you provide the URL of the site from where your user will be accessing their MySite, it would work.  After all, the feature will only get activated in MySite.  See the difference below:

This approach would be a supported method of accomplishing MySite customization.  I've also enclosed a sample application that you can refer to.

Published Saturday, May 19, 2007 3:46 PM by sridhara
Filed under:

Attachment(s): MySiteFeatureStaple.zip

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

Monday, May 28, 2007 8:30 AM by Savan

# re: Customizing MySite in MOSS 2007

Nice Artiacal....really need full.

But can you please focus on

What is MySite?

Tuesday, June 05, 2007 3:01 AM by Rudolph

# re: Customizing MySite in MOSS 2007

This site shows a way easier way of doing this... Just modify the default template used for MySites: http://blogs.msdn.com/danielmcpherson/archive/2004/05/23/139886.aspx

Tuesday, June 05, 2007 4:13 AM by Bartski

# re: Customizing MySite in MOSS 2007

I've followed your guide exactly.

But after activating the feature, I get a 403 forbidden error.

And I can't get back into the portal, http://sharepointurl/

Can you give me some advice?

Greetz.

Tuesday, June 05, 2007 9:04 AM by sridhara

# re: Customizing MySite in MOSS 2007

Rudolph,

Yes, that's another way of accomplishing MySite customization.  But that will put you into unsupported scenario.

Tuesday, June 05, 2007 9:05 AM by sridhara

# re: Customizing MySite in MOSS 2007

Savan,

An introduction to MySite is provided here: http://office.microsoft.com/en-us/sharepointserver/HA101087481033.aspx

Tuesday, June 05, 2007 9:07 AM by sridhara

# re: Customizing MySite in MOSS 2007

Greetz,

In that case, you might need to troubleshoot that.  Check the IIS logs, event viewer entries & ULS logs in SharePoint.  You might be able to find what's going wrong.

cheers,

Sri

Wednesday, June 06, 2007 4:08 AM by Amardeep Setty

# re: Customizing MySite in MOSS 2007

Followed exactly what is mentioned but when I visit mysite I get HTTP 404 Resource cannot be found any idea how I can debug this?

Wednesday, June 06, 2007 11:24 AM by bartski

# re: Customizing MySite in MOSS 2007

Hi sridhara,

Oke I've installed and activated the feature.

But now only the "My Profile" pages are affected.

It's must be something with the scope of the feature. Once I activate it on http://sharepointurl/personal/user it works fine but only for the specific user.

You know how I can setup the scope the right way?

Greetz

Thursday, June 07, 2007 11:04 PM by sridhara

# re: Customizing MySite in MOSS 2007

Amardeep,

Where have you placed the custom master page you created?  If you have followed the steps as is, then you should have your custom master page in the same folder as your feature.

cheers,

Sri

Thursday, June 07, 2007 11:07 PM by sridhara

# re: Customizing MySite in MOSS 2007

Bartski,

Is your current scope set to site or web? Setting the scope to site shouldn't cause this issue.  Further, you can also add debugging entries to find out what's happening.

cheers,

Sri

Wednesday, June 13, 2007 10:40 AM by MikeH

# re: Customizing MySite in MOSS 2007

I am seeing the same issue as bartski.  It only is applying to the profile tab page and not the other.

When looking at the event log it shows it applying to SPSMSITEHOST only.  I don't see it finding or applying to SPSERS

Thursday, June 14, 2007 8:50 AM by bartski

# re: Customizing MySite in MOSS 2007

Yes the scope is set to site.

I made a new webapp, and a new sitecollection to host the mysites. Deployed the feature, but it only affects the public view.

When I try to deploy the feature on http://sharepointurl:port/personal

I get: There is no web with the name /personal  (or something similar, it's in dutch)

Furthermore I have no idea how to make debugging entries..

Wednesday, June 27, 2007 12:37 PM by cafearizona

# why not staple this to a site definition

Wednesday, June 27, 2007 9:41 PM by jmager

# re: Customizing MySite in MOSS 2007

SridhaRa,

Thanks for the great blog.

Could I use this for creating a calendar list for all new user in their My Site?

jmager

Thursday, June 28, 2007 7:24 AM by jmager

# re: Customizing MySite in MOSS 2007

Sridhara,

Great blog!

Question...could I use this for creating a List (Calendar) for all new users My Sites?

If so...how...

Jm

Saturday, June 30, 2007 10:19 AM by cafearizona

# why isn't this stapled to a site defintion - like SPSPERS#0

If you look at one of the microsoft portal architect's code sample (http://blogs.msdn.com/sharepoint/archive/2007/03/22/customizing-moss-2007-my-sites-within-the-enterprise.aspx ) you will see he staples the master to a site defintion SPSPERS#0 - seems that would scale for larger deployments better than the if for each site creation.  Thoughts?   Also, since the administrator can customize the public view....do you really need to if on the mysite host....I only ask this re performance in the enterprises.  Thanks for sharing this with us!  It's a great community share on your part!

Friday, July 06, 2007 9:27 PM by Raghu Iyer

# re: Customizing MySite in MOSS 2007

I tried the feature approach and it worked good , but my requirement is to have only the public page and not to give provide private sites to all users..Any way of achieving this functionality?

Saturday, July 07, 2007 5:30 AM by Ton

# re: Customizing MySite in MOSS 2007

Hi sridhara,

Nice work! Is the feature activated for all MySites in that web application?

And how is the feature activated for new mysites that are not yet created?

Thanks, Ton

Tuesday, July 10, 2007 10:07 AM by kalle11

# re: Customizing MySite in MOSS 2007

I installed and activated this feature, but it only changes the theme when user X looks at user Y (My Home tab) this feature doesn't seem to change anything, atleast not the theme (it does change at the My Profile tab though).

I have to admit I don't fully understand the concept with shared and private mysites and the templates involved but I thought this feature would force my own theme to ALL views, both private and shared.

What I want is simpy a way to centrally decide a custom theme (corporate branding) to apply to ALL tabs/pages for all MySites, no matter what user inspects what MySite. Could this be achieved using this code with slight alterations ? And if so, how ?

Thanks

Thursday, August 23, 2007 12:44 PM by Fergus

# re: Customizing MySite in MOSS 2007

Thank you very much for an awesome article.

One question: You've modified the appearance of the site, but is it possible to dictate:

-which web parts appear? e.g. it would be nice to have a web outlook (configured with the user's email) when they go to the site

-whether parts of the site are editable. e.g we are a school, that wants to force boys to have their web outlook inbox on their mysite. It presume that one is always the owner of one's MySite, so it's impossible to restrict modification?

Thanks again,

Fergus

Saturday, August 25, 2007 3:10 AM by sridhara

# re: Customizing MySite in MOSS 2007

MikeH,

Have you tried debugging the code and stepping into it to find what is happening at runtime?

Sri

Saturday, August 25, 2007 3:21 AM by sridhara

# re: Customizing MySite in MOSS 2007

Bartski,

I don't quite follow when you say you are creating a sitecollection for mysite.  Have you setup an SSP?  You will be creating a web app for mysite when setting up SSP.

Sri

Saturday, August 25, 2007 3:37 AM by sridhara

# re: Customizing MySite in MOSS 2007

jmager,

My Calendar web part is available out of the box with MOSS 2007.  You can configure it to connect to your exchange server.

You might also want to check: http://www.kwizcom.com/ProductPage.asp?ProductID=175&ProductSubNodeID=180

Sri

Saturday, August 25, 2007 3:46 AM by sridhara

# re: Customizing MySite in MOSS 2007

cafearizona,

yes, for enterprise implementation and scalability http://blogs.msdn.com/sharepoint/archive/2007/03/22/customizing-moss-2007-my-sites-within-the-enterprise.aspx is an excellent walk-through.

Sri

Saturday, August 25, 2007 3:52 AM by sridhara

# re: Customizing MySite in MOSS 2007

Raghu Iyer,

if you are talking about mysites, I don't think that is possible.

Sri

Saturday, August 25, 2007 3:54 AM by sridhara

# re: Customizing MySite in MOSS 2007

Ton,

the mysite appearance changes when new mysites are created after you activate the feature.

Sri

Saturday, August 25, 2007 3:58 AM by sridhara

# re: Customizing MySite in MOSS 2007

Saturday, August 25, 2007 4:02 AM by sridhara

# re: Customizing MySite in MOSS 2007

Tuesday, August 28, 2007 3:53 PM by Gustis

# re: Customizing MySite in MOSS 2007

Thanks for the instructions...

I constructed a similar feature that applied masterpages on three different sites using a switch statement.

I also wrote consistently to a log file to be able to check everything afterwards. So.. everything seemed to have gone ok after I activated my feature but:

I now have a parser error everywhere, even on my default "http://portal" even though I never touched the master gallery there..

2 different types of errors occur:

Server Error in '/' Application.

Parser Error

Line 6:  <%@ Register TagPrefix="wssuc" TagName="Welcome" src="~/_controltemplates/Welcome.ascx" %>

and

Line 1:  <%@ Page Inherits="Microsoft.SharePoint.Publishing.TemplateRedirectionPage,Microsoft.SharePoint.Publishing,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %> <%@ Reference VirtualPath="~TemplatePageUrl" %> <%@ Reference VirtualPath="~masterurl/custom.master" %>

All I ever did was uploading masterpages and setting masturls...how could this have wrecked my entire environment?

Wednesday, August 29, 2007 3:41 AM by sridhara

# re: Customizing MySite in MOSS 2007

Gustis,

Are you sure your custom master page also follows a similar template like the default one does?  More details on customizing master page can be found here: http://msdn2.microsoft.com/en-us/library/ms476046.aspx

cheers,

Sri

Wednesday, August 29, 2007 9:48 AM by Gustis

# re: Customizing MySite in MOSS 2007

Well, the sites I tried to apply my master to were all migrated from SPS 2003. But I am 100% sure that the master page I created (with sharepoint designer on another computer) can be uploaded and set as master page manually with Sharepoint Designer on my test server. Thats how I do it on the production machine right now.

But still, my portal site shouldn't be affected since I only uploaded the master to other types of subwebs.

Could the SPSecurity.RunWithElevatedPriviligies method have caused som irreparable error? I found errors in the event log suggesting that something wasn't ok.

But thanks anyway, nice article.

Saturday, September 01, 2007 2:40 AM by sridhara

# re: Customizing MySite in MOSS 2007

Gustis,

I guess, you have not checked for a particular template before changing the master page through feature.  Even if you did and if the base template were the same for all your sites, you might face issues like this.  I am not really sure, if creating master page through SharePoint designer would give us a master page similar to default.master that contains different place holders.

Sri

Friday, September 07, 2007 1:58 AM by SharePoint en Español - Luis Du Solier G.

# Personalice y aplique su propio diseño a Sitios hechos en SharePoint 2007

Algunas preguntas relacionadas: ¿Cómo personalizo mi sitio de trabajo de SharePoint? ¿Cómo puedo personalizar

Friday, September 07, 2007 1:58 AM by Luis Du Solier G. - SharePoint en Español

# Personalice y aplique su propio dise&amp;#241;o a Sitios hechos en SharePoint 2007

Algunas preguntas relacionadas: ¿Cómo personalizo mi sitio de trabajo de SharePoint? ¿Cómo puedo personalizar...

# Personalice y aplique su propio diseño a Sitios hechos en SharePoint 2007

Algunas preguntas relacionadas: ¿Cómo personalizo mi sitio de trabajo de SharePoint? ¿Cómo puedo personalizar

Wednesday, October 03, 2007 10:18 AM by l0b0

# re: Customizing MySite in MOSS 2007

Thanks for the article, but I cannot get this working in WSS 3.0. First, if I set the feature scope to "Site",

stsadm -o installfeature

complains that "Elements of type 'Receivers' are not supported at the 'Site' scope.  This feature could not be installed."

If I change the scope to "Web", it says "Operation completed successfully.", but I can't find the feature in the web interface. Where is it supposed to show up?

Tuesday, October 30, 2007 11:50 AM by Blog del CIIN

# WSS 3.0 & MOSS: Recopilación de enlaces interesantes (IX)

Después de algún tiempo sin postear el habitual recopilatorio de recursos interesantes de WSS 3.0 &amp;

Wednesday, December 12, 2007 6:34 AM by Ramesh Nikam

# re: Customizing MySite in MOSS 2007

very nice article i get more help...

Tuesday, January 15, 2008 7:55 AM by Richard

# re: Customizing MySite in MOSS 2007

Hi

This was really useful, got me most of the way.

i was wondering if anyone had the same problem as Bartski in that the customisations only applied to the profile page and not the personal view. Anyone know of a reason why this happens, or even better a fix!

Tuesday, January 22, 2008 6:37 AM by Cees

# re: Customizing MySite in MOSS 2007

Hi there,

I have a clean SP install and download your sample application. Then I did the following:

I copied the MySiteFeatureStaple subfolder to 12\TEMPLATE\FEATURES. This MySiteFeatureStaple subfolder included Feature.xml, sridhar.master and MySiteFeatureStapleElement.xml.

Then I ran:

gacutil -i bin\debug\MySiteFeatureStaple.dll

iisreset

stsadm -o installfeature -name MySiteFeatureStaple

stsadm -o activatefeature -name MySiteFeatureStaple -url http://server (server is the real name for my SP installation!)

When I checked the mySite for my existing user: no change! When I created a new user and checked: "file not found..."-error message.

Any ideas?

Thanks

Cees

cees@connectcase.nl

Tuesday, January 22, 2008 7:40 AM by John

# re: Customizing MySite in MOSS 2007

the scope set to site.

When I try to activate the feature on http://sharepointurl:port/personal

I get: There is no web with the name /personal

if I deploy

http://sharepointurl:port/personal/username

Now its deploying but the feature is activated

for that particular user.

     Do you have any how do I activate the feature for all My site User?

Sunday, January 27, 2008 4:03 PM by Mattias

# re: Customizing MySite in MOSS 2007

Hi!

It does not work for me.

When installing the eventlog says:

Starting Activation of the MySite Master Page Switcher Feature

But it does not show up in the "Manage Web Application Features " as a feature.

I have tried to delete the mysite, and the mysite sitecollection. recreated the mysite site collection and created a new mysite for the user.

But no new masterpage. and nothing in the eventlog.

Please help.

Monday, April 07, 2008 6:18 PM by Claudia

# re: Customizing MySite in MOSS 2007

Hello,

I would like to know if there is way to create a custom site definition using MySite template, make some changes (like the webparts it displays) and deploy it without overwriting the current MySite, but with the same behavior ... (It does no appear under the create site templates and it creates automatically for each user)

Thanks

Monday, May 12, 2008 10:06 PM by Jo

# re: Customizing MySite in MOSS 2007

i have a similar query to Ton, i have a web app for mysites and have a feature already for branding. I just dont know how to activate the feature for the whole web app?

I can do it within my own mysite but not via the site collection.

Is this done via central admin or my web application.

Thanks

Saturday, May 17, 2008 5:13 AM by Naanas

# re: Customizing MySite in MOSS 2007

Can you modify the left menu without changing the master page? may be in the CSS

Monday, May 26, 2008 8:43 AM by Sriniko

# re: Customizing MySite in MOSS 2007

Hi Sridhara,

I found this article very helpfull - But i am stuck with a question !- How do i have the document and list libraries disabled only for the Mysite of my web application ? ie I dont want any of my users to upload any lists or docmuments to their Mysite .

Any help

Thanks

Sriniko

Wednesday, June 25, 2008 2:34 PM by Chris J

# re: Customizing MySite in MOSS 2007

I don't understand why this won't work. I created a MOSS MySite, then deleted it, and followed your process. Afterwards the MySite generates for my user but without (your) master page changes.

I've deployed the MySiteFeatureStaple.dll into the GAC and reset iss. The public token is correct in the xml.

xml files and master page is in MySiteFeatureStaple directory under FEATURES dir.

I installed the feature successfully.

I activated the feature successfully at http://<mysite-webapp>/ and

http://<mysite-webapp>/mysite

I created a new mysite for my user, but it has the same template as before. I'm not getting any errors.

Please help.

Wednesday, June 25, 2008 2:40 PM by Chris J

# re: Customizing MySite in MOSS 2007

I do get an error after all!

Error activating MySite master page switcher feature Cannot open folder "MyReflector". :

Is there a problem with your code out of the box?

Wednesday, June 25, 2008 6:20 PM by JamesWay

# re: Customizing MySite in MOSS 2007

l0b0 - MySites are only available in MOSS, not in WSS. For this to work you would have to be using MOSS or there will be no MySite definition/template for it to find. Part of the code checks to see if it is a MySite, since there isn't one in WSS this piece will fail.

Wednesday, June 25, 2008 6:41 PM by sridhara

# re: Customizing MySite in MOSS 2007

Hi Chris,

You might wanna check if you've deployed the feature folder correctly.

cheers,

sridhar

Thursday, June 26, 2008 12:50 PM by Chris J

# re: Customizing MySite in MOSS 2007

Hi sridhar,

There is a bug in your code. I replaced "MyReflector" with "Reflector" for ApplyTheme, and replaced the dll in the GAC and re-installed and re-activated the feature and it worked.

The bad news is that I have the same issue as Richard, MikeH, bartski, etc above (ie. it replaced for SPSMSITEHOST, but not for SPSPERS).

Looking at your code, Is the FeatureActivated event supposed to be triggered more than once?

Shouldn't the masterUrl.Replace be applied to more than the RootWeb?

I cannot apply the feature to

http://<mysite-webapp>/personal/

I get the same error as others describe.

Thoughts?

Thursday, June 26, 2008 12:58 PM by Chris J

# re: Customizing MySite in MOSS 2007

Ok,

I tried activating the feature on

http://<mysite-webapp>/personal/chrisj

and it applied the feature to my private site - but I will have hundreds of users and many being added all the time. There must be a way to apply the feature on private site generation.

thoughts?

Thursday, June 26, 2008 10:51 PM by sridhara

# re: Customizing MySite in MOSS 2007

Hi Chris,

I suggest you follow the feature stapling method outline here: http://blogs.msdn.com/sharepoint/archive/2007/03/22/customizing-moss-2007-my-sites-within-the-enterprise.aspx

cheers,

Sridhar

Thursday, July 03, 2008 12:51 PM by Melissa

# re: Customizing MySite in MOSS 2007

I created this feature in a wsp file using wspbuilder.  I then deployed it to my site.  When I go in to activate the feature it is not listed in the features for me to activate.  Do you know why?

Thanks in advance!

Thursday, July 10, 2008 9:13 AM by Flo

# re: Customizing MySite in MOSS 2007

Hi,

I followed your instructions to customize the MySite but I ran into the same problems like Amardeep Setty. The installation and activation of the feature finish without any errors. But the mysite creation process for an user ends with a 404 error:

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /personal/tester5/default.aspx

Any ideas or suggestions how to solve this problem?

Bye,

Flo

Tuesday, July 29, 2008 3:58 PM by Hardik

# re: Customizing MySite in MOSS 2007

I can not add the created assembly to GAC even if its with strong name.

---------------------------

Cannot Add Assembly

---------------------------

Unable to add the selected assembly.  The assembly must have a strong name (name, version and public key).

---------------------------

OK  

---------------------------

Is there any idea what can be the issue?

Thursday, September 04, 2008 1:35 PM by Rohit:tiranga1@rediffmail.com

# re: Customizing MySite in MOSS 2007

I want to change the My Site template before a user uses it (so that

everyone uses the same template but the template itself is different from

what comes in the box. I created wiki and blog in my site and I want to set as default template. While creating mysite this templete need to use.

I appreciate your reply !

Thanks

Friday, September 05, 2008 4:49 AM by The Mit's Blog

# [Best Practices] Customisation du My Site : Comment le modifier en amont et en aval

Sous entendu comment modifier les My Site de MOSS 2007 avant création et leur maintenance après création.

Thursday, September 18, 2008 12:56 PM by Monique

# Error Activating MySite Master Page Switcher

Great feature! I have everything setup as instructed by you and also created/setup the MyReflector theme (as instructed by MSDN).

When I go into the Site Feature to activate it, I receive this error in the Event Viewer:

"Error activating MySite master page switcher feature A theme with the name "MyReflector 1011" and version  already exists on the server. : "

I'm not sure what this means exactly. It appears to be trying to create the theme and is finding one already out there (and therefore stops executing the MySite feature activation). Should the theme not be previously created in the ..\templates\theme\ directory?

Any advice is appreciated.

Thursday, September 18, 2008 3:45 PM by Monique

# Nevermind! :)

Scratch my last post. I did some digging and apparently it's a bug with custom themes. To fix it, I opened the site in SP Designer and found the _themes directory and deleted the custom theme (I had to apply the custom theme first, got the error, and then deleted the theme directory in Designer). I worked it like a charm.

Thanks for this solution!

Monday, September 22, 2008 9:18 AM by neha

# re: Customizing MySite in MOSS 2007

I am deploying the fetures for Customizing the My site.

Created the Web Application and then created Mysite by using MySiteHost teamplate.

actually deleted the MySite created while ssp configuration. so creating new MYSite.

Now when deloying feature in this sitecoll.

getting error file not found

Tuesday, September 23, 2008 4:42 AM by Dan

# re: Customizing MySite in MOSS 2007

Hi there, Is there anywhere on the web that gives a full detailed account on how to customise 'MySite'.

I have tried various approaches, which I found on the web, and they all failed.

I am using MOSS 2007 and I can't find adequate support, anywhre, for the customising of MySite.

It is my opinion that this issue needs to be addressed urgently, by Microsoft. I think that some solution needs to be found and incorporated into the next release of Sharepoint.

Despite trying various methods, they all failed, for me.

Regards,

Dan

Friday, October 03, 2008 9:16 AM by mado

# re: Customizing MySite in MOSS 2007

I get the same 404 as Flo and Amardeep Setty.

Resource cannot be found. (/personal/administrator/default.aspx)

When I open default.aspx in SP Designer. I get a master page error. It seems the contentplaceholder don't match. Even when I try to reattach it to the default.master now, I still get the same placeholder errors.

content regions in the current page and master page do not match:

PlaceHolderAdditionalPageHead

PlaceHolderPageTitle

so weird...

Wednesday, December 17, 2008 11:54 AM by Dionique

# My Sites Customization Activation problem

We've implemented a feature which should replace master page of MySite public page (http://servername/MySite/Person.aspx?...), implementation of the feature  was mostly based on an article "Customizing MOSS 2007 My Sites within the enterprise" (http://blogs.msdn.com/sharepoint/archive/2007/03/22/customizing-moss-2007-my-sites-within-the-enterprise.aspx).

The feature was successfully installed and activated on a production server, but it doesn't replace default master page with a new one(although in 'Site Collection Features' it is displayed as 'Active' and field MasterUrl in Webs table of the WSS_Content database is referencing to the new master page), but it doesn't replace default master page with a new one(although in 'Site Collection Features' it is displayed as 'Active' and field MasterUrl in Webs table of the WSS_Content database is referencing to the new master page.

The feature was also installed and activated on another SharePoint server which was installed from scratch - the feature works fine there.

During tracing of the database it was found that each time when the feature is activated/deactivated on the clean environment and any user's public profile is requested in browser for the first time, the following transaction appears in a database trace log:

BEGIN TRAN  

EXEC dbo.proc_DeleteDocBuildDependencySet N'4fa19f0f-bf3d-44ff-a354-299f38e0e2de',N'MySite',N'Person.aspx',1  

EXEC dbo.proc_AddBuildDependency '4fa19f0f-bf3d-44ff-a354-299f38e0e2de',N'MySite',N'Person.aspx',N'MySite/_catalogs/masterpage',N'ibron_profile.master',1  

EXEC dbo.proc_UpdateDocBuildDependencySet '4fa19f0f-bf3d-44ff-a354-299f38e0e2de',N'MySite',N'Person.aspx',1,0x01000...7800

COMMIT

This transaction updates data in AllDocs and BuildDependencies tables and as a result page 'Person.aspx' starts to use the new master page instead of the default one. But the same transaction never appears in the production enviroment.

So the problem is that the feature is never get activated completely in the production enviroment.

Could you please advise what could be a reason of such behaviour?

Friday, January 02, 2009 6:46 AM by Bushwajit

# re: Customizing MySite in MOSS 2007

I have tried this, it worked once, but when I used it with my custom mster page, it will not reflect anything. I had able to change "My Profile" page by sharepoint designer, but unable to change "My Home" page. Please help me regarding this matter.

Thanks

Friday, January 09, 2009 10:45 AM by Bishwajit

# re: Customizing MySite in MOSS 2007

Hi,

I have done following steps,

1.Add MySiteFeatureStaple.dll into GAC.

2.Add "MySiteFeatureStaple" folder into "Feature" folder.

3.Add "sridhar.master" into  masterpage gallery of MySite and respective site.

4.Install and activate features as given in the tutorial.

It install and activate successfully, but no change appears in the mysite.

Please help me regarding htat issue.

Sunday, February 01, 2009 1:31 AM by deewaker

# re: Customizing MySite in MOSS 2007

Dear sridhara

i used the same approach u followed bt the master page is not affected. I think I might not be putting the master page on right place.

what I did is - created a feature and put the feature in FEATURES folder by creating a folder MySiteTemplate inside FEATURE directory and also put my custom master page inside MySiteTemplate folder.

Sunday, February 01, 2009 10:23 AM by deewaker

# re: Customizing MySite in MOSS 2007

Hi,

I followed same step and could resolve the error "file not found". but the problem is - do I have to activate the feature for each user.

because when I use

http://<Server>/personal/

it is saying there is no web /personal.

and when I am using http://<Server>/personal/<userid>/ then it is working. suggest me How can we activate the feature for all the user at one glance.

Regards

Deewaker

Wednesday, March 25, 2009 9:07 AM by josetellan

# re: Customizing MySite in MOSS 2007

Hi everyone,

is there any way to tell sharepoint (i supose "featuring") to create complete "My Site", i mean, "My Home" and "My Profile" pages using myCustom.master page???

i want both pages with my masterpage, i mean, i want sharepoint creates "My Site" with my masterpage. is it possible??? thankssss

Monday, April 06, 2009 2:40 AM by basharmoss

# re: Customizing MySite in MOSS 2007

this fine but how can i add and configure myinbox webpart to my site , to view the outlook mail automatically once the user log to his personal site  

Thursday, April 30, 2009 2:46 PM by Saurabh Kumar Singh

# re: Customizing MySite in MOSS 2007

Hi,

I am creating a Community Site in MOSS 2007 with customization and also want to use existing My Site(basically “My Pofile”) feature for each user’s profile like ORKUT fashion(which maintains GROUPS, FRIEND’s List, SCRAPBOOK, MESSAGES etc.). Can i use “My Site” feature of this purpose??

Can you please help me in this context??

Thank you,

Saurabh

Wednesday, July 01, 2009 7:20 AM by Nilesh

# re: Customizing MySite in MOSS 2007

I am also facing same problem as Biswajit was facing.

I deployed DLL in to the GAC and copied the features to the Feature folder. But the theme and Master page is getting applied to only "My Profile" not to the "My Home".

Can anyone help me to resolve this problem?

Thanks

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker