Martin's profileMartin Hatch {Tales from...PhotosBlogListsMore Tools Help

Martin Hatch {Tales from a SharePoint Evangelist}

Experiences from a SharePoint Developer, and anything else that falls out of my brain ...

Welcome...

Welcome to my blog site.
I am a SharePoint evangelist and currently work for Content and Code, a Microsoft Gold Partner (London, UK) who specialise in SharePoint Consultancy Services, Development, Hosting, Support and Professional Services.

I'm working as a Solutions Architect, which basically means I am responsible for designing and scoping client solutions, driving best practice both internally and on client projects, getting more involved in the community and generally playing around with the technical bits of SharePoint.

This blog aims to be a general brain-dump of my thoughts, experiences and other ramblings on SharePoint, with the odd more structured post along the way.
If you have any questions, requests for blog posts or otherwise are just interested in the SharePoint community and networking then please do not hesitate to get in touch.

- View Martin Hatch's profile on LinkedIn
Add to Technorati Favorites
Some links to SharePoint pages you might find useful ...
July 01

FireFox 3.5 Released...

Yep, there's a new version of FireFox out there.

Version 3.5 includes HTML 5 support, "Private Browsing" modes (similar to what Google, Microsoft and Apple have been offering) and an upgrade to a faster JavaScript engine.

You can check all of the release notes here.

June 23

Resource files in SharePoint done properly ..

The message I really want to get across ... Don’t use Properties/Resources.resx

 

SharePoint resource files should be stored in one of 2 places (there are other places, but they are not commonly used):

 

·         12

o   Config

§  Resources ß Location 1 – use this for all Pages, Controls and Web Parts

o   Resources ß Location 2 – use this for all Features, Site Definitions, List Definition, Content Types (i.e. all CAML)

 

If you need to access those resources from code, then use the following:

 

C# (programmatically)

String strValue = System.Web.HttpContext.GetGlobalResourceObject(“NameOfResourceFile”, “NameOfProperty”).ToString();

 

ASPX  Markup

<%$Resources: NameOfResourceFile, NameOfProperty%>

 

XML (CAML)

$Resources: NameOfResourceFile, NameOfProperty;

How to setup Internet Connection Sharing and a VPN connection at the same time!

This all came about because I am a guinea pig for the new content and code development environment.
 
The good news is that I have a spiffy laptop with Dual Core, 4GB DDR2 and (this is the good bit) a 320GB 7200rpm hard drive (not bad for a laptop!).
 
This all allows me to kick it into gear with Server 2008 x64 and Hyper-V.
 
Now for the bad news ... Hyper-V doesn't support "Shared Networking (NAT)" even though the technically inferior Virtual PC 2007 DOES!
 
It's not too much of a heartache though, you simply have to be creative and setup yourself Internet Connection Sharing. This effectively allows your virtual machine to stay completely hidden from the big wide world, safely behind your an internally facing virtual network and your laptop's firewall.
 
This is great for development environments, as we can have stand-alone virtual machines which can be copied, rolled-back and swapped around in minutes without any of that messy sys-prep nonsense.
 
However .. things went awry when I switched on our VPN ... I was at home and didn't have the creature comforts of a dedicated piece of copper between myself and the server.
 
I turned on my VPN and it did exactly what it was supposed to .. it created a secure tunnel and promptly shut-down all my other network adapters ... including my virtual network...
 
so ... a few hours of troublshooting and chomping of the table edge and I nailed it.
 
You need to:
  1. Connect to the VPN
  2. Share the VPN connection

This effectively gives your virtual machine it's own private access to the corporate network .. great for those TFS check-ins and server builds :)

*sigh* another one for midnight oil.

Corrupted Control Template : well there's an error I've not seen before!

There I was .. doing some (behind the scenes) coding work on an accessibility project....
 
and I got this ...


 
 
What caused it???
 
Well ... it was admittedly totally my fault. I deleted one of the OOB files in ControlTemplates .. specifically one of the "DefaultTemplates.ascx" ones.
 
We were working with the field control rendering (like text box, drop-down list .. etc) and I accidentally deleted one of the files.
 
Still .. at least I'll know what it is next time :D
June 04

How to select an SPUser, even if they haven't already been added

This is a nice quick tip.
 
You want to get an SPUser object for a user account .. the problem is that you don't know if they have been added to the User Information list yet.
This is especially a problem if an Active Directory Group has been added (and exists in the User Information List) but the actual user hasn't.
 
Well, there is an easy solution!
 
SPWeb.EnsureUser(string LoginName)
 
Pass in a login name to this method. It will validate it, if it isn't already added then it will add it to the User Info List and even returns you the SPUser object that represents the specified user!
 
Enjoy :)
 

Microsoft Certifications

Microsoft Certified Professional

Microsoft Certified Professional Developer

Microsoft Certified Technology Specialist



Microsoft Gold Certified Partner

Blog Search

Loading...

Martin Hatch

Occupation
Location
Microsoft Certified Professional Developer (Web Developer) and
Microsoft Certified Technology Specialist in SharePoint Application Development and Configuration (WSS 3.0 and MOSS 2007).

Solutions Architect for a MS Gold Partner in London.
Thanks for visiting!
Please wait...
Sorry, the comment you entered is too long. Please shorten it.
You didn't enter anything. Please try again.
Sorry, we can't add your comment right now. Please try again later.
To add a comment, you need permission from your parent. Ask for permission
Your parent has turned off comments.
Sorry, we can't delete your comment right now. Please try again later.
You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
Complete the security check below to finish leaving your comment.
The characters you type in the security check must match the characters in the picture or audio.
This person's network is empty (or maybe they're keeping it private).