Thursday, March 11, 2010

Microsoft SharePoint Server 2010 – Certifications?

I just read an official note that there will be new four SharePoint 2010 certifications – and they are not specific to either SharePoint Foundation 4 or SharePoint Server 2010.

These exams are:

  • 70-667: TS: Microsoft SharePoint 2010, Configuring
  • 70-668: PRO: Microsoft SharePoint 2010, Administrator
  • 70-573: TS: Microsoft SharePoint 2010, Application Development
  • 70-576: PRO: Designing and Developing Microsoft SharePoint 2010 Applications

According to this blog post, the exams are expected to be available in June/July timeframe. More details here.

Tuesday, February 02, 2010

Microsoft SharePoint 2007 – ItemAdded/ItemAdding List Event Receivers and SPFieldUserValue.User not returning SPUser

 

The Problem
I recently had to develop an Event Receiver that would require reading off the SPUser object of the item. What I found is that, at times when the exact name of the user is entered (and you click OK on the NewForm.aspx page without clicking the check name image  button), the SPFieldUserValue will return

–1;#domain\username

rather than

23;#domain\username.
 image

This is a problem when you try to access the SPFieldUserValue.User (SPUser type) property and it returns null.

The Solution
The solution was to get the SPFieldUserValue as a string, and then use the username to then try and resolve for the SPUser object. My rough cut out code is attached – quickly modified for this example. (*Use at your own risk. Is also why I don’t usually post code on my blog!)

Tuesday, December 08, 2009

Microsoft SharePoint Server 2010 Beta 2 – How to recover data from an unattached content and restore it to a (or another) site

A new feature in SharePoint 2010 is the ability to recover content from an unattached database (also tested to work for attached databases). The following are steps to do this (in case I forget in the future).
Note of warning: Screen shots and directions in this entry are based on SharePoint 2010 Beta (v. 14.0.4536.1000) and may change without notice.
I. Export from Database
1. Within Central Administration v4, browse to “Backup and Restore” section in the Quick Launch
image
2. Click “Recover data from an unattached content database”:
image
3. On the “Unattached Content Database Data Recovery” Page, enter the database server and database name of the source database to restore from, select “Browse content”, and click Next:
image
4. Select the Site Collection from the Database, the site from the database and the List as required, select “Export site or list”, and click Next (Note – this screen shot is based on a Beta version, and it appears that even though you have the correct site collection selected, the URL shows the central administration url. Only the relative URL is correct here):
image
5. Type in a file share location (ensure the SharePoint Farm account has owner access to this folder in Windows), and click Start Export:
image
6. Wait for the job to complete:
image
image
7. Files will be created in the share directory (Note: Contents of the .cmp file can be opened as a cab file – just like most other wsp packages):
image
II. Import to new Site
1. Open up the SharePoint 2010 Management Shell
image

2. Let’s assume we have already created a blank site to be restored to @ dougleung.com. We will now restore to that SharePoint Site:
Run this command in the Management Shell:
Import-SPWeb –Identity [url] –path [path]
eg. Import-SPWeb –Identity http://dougleung.com –path \\servername\folder\exportfile.cmp
image
3. Your contents from your export file (in this case the exported Announcements list) will be imported to the dougleung.com site.

Thursday, October 22, 2009

Microsoft SharePoint 2010 Beta – Developer Resources

I was browsing around to dig more on SharePoint 2010 developer resources trying to get my head around more SharePoint 2010 knowledge. Some very useful resources for starters:

Get Started Developing on SharePoint 2010
http://msdn.microsoft.com/en-au/sharepoint/ee513147.aspx
This page includes 10 series of video tutorials on SharePoint 2010 development with topics including Building SP 2010 Web Parts, SharePoint 2010 concepts, Accessing SP 2010 data with server/client side APIs, Access external data with BCS, SP 2010 Workflows, Creating Silverlight UIs for SP 2010 solutions, Sandboxed solutions and Dialogs and Ribbon controls for SP 2010.

SharePoint Foundation 2010 and SharePoint Server 2010 SDK:
http://msdn.microsoft.com/en-us/library/dd776256.aspx
This SDK has been publicly online since the SharePoint 2010 Sneak Peak web site was available.

The main important links I want to put up for myself are:
What’s New in SharePoint Foundation 2010:
http://msdn.microsoft.com/en-us/library/ee539826%28office.14%29.aspx

What’s New in SharePoint Server 2010:
http://msdn.microsoft.com/en-us/library/ee557323%28office.14%29.aspx


Looks like I am on a steep learning curve… yet exciting and worth while!

Friday, September 18, 2009

Office Web Applications (Tech Preview) in Windows Live

We’ve seen Google Docs, we’ve see Microsoft Office – but we haven’t yet seen Microsoft Office applications running as a Windows Live service. The Windows Live team announced on their blog today the release of a ‘Tech Preview’ to a “select group of SkyDrive" customers”.

As the a consumer, I am extremely delighted on the news as I was never really a fan of Google Docs. It’s great to get free access to a fully functional and fully featured MS Office over the web :)

Sounds interesting? Check out the Video below.



Source: http://windowslivewire.spaces.live.com/blog/cns!2F7EB29B42641D59!41451.entry?wa=wsignin1.0&sa=434146655

Wednesday, August 05, 2009

MOSS 2007 – User Profile Imports and LDAP Cheat Sheet

 

I’ve tried to get an instance importing but still with no luck – there must be something else preventing it from importing… Anyways, I decided to write down my research for the day:

Default SharePoint settings are:

Search Base: dc=domain,dc=company,dc=com
Base Query: (&(objectCategory=person)(objectClass=user))

Options:

Options for Search Base:
-
Can define a specific OU to base the import on. eg. ou=Sydney,ou=Department1,dc=domain,dc=company,dc=com

Options for LDAP Filter Query:
Get all accounts with email address:
(&(objectCategory=Person)(objectClass=User)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(email=*))

Get active accounts – filter our disabled AD accounts:
(&(objectCategory=person)(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=2))

Get accounts in the Department1 OU:
(&(objectCategory=Person)(objectClass=User)(memberof:1.2.840.113556.1.4.1941:=(CN=Authenticated Users,OU=Department1,DC=domain,dc=company,dc=com)))

Get accounts with a first name:
(&(objectCategory=Person)(objectClass=User)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(!(!givenName=*)))

 

Good References:
Scope of Query – Base, One Level, Subtree: http://msdn.microsoft.com/en-us/library/aa746467%28VS.85%29.aspx

LDAP Search Filter Syntax:
http://msdn.microsoft.com/en-us/library/aa746475%28VS.85%29.aspx

Importing Specific group into SP User Profile Store with LDAP:
http://mindsharpblogs.com/wayne/archive/2005/06/15/497.aspx

LDAP Attributes:
http://www.computerperformance.co.uk/Logon/LDAP_attributes_active_directory.htm#LDAP_Attribute_

A Nice LDAP Attribute Table:
http://www.it.ufl.edu/projects/directory/ldap-schema/attributes.html

Assemblies – A good read on AnyCPU, x86, and x64

Just read the following blog spot by Eugene Rosenfeld, a MOSS MVP, about assembly compilations. In my opinion, a very good to read article:

http://thingsthatshouldbeeasy.blogspot.com/2009/08/anycpu-x86-x64-whats-difference.html

Tuesday, July 14, 2009

Time Capsule 2006 to 2009 - The Technologies of a technical consultant

I was sitting on the train today, thinking about the technologies I have worked with in the last three years. And you know what? I have to say web technologies have developed extremely quickly (Well of course it is!). Being a consultant allows me to indulge myself into the latest technologies, and most of the time, take the latest technologies for granted.

Sometimes I think it is actually quiet an effort to keep up (yet I have to for my passion and profession). What I mean for example is say, you install an SDK for Silverlight 2.0, work with it a little while, then you will find yourself installing the SDK for Silverlight 3.0 (And of course with that Visual Studio 2010)! It is hard work to keep up, but it is worth it!

I've worked with SharePoint 2003, I'm working with SharePoint 2007 technologies and now with the sneak peak at the exciting SharePoint 2010, I have to say being a techy guy is the best job in the world! It is very rewarding to see Microsoft listening to customers, giving them what they want. I dig the new BCS, I dig the new ribbon within the web browser, I dig multi-item checkouts, I dig the new developer tools, I dig the new backup and restore tools, I dig the new central admin.....I dig it, I dig it, I dig it! Then again, it is hard work to keep up, but it is worth it!

Anyways, the purpose of this is to keep a time capsule of the (non beta) technologies I have played within the 3 yr period. Who knows how many of these technologies will stay in my list? Here goes...

2006-2009:
Microsoft Technologies
  • C#/VB
  • ASP.NET
  • .NET 1.0, 1.1, 2.0, 3.0, 3.5
  • SQL 2000, SQL 2005, SQL 2008
  • Windows 2000, Windows 2003, Windows 2008, Windows XP, Windows Vista, Windows 7
  • Microsoft CRM 3.0
  • Microsoft CRM 4.0
  • WSS 2
  • SharePoint Portal 2003
  • WSS 3
  • MOSS 2007
  • MS Office 2003/2007
  • Microsoft Search Server 2008 and FAST
  • Silverlight 1.0
  • Silverlight 2.0
  • Internet Explorer 6.0/7.0/8.0

Third Party
  • Javascript and AJAX
  • JQuery
  • Flash
  • DotNetNuke
  • SugarCRM
  • Meridio
  • HP Trim



Thursday, July 02, 2009

Silverlight 2.0 – Silverlight Apps calling asmx web services

A while back I worked on a Silverlight application that was hosted in SharePoint. The Silverlight application was to call a web service written by a third party vendor in .NET 2.0.

Problem
As what we all normally would do in a Silverlight app is to call this web service. However, I got the following error when my application tries to call the asmx web service:

“An error occurred while trying to make a request to URI 'http://localhost:1000/webservice.asmx'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. Please see the inner exception for more details.”

SLAccessError

Solution

After some research, I found a recipe to get it going again:

  1. Create a new file within the web service application (at the root of the requesting domain), called clientaccesspolicy.xml with the following contents:


    <?xml version="1.0" encoding="utf-8"?>
    <access-policy>
    <cross-domain-access>
    <policy>
    <allow-from http-request-headers="*">
    <domain uri="*"/>
    </allow-from>
    <grant-to>
    <resource path="/" include-subpaths="true"/>
    </grant-to>
    </policy>
    </cross-domain-access>
    </access-policy>



  2. Create another file within the web service application(at the root of the requesting domain), called crossdomain.xml with the following contents:

    <?xml version="1.0" encoding="utf-8"?>
    <cross-domain-access>
    <allow-http-request-headers-from domain="*" headers="*"/>
    </cross-domain-access>

After adding these policy files, my app started working. Hope this helps.

References

http://timheuer.com/blog/archive/2008/04/06/silverlight-cross-domain-policy-file-snippet-intellisense.aspx

http://timheuer.com/blog/archive/2008/06/10/silverlight-services-cross-domain-404-not-found.aspx

Microsoft SharePoint 2007 – Renaming a MOSS Server


This is the N-the time I’ve had to rename a SharePoint server, and every time I keep on forgetting the exact steps… so these are notes for the (Technical) me.

  1. Change each alternate access mapping for MOSS 2007/WSSv3 deployment in Central Admin reflecting new server name
  2. Register the change with SharePoint, using:

    stsadm -o renameserver -newservername <newname> -oldservername <oldname>


  3. Rename server in Windows
  4. Restart server
  5. Post restart, update SharePoint farm credentials using:

    stsadm -o updatefarmcredentials -userlogin <domain\domainuser> -password <password>


  6. Run an iisreset
  7. Check the accounts used in application pools within IIS, update to reflect new machine name accounts
  8. Rebuild the search index (remove and recreate)
  9. Operation Complete!

Source: http://www.sharepointblogs.com/mirjam/archive/2007/08/06/renaming-a-moss-server.aspx (Thank you Mirjam)