Posts Tagged ‘Tips’
Saturday, July 5th, 2008



Do you write proposals?   do bug testing?   or write books? post blogs? or just need screen shots to help explain what you mean? 

If Yes then you need the latest version of SnagIt by TechSmith.   In it’s version 9 release SnagIt has moved from being just a good screen capture applet to being a fantastic, indispensable application that every good developer, author, tester etc etc should have installed.

It’s only when you start to use the new features without noticing you realise what a great piece of software you are using.   Having installed the V9 release a few weeks ago  I initially liked the OneClick pop-up that made switching capture modes a breeze,  but what I have found most useful is how SnagIt now keeps all my captures for me - no more having to save/or losing that key image. 

SNAG_Program-0000

The Library view showing this weeks captures.  Whats really cool is any annotations are all stored and can be edited.  No more saving as a PNG and then having to fudge the text using Paint.

Tags

I only found this today, the ability to Tag captures using simple icons and allowing you to get find them quickly.

SNAG_Program-0001

Whilst we’re on the subject of tools

Writing this blog post it suddenly dawned on me how many tools (all by different creators) I was using to bring this post to you.

SnagIt 

To capture the screen shots.   I have tweaked this slightly and  added another Program to the SnagIt Send to that allows me to send captures directly to Flickr Uploadr.

SNAG_Program-0002

Flickr Uploadr

Making uploading images to Flickr just that little bit easier.   Why upload to Flickr you may ask,  well I user Windows Live Writer to author my blog posts

SNAG_Program-0006

Windows Live Writer

This is one of the best bits of software anyone could install if they are serious about blogging.   The ability to link to multiple blogs, be able to recall existing blog posts for editing and correcting (yes it does happen). 

SNAG_Program-0003

Here you can see me authoring this very blog post. 

But wait wasn’t I telling you why I used Flickr?   Yes,  and if you look closely at the right hand menu you will see some nice Insert options, one of which is Insert Flickr Image.

Flickr for Writer

This neat plug in allows you to insert Flickr images directly from Flickr,  normally this is defaulted to my account but you can also insert others.

SNAG_Program-0004

There are many more tools that I use day to day,  some more aimed at development some at just getting things done.   Hopefully this Top Tool Tips post will help you become a better blogger :)

Saturday, May 31st, 2008



Answering a forum thread I had to do a bit of digging into how to create new Policies in code.

This post from Ethan helped point me in the right direction.   The requirement was to programmatically give users Full Control of a web application, the code snippet below shows how to achieve this.

SPWebApplication oWebApplication = SPWebApplication.Lookup(new Uri(“http://webappurl”)); SPPolicy policy = oWebApplication.Policies.Add(“domain\\username”, “MyCustomPolicy”);policy.PolicyRoleBindings.Add(oWebApplication.PolicyRoles.GetSpecialRole(SPPolicyRoleType.FullControl));oWebApplication.Update(); 

You may have noticed that the policy only allows for one username,  this is the case even though the UI gives you the option to enter multiple, only the first is stored.

Saturday, April 19th, 2008



Now that Windows 2008 Server is out SharePoint developers (and I’m sure lots of others as well) will start to move their development machines onto the new platform.  For SharePoint  developers tend to work in Virtual Machines and develop on the Server OS directly as the XP/Vista development story is not that good right now. 

I have such a configuration (Windows Server 2008, Microsoft Office SharePoint Server 2007, SQL 2005, Office Suite 2007, Visual Studio 2008) and have been working through some Excel Services development tasks when I discovered I had a problem with my setup.

In Excel I often need to Publish workbooks to the server to enable parameter configuration and the like,  however this was not possible running in the VM (on Windows Server 2008),  when trying to enter a network path I always got the ‘Path does not exist.  Check Path and try again” error.

Path Not Found

I proved the problem was not IIS or SharePoint related as I was able to connect happily from the Host Vista installation and upload the files from Office.

Having crawled the web and tried out various enabling and disabling of services and settings I was pointed to the solution by Dan Homle who I had the pleasure of meeting this week at the MVP Summit in Seattle. Dan is a fellow SharePoint MVP living in Maui (How cool is that!).

The problem is down to Windows Server 2008 adopting the don’t install anything approach which is great for its primary target - i.e. as a server - but less so for dev’s who need to know what to turn on where.,  The key missing Feature is the Desktop Experience

Add Desktop Feature

Enabling this will require you to restart the server,  and although it says things like Media Player - it doesn’t enable them so shouldn’t add much bloat.

Now when you enter the url in the Save As dialog you get access to SharePoint sites and libraries.

Save to SharePoint

 

[Update] The Microsoft From the Field also posted on something very similar, enabling WedDav  for the client when this is Windows Server 2008. 

http://sharepoint.microsoft.com/blogs/fromthefield/Lists/Posts/Post.aspx?ID=51

Thursday, March 20th, 2008



Having previously been an avid Skype user I decided to reinstall on my Vista ultimate 64bit laptop build.   Download and software installation (version 3.6) went without issue, but making a Skype test call I could hardly hear myself.   I made various changes to the settings including boosting the input without success. 

I eventually found this blog post that had a solution way down at the bottom of the page.  Change your recording quality from the default DVD/CD quality down to something like Dictation or Tape Recorder and HEY PRESTO (to quote the blog post) it works.

mic sound quality

Monday, March 17th, 2008



I normally do not cross post from other people blogs, but had to make an exception for this post by Ben Curry - because it mentions me :)

Scripted SharePoint Farm Installation using PSConfig.exe and stsadm.exe

Ben presented this session at SPC2008 and although the live demo (mucho kudos for not using Camtasia as heckled by Richard Taylor) had a small login issue it was voted as one of the best of the conference.  Check out how to automate you SharePoint installations and celebrate this with a pint of Guinness :)

Friday, February 15th, 2008



One of the areas covered during the training I do on WSS Development is how to correctly dispose of objects, specifically the the ones that have a reference to SPRequest like SPSite and SPWeb.  We talk about performance tuning but don’t really get deep down into how tuning the IIS worker process actually works.

Over the past few months there has been a marked improvement in the information being blogged on the subject so I thought it useful,  as a personal reference, but also to help future students and readers of my blog to list them here.

Microsoft - Best Practices: Using Disposable Windows SharePoint Services Objects

Learn the appropriate ways to write your code when using Microsoft Windows SharePoint Services objects so that you can avoid retaining the objects in memory with the Microsoft .NET Framework

http://msdn2.microsoft.com/en-us/library/aa973248.aspx

Roger Lamb’s SharePoint Developer Blog

Roger has taken the original article and extended this,  he gives lots of examples of the right and wrong ways to code - you may spot some of yours in here :)  He also documents the PublishingWeb object as another example that users the SPRequest object.

http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx

Stefan Goßner - Dealing with memory Pressure problems in MOSS/WSS

Stefan gives a very detailed insight into how memory is consumed and what’s happening inside the memory for the w3wp.exe process.   The reasons we have memory pressure and tips on how to resolve this.

http://blogs.technet.com/stefan_gossner/archive/2007/11/26/dealing-with-memory-pressure-problems-in-moss-wss.aspx

Steve Sheppard - Overlapped Recycling And SharePoint: Why SharePoint Requires it

Steve explains why he thinks that SharePoint needs the safety net provided by overlapping recycling.   If you not sure what that means read the blog

http://blogs.msdn.com/steveshe/archive/2007/12/17/overlapped-recycling-and-sharepoint-why-sharepoint-requires-it.aspx

One of the things that we all should take from this is that when we move to the 64Bit environment most of these challenges will become much less of an issue.   It does not mean we don’t need to code properly,  just that we will have a bit more room to move.

So for all of you that are thinking how do I move from 32bit to 64bit?  well Steve Smith and Penny Coventry have published a great white paper on this very subject.

Wednesday, February 13th, 2008



A detailed look at how the Sync works

I was asked recently to advise on how to configure a MOSS 2007 installation to allow end users to update their display name as they had previously been able to do in 2003. My initial thoughts on this were that its a simple update of the profile properties to allow them to edit the Name field, however the results achieved in testing appeared inconsistent.

In this article I will show

  • How to setup the profile properties
  • What the user sees and can edit
  • What services/timer jobs are involved in the Sync and how to speed this up for testing
  • The conditions that need to be met to trigger the profile information to be replicated.

Setting Up Profile Properties

The first step is to setup the profile properties. In this example I will be looking at enabling users to edit the display name (”PreferredName”) field. This example assumes that you have MOSS 2007 and a Shared Service Provider has been setup and configured.

From Central Admin choose the Shared Service Provider from the left hand menu. This should display a screen similar to the one below.

SSP Admin

Select the User profiles and properties option as highlighted. This will allow you to add new properties or as in this example edit an existing property.

View properties

Scroll to the bottom of the page and click View profile properties. On the list of properties select the Name field and choose Edit.

Edit Name

The profile properties page allows you to configure the profile property. Ensure that the field selected is the PreferredName field, this has default Display Name of Name.

PreferredName

Check that the field is checked for replication. You will note that the text suggests that properties that can be replicated cannot be edited by the user, however this does not appear to be the case.

Policy Setting Message Error

Choose Allow users to edit values for this property, this will allow the user to change the value via MySite.

Allow Edit

Change the mapping to ‘not mapped’. If you do not change this any modification the user makes will be overwritten at the next profile import.

Note: When a user firsts accesses a site the User Info is extracted directly from AD (or your provider, not tested) and it still pulls the AD based display name into this field as it is not related to the profile mapping.

Mapping

We will look at the different states for the User Info and profile imports below.

The properties page should show the PreferredName field is no longer mapped.

Profile Import Blank

That is all of the changes required to make the display name editable by the user.

What The User Sees and Can Edit

When the user navigates to a SharePoint site the initial view will show the information contained in AD (I assume this is the same for other providers but you will need to test) including the display name.

AD User Info

AD user with defined Display Name, this will be used initially when the user accesses a SharePoint site as shown below.

Not Active on Team Site

To edit the display name navigate to your My Site, this will initially look like the image below, notice that the Welcome message is not based on the display name from AD but the users account name. In this example I have blurred the domain name.

Default My Site

Click on the Details option under the My Profile Quick Launch and edit the Name field.

New name

In order to test this I have used a time stamp so I could repeat the tests and identify what had changed.

Clicking on Save will take you back to the My Site home page and will show some of the fields have updated but others have not. The fields that have not updated are based on the User Info table and is updated by the Quick Profile Synchronization timer job (see below).

Initial changes in My Site

The Quick Profile Synchronization timer job is scheduled too run regularly (minutes) but I have found in testing, and this will increase as your number of users and sites increase, it can take a while for the changes to take place. You can force this timer job by running the STSADM operation SYNC.

stsadm -o sync

stsadm -o sync

Note: this starts the job, the changes will not appear instantly.

After the sync has been performed the User Info table will be updated with the values from the My Profile details.

New name takes effect

Why do some Team Sites not update with my details

The main reason for confusion around the updating (sync’ing) of My Profile details into team sites is that it is now based on if the user is Active. As part of the upgrade to V3 Microsoft introduced the idea of users being active in a site rather than just having access.

When you first visit a site a record is recorded in the UserInfo table of the sites Content Database. The field tp_IsActive is defaulted to false, which means you have visited but have not interacted with the site.

The Sync process uses this value to determine if the user info should be replicated from the My Profile details as edited above.

Following on from the example above you should be able to refresh your team site that you had only visited and see the user name is still the same, it was not updated when the My Site was updated.

Not Active on Team Site

If you now interact with the site, either add a document or edit a link, in effect become an active user of the site, and then run the stsadm -o sync command as above the My Profile changes to the user name will be replicated to the site.

Test Site Updated

Sync Timer Jobs and STSADM

The synchronisation of the profile properties and information are based on two timer jobs, and one stsadm command (as used above). These jobs are per web application so you may see multiple of these configured in your environment. Access to these is via Centra Admin -> Operations.

Profile Timer Jobs

These timer jobs are part of the Microsoft.Office.Server.UserProfiles namespace and specifically
WSSProfileSynch
Handles the synchronization of user profile data in the Windows SharePoint Services user information list on each site, and the synchronization of Windows SharePoint Services members group membership in the user profile memberships. This class is not intended to be used directly from your code; use stsadm.exe instead.
WSSSweepSynch
Handles the incremental synchronization of user profile data in the Windows SharePoint Services user information list on each site. This class is not intended to be used directly from your code; use stsadm.exe instead.

I have yet to determine exactly which of these processes are triggered using the stsadm -o sync command.

Additional Information

Profile Synchronisation on MSDN

Sahil Malik has a good post on the high level information flow within MOSS here.

I have also included below some sample code that I used to try and speed up the timer jobs. You may want to use these to help understand what each timer job does. Note, changing the Profile Synchronization schedule will not remain, another time job appears to reset this to the installed defaults.

static void Main(string[] args){ List<System.Uri> urls = new List<System.Uri>(); urls.Add(new System.Uri(“http://mysite_webapplication”)); urls.Add(new System.Uri(“http://portal_webapplication”)); for (int i = 0; i < urls.Count; i++) { SPWebApplication webApp = SPWebApplication.Lookup(urls[i]); foreach (SPJobDefinition job in webApp.JobDefinitions) { // “profsynch” = Profile Syncronisation // “sweepsync” = Quick Profile Syncronisation if (job.Name == “profsynch”) { SPMinuteSchedule schedule = new SPMinuteSchedule(); schedule.BeginSecond = 0; schedule.EndSecond = 59; schedule.Interval = 1; job.Schedule = schedule; job.Update(); Console.WriteLine(“Temporarily Updated Profile Sync for Web Application {0}”, webApp.Name); } } } Console.ReadLine();}

Error and Omissions

Warning: Access to the database directly is not supported, I performed this in my test environment to understand why things worked the way they did.

Using a famous Todd Bleeker line from TechEd Orlando - I reserve the right to be wrong! This is what I have found so far, but my knowledge and understanding of this may change over time.

Friday, December 21st, 2007



So how many of you thought that MOSS2007 was already indexing your Office 2007 documents correctly?   Microsoft have just (17 Dec 2007) released an updated Microsoft Filter Pack  which provides additional IFilters specifically for the Microsoft Office 2007 format documents: .docx, .docm, .pptx, .pptm, .xlsx, .xlsm, .xlsb, .zip, .one, .vdx, .vsd, .vss, .vst, .vdx, .vsx, and .vtx.

Details of how to register the new filter for MOSS 2007 and Search Server 2008 are here.

 

It is still worth pointing out that there is still no TIFF support! So if this is something you need to have, and you will need to understand the impact this can have on your crawling, you should look at the following work around

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1417396&SiteID=1&mode=1

Tuesday, December 11th, 2007



It’s been a long time in the comming, a few people jumped the gun with annoucements, but it was worth the wait. MOSS 2007, WSS v3 and Office 2007 Client Suite Service Pack 1s have been released.

The 2007 Microsoft Office Servers Service Pack 1 (SP1)

Windows SharePoint Services 3.0 Service Pack 1 (SP1)

The 2007 Microsoft Office Suite Service Pack 1 (SP1)

Download an enjoy :)

Friday, December 7th, 2007



Many of you will have downloaded (or plan to download) the VPC image for Search Server 2008 Express and will be keen to get going with the Federated Searching that is the cool new things in MSS (see my other posts).

If you plan to use Shared Networking for Internet access from your VPC you will probably want to take a look at this post by the VPC guy who has an invaluable tip to ensure Windows 2003 does not start rejecting incoming packets :)

Just set your DNS in the VPC to 192.168.131.254.