Microsoft ASAP series

February 5, 2009 at 6:28 am (Uncategorized)

Took a virtual session for Microsoft on deployment and operations in MOSS. You can get the PPT and recording from here. There was a problem with the Live Meeting audio due to which it broke of multiple times during the session which was very frustrating both for me as well as the audience. Uunfortunately the recording also has a bad audio quality; you might have to hear it more than once to understand :) .

Permalink Leave a Comment

Links in Content Editor Web Part

January 15, 2009 at 5:21 am (Uncategorized)

If you have used SharePoint for a while, you will notice that the Content Editor Web Part, for some reason, stores absolute URLs and not relative URLs. This means that if you move content from one server to the other and there are links in the CEWP pointing to pages within the site, you will have to manually change them (ouch). It seems that the people working on the HawaiianAir.com site had to go through that painful process http://blogs.msdn.com/sharepoint/archive/2007/04/16/how-we-did-it-mission-critical-hawaiianair-com-website-powered-by-moss-2007.aspx .

One common workaround is highligheted here http://blog.mastykarz.nl/inconvenient-content-editor-web-part/ which basically talks of having a custom Control Adapter that intercepts the HTML being rendered by the CEWP and converts them to relative URLs. 

Now one thing here is the extra processing on the page render, since it had to go through the adapter. We were focused a lot on performance so we  used a different approach ie. we implelented a event reciever  for the page libraries that had used CEWP and before saving the absolute parts in the URLs were trimmed out.
This might not be a good approach in which the site structure is flexible and people can easily go and create sites, however in the case of an Internet Site where the process is more managed, this would be useful. True there would be a management overhead in that on creating a new site, this event reciever would have to be registered, however since the prime focus is on the end user rather than the content authors we went with this approach for our site.

Permalink 1 Comment

Content Deployment Issues

December 20, 2008 at 4:43 am (Uncategorized) ()

One word of advice for anyone going for a major MOSS implementation - Have a set of PSS tickets handy. Or atleast have a mechanism to raise a ticket with Microsoft. Microsoft does not charge you if the problem you raise is due to a bug in their product so make sure that there is nothing going wrong from your side before you raise the ticket.

So far we have bumped into two issues, the recent one being something pretty obvious, don’t know why this was not raised before.

Scenario: Create 2 folders A & B. Do a content deployment and verify that it gets into the destination site. Delete folder A and rename B to A. Carry out an incremantal deployment. This fails stating that folder A already exists. I think this is because it is trying to do the rename before doing the deletion at the destination site.

Workaround is to do a incremental deployment before the rename.

Waiting for MS to get the patch for this.

Permalink Leave a Comment

AAM example when using Load Balancer

September 3, 2008 at 12:03 pm (MOSS 2007)

Thought I’d put this out since although there are many posts on this over the Internet I have not found a good example. Knowledge about AAMs are important for any SharePoint administrator

First read this

http://blogs.msdn.com/sharepoint/archive/2007/03/06/what-every-sharepoint-administrator-needs-to-know-about-alternate-access-mappings-part-1.aspx 

If all that is to hard to digest and all you have is two servers and one load balancer and you feel that your existance would be justified if people could type in www.iamconfused.com (I made that up) and access the site by hitting one of the two servers that are load balanced then read on.

Here is the scenario.

  • You have two servers Server1 and Server2.
  • Your load balancer is set up such that if someone accesses http://www.iamconfused.com  (I made that up) it will redirect to either http://server1 or http://server2.
  • You feel that your existence would be justified if people could type in www.iamconfused.com  and access the site you have designed

First I assume that the load balancer is all set up fine (meaning it works). Get your network admin to verify that.

Browse to the Central Admin. Create your webapp on a port other than 80 (Lets say 1234).

Next extend your webapplication to Port 80 and select the zone as Internet. After this is done make sure that all web.config changes and dlls in the bin folder are moved across to the new webapplication folder.

Once this is done ensure that the application is working as expected on port 80 of the machine you are working on meaning if you  type in http://server1 the site loads up fine. Assuming server1 was where central admin is hosted on. If now you type in http://server2 it might redirect back to http://server1 but that’s OK.

Get to the AAM settings page and select http://server1:1234as the webapp

This should be what you see

Internal URL   Zone           Public URL for the zone
http://server1:1234 Default http://server1:1234
http://server1 Internet http://server1

Use the Edit public url and Add internal URL links to change this to

Internal URL Zone Public URL for the zone
http://server1:1234 Default http://server1:1234
http://server1 Internet http://www.iamconfused.com
http://server2 Internet http://www.iamconfused.com
http://www.iamconfused.com Internet  http://www.iamconfused.com

I am too lazy to walk through how to get it like this, however its not too difficult.

And thats all there is to it. Your site will be working fine. Just give it a few minutes; I have noticed even after doing an IIS reset the changes take a bit to come into effect.

BTW If you have not got your AAMs configured correctly, and you browse to http://www.iamconfused.com you might see some links in the page pointing to the server name. If you are behind a firewall which only allows access to the  http://www.iamconfused.com this is one reason why you could get a lot of broken links in the site.

Permalink Leave a Comment

Unique level permissions with Anonymous access

August 29, 2008 at 12:12 pm (Uncategorized)

In case you have not noticed, it is not possible to break inheritance for items and enable anonymous access for them.

Consider this scenario :- you have an page library that has 2 pages Dept1news.aspx and Dept2news.aspx. You want only user1 who is a member of dept1 to be able to edit  Dept1news.aspx  and user2 to be able to edit Dept2news.aspx.

That sounds to be a fair enough request from any business user and a SharePoint novice would be able to tell you that this can be achieved by using unique permissions for the individual items which is a simple task to do. The problem comes in when you want users to access the site anonymously. So even though individual people have access to edit the pages, assume this is an Internet site, and you want anonymous users to view all pages. Breaking the inheritance causes the anonymous access go for a toss, which means if you try to access the page it asks for authentication.

Now is that a bummer or what. One workaround is to have a property added to the page library that specifies who can access the page and attach an event handler so that if someone else tries to edit, he gets the edit mode page however on clicking the save button, the event handler checks the user and throws a error message, but that’s pretty ugly.

I thought this was a bug for which MS would be giving a fix, and kind of expected it to be fixed in the MOSS Infrastructure update, however found this pretty old link stating that this was due to difficulties in managing anonymous settings. http://yvonneharryman.wordpress.com/2007/11/23/follow-up-on-anonymous-access-and-item-level-permissions-from-sharepoint-connections-07/.

So I guess we are just stuck with it.

Permalink Leave a Comment

Site Structure: Web Apps vs Site Collections vs Subsites

August 26, 2008 at 6:53 am (MOSS 2007)

With MOSS it is not uncommon for people to have doubts on how to structure sites since there are multiple options and each one offers flexibility in terms of managing different sets of permissions, UI customization etc. Here are my thoughts on this subject.

Lets assume we need a site and start off with a webapplication and a top level site collection. To hold related or detailed information of whats in the top level, I would go ahead and create subsites. Now lets say there is some unrelated info which I need to present. I would look for a different web application if

  • I need to specify different permission levels for the site (not permissions)
  • I need to have customized web-parts  that I would not like to be exposed in my current site
  • Changes or maintenance in the new site should not affect other sites (recycle app pool, change web.config parameters etc)
  • Different storage capabilites need to be defined for the new site (Recycle bin size, Max No of users, upload capacity etc)
  • I want to use a different authentication provider
  • Be able to give site collection owners ability to specify if the site can have anonymous users and my initial site does not allow that ; or the other way around
  • Start from a different root level as compared to my original site

One point to consider here is that each web applications have associated default jobs with them that run on a schedule and also each app pool consumes a bit of memory. I really would not go for a different web app unless I really needed it.

If none of the above are satisfied then I would look for a different site collection if I need to

  • Use variations and set it up differently from my original site
  • Have different set of policies eg expiration, auditing etc.
  • Have the sites managed by totally two different sets of users but does not fall into the category requiring different webapps

 Everywhere else just having different subsites looks like a good option.

This is not a hard and fast checklist but some things that need to be considered for deciding the site hierarchy.

Permalink 1 Comment

Variation issues

November 28, 2007 at 8:25 pm (MOSS 2007)

Jeremy Jameson has published a blog with some pretty distrubing info on issues with MOSS variations. Surprised to find it published in the MSDN site.

Permalink Leave a Comment

Publishing site – Pages, pages and more pages

November 28, 2007 at 8:17 pm (MOSS 2007)

There are certain things that you would wish that MOSS could do and we get a thought;”… if only it could do just this as well….”
One instance I had seen of this is regarding publishing pages all getting into the same folder called “Pages” and no where else. Let say I wanted to create news pages and I wanted to classify them into Local News and International news. Now what I would like to do is have two folders under the pages document lib and while publishing a page having an option to choose which folder to put the page into. Alternatively allow me to put the different pages in different doc libraries. This however is not possible and all I can do is create two different sites one for Local News and another for International news. I could have a field which the user would have to choose what the news type is, however a user in the International news section would expect his info to be added directly to the International news section and would mentally curse all developers were if he had to choose the news type while adding.
I am not too fond of creating too many sites; and in this case its like using a site as a folder rather than anything else; since all my International and Local news sites would contain are the pages.

 BTW, I tried creating subfolders under the pages doc lib and after creating a page, moved it to the directory. It worked fine; except when I tried on clicking the page settings button of the page when in edit mode, I get a message stating that the page cannot be found. All other operations seem to work. I am planning to raise this to MS shortly.

Ideas anyone?

Permalink 2 Comments

Expiration Policy workarounds

November 5, 2007 at 10:56 pm (MOSS 2007)

We had a requirement for which we needed to hook up an alert with the document library that would fire at some point in time. The scenario was to have a capability to have a repository in which contracts could be stored and mails sent out to the contract management group a month or so before the contract expires. This scenario should also accommodate for open ended contracts that are basically created one time but gets auto renewed every year until someone decides to stop the contract.
We decided to handle this making use of the expiry policy features in MOSS. So we went and created a documet library that had fields start date, end date and Auto Upgrade which was a choice field (Yes/No) and decided to fire up a workflow one month before the end date that would send off an email to a set of users informing them that the contract was about to expire. The workflow would update the start and end date in case the Auto Upgrade option was set to yes.
MOSS only allows us to define the retention period as a date field + a period.  There is no option to specify EndDate – 1 month (Before you ask, MOSS does not allow you to give a negative number in the period field) . So that would be OK if all my contracts were of a fixed duration, however that was not what we had. There was an option to set the expiration date programatically and it gave in brackets by a workflow. Switching over to SharePoint designer workflow I looked for a field called expiration date, however it was not present. So we wrote a event and hooked it up with the document library to update the expiration date once a document was uploaded. We then created the workflow in SharePoint Designer so that the user could add in stuff without calling for us. One additional step we had to do was to  create a custom activity to update the expiration date for the auto upgrade case since the field is not present in Designer

Permalink 4 Comments

I don’t wanna See all Site Content

August 29, 2007 at 12:30 pm (MOSS 2007)

Recently I came accross a instance where the user did not want to see the View All Site content link above the quick links. Can’t blame him. After making the UI look as business friendly as possible, clicking on the View All Site Content would spit out a list of document libraries and lists categorized according to the technical implementation, very useful for a site administrator, but making no sense to the average business user.

So I decided to put in a bit of security trimming in the masterpage. By default the View All Site Content link is within the tag <Sharepoint:SPSecurityTrimmedControl runat=”server” PermissionsString=”ViewFormPages”> meaning that as long as Tom Jones has the permission to view form pages, he would he would view this link.  Changing the PermissionString attribute to ManageWeb solved this problem, thus making sure that only the Admin could see this.

So what are the other valid options for PermissionString? Here they are thanks to Zac Smith who got them out from a reflected SharePoint DLL

List Permissions
ManageLists
CancelCheckout
AddListItems
EditListItems
DeleteListItems
ViewListItems
ApproveItems
OpenItems
ViewVersions
DeleteVersions
CreateAlerts
ViewFormPages

Site Permissions
ManagePermissions
ViewUsageData
ManageSubwebs
ManageWeb
AddAndCustomizePages
ApplyThemeAndBorder
ApplyStyleSheets
CreateGroups
BrowseDirectories
CreateSSCSite
ViewPages
EnumeratePermissions
BrowseUserInfo
ManageAlerts
UseRemoteAPIs
UseClientIntegration
Open
EditMyUserInfo

Personal Permissions
ManagePersonalViews
AddDelPrivateWebParts
UpdatePersonalWebParts

So how do I determine which groups have these permissions? Simple; Go to Site Permissions and on the settings button select permission levels

Permissions

Select on the group for which you want to check the permission level and there it is.

Permalink 2 Comments

Next page »