Michael's profileMike HackerBlogLists Tools Help

Blog


    June 24

    Blog Moved

    As of today, June 24, 2009 I have moved my blog to Sogeti’s blog hosting at http://blogs.us.sogeti.com/mhacker.

    Please update your RSS feed if you are a subscriber.

    Digg This
    June 22

    Experience Windows 7

    clip_image002[4]

    Experience Windows 7 is coming to Detroit!

    Sogeti and New Horizons is bringing Windows 7 to you!  Join us to learn about Windows most recent operating system.

    clip_image002[6]

    clip_image004[4]

    July 23, 2009

    9am – 11am

    Click to Register

    Microsoft Corporation
    1000 Town Center Dr.
    Southfield Town Center, Suite 1930
    Southfield, MI 48075

    Event Highlights

    Learn about Windows 7 benefits for businesses:

    · Make users productive anywhere
    · Enhance security and control
    · Streamline PC management

    Agenda

    · Compatibility and Deployment
    · DirectAccess
    · BranchCache
    · BitLocker
    · AppLocker
    · Virtualization
    · Search

    Are you interested in hosting a Windows 7 event on your premises? Please reach out to your local Sogeti  team to schedule!

     

     

    Digg This
    June 10

    SharePoint Photo Gallery using jQuery

    One of the requests I receive many times while working with SharePoint is to create a photo gallery.   Most of the time the users are not satisfied with just a picture library.   After seeing some nice looking “lightbox” like photo galleries I decided to come up with one that would work with images stored in a SharePoint picture library.

    This solution does not require any custom web part development, .NET code or files deployed directly to the SharePoint server.

    Requirements
    To get started you will need the following:

    1. jQuery 1.3.2
    2. PrettyPhoto jQuery plugin

    Installation

    1. Create a new picture library in your SharePoint site.
    2. Create a new document library called scripts to hold the jQuery and plug-in script files.
    3. Upload the jQuery file jquery-1.3.2.min.js to the scripts document library.
    4. Create a folder in the scripts document library called images.
    5. Unzip the PrettyPhoto plug-in and copy the 4 folders located in the /images/prettyPhoto folder into the images folder of your scripts document library.   The quickest way to do this is to switch to explorer view on the scripts document library.
    6. Upload the jquery.prettyPhoto.js file to the root of the scripts document library.
    7. Before uploading the prettyPhoto.css file open it in a text editor and update all or the image references so that they point to the images in the scripts document library.   After you have made the updates,  upload the prettyPhoto.css to the root of the scripts document library.
    8. Add a content editor web part to the zone where you wish to display the photo gallery.
    9. Paste the code listed below into the source editor window of the content editor web part.   DO NOT CLICK SAVE.

      <script type="text/javascript" src="/scripts/jquery-1.3.2.min.js"></script>
      <script type="text/javascript" src=/Scripts/jquery.prettyPhoto.js"></script>
      <link href=/Scripts/prettyPhoto.css" media="screen" rel="Stylesheet" type="text/css" />
      <script type="text/javascript">
      _spBodyOnLoadFunctionNames.push("LoadPhotoListData");
      
      
          function LoadPhotoListData() {
              var soapEnv =
                  "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \
                      <soapenv:Body> \
                           <GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
                              <listName>Photo Gallery</listName> \
                              <viewFields> \
                                  <ViewFields> \
                                     <FieldRef Name='EncodedAbsThumbnailUrl' /> \
                                     <FieldRef Name='FileRef' /> \
                                     <FieldRef Name='Title' /> \
                                     <FieldRef Name='NameOrTitle' /> \
                                 </ViewFields> \
                              </viewFields> \
                          </GetListItems> \
                      </soapenv:Body> \
                  </soapenv:Envelope>";
      
              jQuery.ajax({
                  url: "/_vti_bin/lists.asmx",
                  type: "POST",
                  dataType: "xml",
                  data: soapEnv,
                  complete: processResult,
                  contentType: "text/xml; charset=\"utf-8\""
              });
          }
          function processResult(xData, status) {
              jQuery(xData.responseXML).find("z\\:row").each(function() {
                  var url = $(this).attr("ows_FileRef");
                  url = url.substring(url.indexOf(';#') + 2);
                  var title = $(this).attr("ows_Title");
                  if (title == undefined)
                      title = $(this).attr("ows_NameOrTitle");
                  var liHtml = "<a rel='prettyPhoto[gallery]' class='group' title='" + title + "' href='/" + url + "'><img border='0' src='" + $(this).attr("ows_EncodedAbsThumbnailUrl") + "' alt='" + title + "'></a> ";
                  jQuery("#myThumbs").append(liHtml);
              });
              
              jQuery("a[rel^='prettyPhoto']").prettyPhoto({
                  animationSpeed: 'normal', /* fast/slow/normal */
                  padding: 40, /* padding for each side of the picture */
                  opacity: 0.35, /* Value betwee 0 and 1 */
                  showTitle: true, /* true/false */
                  allowresize: true, /* true/false */
                  counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
                  theme: 'light_rounded', /* light_rounded / dark_rounded / light_square / dark_square */
                  callback: function() { }
              });
      
      
          }
      </script>
      
      <div id="myThumbs" />
      
    10. Review all of the script tags and make updates to the src attribute so that they are properly referencing the js files in your scripts document library.
    11. Review the link tag and verify that the hfref attribute is properly referencing the css file located in your scripts document library.
    12. In the soapEnv variable make sure the value for the <listName> node is set to the name of your photo library.
    13. In the jQuery.ajax call verify that the url property is referencing the _vti_bin/lists.asmx file for your SharePoint site.   If your sharepoint site URL is http://somesite.com/sites/mysite then the url property should be set to http://somesite.com/sites/mysite/_vti_bin/lists.asmx.
    14. Click on the Save button on the source editor window.
    15. Upload images into your new picture library.

    If you have all of the files and urls properly referenced you should now see thumbnails of every photo in the library.  

    PhotoGallery1

    Clicking on a photo will open the full size version in a nice lightbox like window.

    PhotoGallery2

    Note:   This method will not work if you want to have multiple photo galleries on a single page.

    With jQuery and the content editor web part you can do some pretty amazing things within SharePoint!

    Digg This
    May 29

    Free eBook from Sogeti – Me the Media

    Sogeti has released a new book called Me the Media which can be download for free in PDF format or purchased from Amazon.com.

    Proclaiming that the rise of Web 2.0 will have an impact as far-reaching as the invention of the printing press or the birth of mass media, a new book titled Me the Media – Rise of the Conversation Society – Past, Present and Future of the Third Media Revolution presents a wide-ranging discussion of how today’s personal media tools are transforming communications as well as other aspects of society – including how companies market their products and services.

    MeTheMedia[1]

    A special chapter called The Obama Moment, written by Peter Leyden - former managing editor at Wired magazine and currently CEO of NextAgenda, a think tank on the transformative use of new technologies, addresses the pivotal role of digital media in Barack Obama’s presidential campaign and its ushering in of a new conversational phase in the use of Web media. The 292-page book also covers topics such as:

    Sogeti USAHow ’Me Media’ has displaced the voices of corporations, politicians and traditional journalists, creating the new ’Conversation Society’ in which individuals and ad-hoc communities hold the power.

    Sogeti USAThe emergence of ’Hyperegos’ consisting of individuals, brands, companies, politicians individuals and organizations – well-known through outlets such as CNN’s iReport, iGoogle, iPhone, myBarackObama and YouTube, endlessly hyperlinked through social media, and what that means for businesses and society at large.

    Sogeti USAThe importance of ’crowdsourcing’ as a key 21st century business strategy, presenting opportunities for businesses to make use of ideas flowing from existing and potential buyers through today’s open Web conversations while simultaneously establishing closer relationships with customers.

    Sogeti USAThe way in which virtual worlds like Second Life, mirror worlds like Google Earth and other developments are converging to create a new ’Metaverse’ – a digital extension of the physical universe in which the lines between our online and offline identities will increasingly blur.

    The book is filled with examples and graphics that underscore its points, ranging from Dell’s experience with customer forums to discussions of how disparate projects such as electronic design community Crowdspirit, the Obama Girl, LinkedIn, Digg, Twitter, Jaiku, OpenID, the film Waking Life and scores of others reflect and have contributed to altering the balance of power between brands, organizations, politics and the public.

    Me the Media was written by Jaap Bloem, Menno van Doorn and Sander Duivestein, all affiliated with new technology analyst VINT (www.sogeti.com/vint). VINT is the new technology research arm of the Sogeti Group, a provider of professional technology services in 14 countries and a wholly owned subsidiary of Paris Stock Exchange-listed Cap Gemini S.A. VINT is available for speaking engagements on topics from Me the Media. Erik van Ommeren, Director of Innovation at VINT can be contacted for more information around the same.

    May 20

    Single Sign-On Interview

    I recently sat down with David Giard and spoke about single sign-on.   Check out the video on his website at www.davidgiard.com.   The video clocks in at about 21 minutes.

    May 18

    David Giard to Speak at CodeStock and West Michigan .NET User Group

    David Giard, a Sogeti principal consultant, will be giving a presentation on the Microsoft Managed Extensibility Framework at both CodeStock in Knoxville and the West Michigan .NET User Group.

    CodeStock conference will be held on June 27th in Knoxville, TN.

    The presentation at the West Michigan .NET User Group will be on July 14th.

    Visit David Giard’s blog

    May 07

    SharePoint 2007 Error with .NET Framework 3.5 SP1 - Update

    It looks like the problem I was having with the SharePoint Farm after having .NET Framework 3.5 SP1 installed was caused by the new loopback security check feature.

    To resolve my issue I had to disable the loopback checking for specific host headers.   I followed the instructions for method 2 found here and it resolved the issue in our QA environment.

    May 04

    Windows Virtual PC for Windows 7

    Tomorrow, May 5th, Microsoft will unleash Windows 7 RC to the public.   Also being released is a separate download called Windows Virtual PC 7 and Windows XP Mode.     This package is designed to make it easier for companies to move to Windows 7 without having the major compatibility issues that plagued Vista.

    The idea behind Windows XP Mode is that you have a full copy of Windows XP running in a virtual environment that allows you to publish applications out to the Windows 7 start menu.   This means that you can have Windows XP applications running virtualized directly on the Windows 7 desktop.   This is very cool stuff.    You don’t need a full Virtual PC XP desktop in a small window to use your older applications.  They will show up right on your Windows 7 desktop just as if they were running on Windows 7 natively. 

    Windows XP Mode runs on a new version of Microsoft Virtual PC designed for Windows 7 called Windows Virtual PC.    This new virtualization software integrates very tightly with Windows 7 and provides better performance and stability than Virtual PC 2007.   Windows Virtual PC does require a computer with hardware assisted virtualization technology.   This isn’t a big deal if you have a laptop or desktop built within the past 2 – 3 years.   Individuals with older systems may find that they are unable to use Windows XP Mode due to this requirement.

    Now for the problems.   Windows Virtual PC is really not that exciting of an upgrade.   Sure it offers application virtualization and USB support but there isn’t really anything new here that we haven’t already seen in other products or in VMWare.    In fact Microsoft made a HUGE mistake in my opinion by still only supporting 32 bit guest operating systems.     What is Microsoft thinking?    VMWare has had this capability on the desktop for a long time now.    Very disappointing indeed.

    One other problem I noticed is that if you have been running Virtual PC for a while and you have older VHD files you may have encountered an issue where your VHD files were split into multiple files.   When this happens you will see .VHD, .V01, .V02, etc…  instead of a single VHD file.     These split files will not work with Windows Virtual PC.    You need to make sure you use Virtual PC 2007 Virtual Disk Wizard to compact these files back into a single VHD prior to installing Windows Virtual PC.   If you do not do this you will end up without access to your important virtual machines.

    Overall Windows XP Mode is a good idea and will probably help some businesses move onto the new operating system and away from XP.   For developers the release of Windows Virtual PC without 64bit guest support is a big mistake.   All future server operating systems and software will only be available in 64bit and I am sure most developers would prefer to not run a full blown server OS full time as their main operating system just so they can work in a 64bit server environment.   This mistake by Microsoft will keep pushing more and more people to VMWare.

    April 28

    Office 2007 / WSS 3.0 / SharePoint Server 2007 SP2 Released

    Joel Oleson has a great post about the recent SP2 release for Office 2007, SharePoint 2007 and WSS 3.0

    View article...

    SharePoint 2007 Error With .NET Framework 3.5 SP1

    Recently I encountered an issue with Microsoft Office SharePoint Server 2007 after installing service pack 1 for the 3.5 .NET Framework.    I have reproduced this error under SharePoint 2007 SP1 and now SharePoint 2007 SP2.

    The error is not something that a normal user would run into during day to day use of SharePoint.  This is one of those things that a developer will most likely encounter.   

    I used SharePoint Designer to create a data view based upon a call to the queryex method of the  SharePoint search.asmx web service.   I am not doing anything special here,  just running a query and displaying the search results.      This works 100% under .NET 3.5 but once .NET 3.5 SP1 is installed the data view will no longer function.  

    If I open up the page where the web part resides using SharePoint Designer I see the error on the page.   Clicking on the show data option in the data source library tab will just display a message that a server error occurred.

    Trying to troubleshoot this more I opened up Fiddler to watch the HTTP requests from SharePoint Designer out to the web services.   I notice that a request is sent to the webpartpages.asmx web service whenever I click on the  show data option in SharePoint Designer.   This web service always returns a 500 sever error with no additional details.    I looked in the SharePoint logs and in the server event logs and could not gain any more insight into the root cause.

    So far the only solution I have is to not apply the .NET 3.5 SP1 update to the servers.

    I would love to see a solution so that we can use the SharePoint web services with a data view web part after .NET 3.5 SP1 has been installed.

    April 20

    jQuery and SharePoint – Hiding Welcome Menu Items

    One of the requirements I have run across a few times is to remove one or more menu items from the SharePoint 2007 welcome menu.   One quick and easy way to accomplish this task without server side code and/or modifications to SharePoint system files (never recommended) is to use jQuery.  

    Using jQuery you can easily accomplish this task with just a few lines of code.   Below I am registering the javascript function HideControls with SharePoint so that the function is automatically called upon page load.    The HideControls function uses JQuery to locate the menu nodes and remove them.  As you can see this is being accomplished by using the jQuery method replaceWith and passing in an empty string.

    This script which is placed in a custom SharePoint master page will hide the Login as a Different User, Request Access, and Logout menu items from the Welcome menu.    Don’t forget that someplace in the <head> section of your master page you need a script reference to the jQuery .JS file.   This sample was tested with version 1.3.2 of jQuery.

    <Script>

    _spBodyOnLoadFunctionNames.push("HideControls");





    function HideControls() {
    jQuery.noConflict();
    jQuery("*[id*='_LoginAsDifferentUser']").replaceWith("");
    jQuery("*[id*='_RequestAccess']").replaceWith("");
    jQuery("*[id*='_Logout']").replaceWith("");
    }

    </Script>



    With a little bit of jQuery it is possible to make minor UI adjustments to SharePoint  to meet your needs.

    Windows 7 RC Now Available for Partners

    Today Microsoft has made available Windows 7 RC to partners with MSDN or TechNet subscriptions.   According to the Microsoft Partner site everyone else will be able to download Windows 7 RC starting on May 5th.

    https://partner.microsoft.com/US/40084742#tab7

    Update:  It looks like someone at Microsoft may have jumped the announcement a bit.  The download link is now gone from the partner site and so far only the beta are showing on TechNet and MSDN.   I am sure we will be getting more news on this soon.

    Update 2: The RC will be available to the public on May 5th but TechNet and MSDN subscribers will have access on April 30th. 

    April 14

    SharePoint Document Library – Link to Document

    While working with a SharePoint document library you may run across a requirement to have a link to a document located someplace else.  Initially this may look to be impossible since the document library holds files only and not shortcuts or links to other locations.

    Using the Link to a Document content type that is built into SharePoint you can achieve this functionality.   Once enabled you will see the Link to a Document option appear in the “new” drop down menu for the document library.

    To add the content type, go into the document library settings and choose advanced settings.   Set the “allow management of content types?” option to yes and then click ok.   You will now be returned to the settings page for the document library.  You should now see a section on that page titled content types.   Click on the Add from existing site content types link.  From the available site content types list choose link to a document and then click the add button to place it in the right list box.   Click ok to save the changes.

    You will now be able to add links to documents in other locations to your current document library by selecting the link to a document option from the new drop down menu.

    April 13

    Collaboration in the Cloud

    I am very pleased to announce the availability of a new book jointly written by Microsoft and Sogeti called Collaboration in the Cloud.    This book will be available soon for purchase from your favorite retailer or you can get a free copy in PDF format from the link below.

    Summary: Improving Collaboration between people and between organizations is no longer optional if you want to survive in today’s hyper connected business world. Speed of change, unpredictability and the increasingly social nature of the marketplace make collaboration instrumental to your company’s ability to differentiate. New ways of collaboration are starting to take place within your company, across value chains and in the individual social domain of your employees. At the same time, new architecture and delivery models are bringing many new collaborative tools within reach of every person in your organization, with or without your knowledge or control. On the technology side, a volatile mix of acronyms like SOA – Service Oriented Architecture, SaaS – Software as a Service and Web2.0 is brewing that is drastically changing our view on the role and value of Information Technology. If left to chance there is little hope for success: you need a strategy. In this book we address the changes and opportunities that come with this new business world that is starting to show all around us. In it we talk about autonomous, bottom up organizations where innovation and collaboration are part of the culture. We discuss Value Chain 2.0, where it is about quickly establishing combinations that offer value to the marketplace. It is about crossing boundaries and taking the full benefits from Cloud Computing and anything available As A Service, from platform to complete business solution

    Download a free copy of this book in PDF format from Sogeti’s website.

    April 02

    SharePoint Designer is FREE

    The title says it all.   Microsoft has made SharePoint Designer available for free at http://www.microsoft.com/spd.

    A few words of advice when using SharePoint Designer

    • Use SharePoint designer on your development environment and then have a developer package up your modifications into a solution package (.WSP) that can be redeployed and reused in the future.
    • Using SharePoint Designer for 1 off simple workflows is not a sin.   Just remember that it is not a simple process to move an existing SharePoint Designer workflow to another location.
    • Remember that if you make any change to a web page in SharePoint using SharePoint Designer it becomes “unghosted”.   This means a copy of the page is now stored in the content database instead of living in its original location.  If the original file that the page is based upon is changed or updated it will not be reflected in your unghosted page.
    • SharePoint Designer is great for creating dataview web parts or for working out XSL formatting issues.   Once you have the web part working the way you want, always export it and then revert the page back to the site definition.   You can then import the web part back into the site and place it on the page.    This will prevent the page from staying unghosted.
    • SharePoint Designer can help you tweak your Master Pages and CSS files.    Make sure that you do this only in your development server and then package the results into a solution package (.WSP) for deployment on your production servers.
    • Make sure your server is patched up well before using SharePoint Designer.   There was a bug fixed in a recent hot fix that would cause the W3WP worker process to crash when SharePoint Designer is connected to a site.     You don’t want that to happen on your production site. 

    If you have any constructive best practices for using SharePoint Designer please post a comment.   For those anti-SPD people, please don’t just say “Don’t use it”.    :-)

    March 10

    Windows Server 2008 with Hyper-V as a Developer Workstation

    Microsoft Windows Server 2008 with Hyper-V is a great platform for developers who need to work across a wide variety of platforms.   Many developers are already using Microsoft Virtual PC for their development environments but soon this will not be a viable option.  Why?  All future Microsoft server products will only be offered in 64bit versions and Virtual PC only supports 32bit guest operating systems. Windows Server 2008 with Hyper-V can solve this issue since it can host both 32bit and 64bit guest operating systems.

    I have been running Windows Server 2008 R2 Beta with Hyper-V for a while now and have to say that I am really impressed with the performance and capabilities.   There is, however, one small issue that may turn people off from using Windows Server 2008 with Hyper-V as their OS of choice…   Poor 3D video capabilities in the primary OS partition.

    At first I was a bit confused by this.   I can enable all of the cool Windows 7ish desktop features including Aero but the performance was not good at all.  I thought maybe it was my video drivers since my computer ran Windows 7 beta lightening fast.     I updated the drivers and still slow performance.

    I finally realized the issue.   When you enable Hyper-V on Windows Server 2008 the primary OS is lifted up and the hypervisor is placed under it.   This means that your primary OS is actually running just like any other virtual server.    Requests from the primary OS now go through the hypervisor first.   

    In most situations you won’t notice much of a difference in performance but when you kick up the 3D graphics it will cause things to feel sluggish.   This is because 3D video operations do a lot of memory reads/writes and the hypervisor has to manage all of these calls.    This causes the calls to respond slower than if it was running native to the hardware.

    If you do decide to use Windows Server 2008 with Hyper-V as your development platform you will most likely want to choose a desktop theme without all of the fancy 3D Aero graphics.  This will make your system feel like it is performing much faster and is more responsive to mouse and window operations.

    I can live without all of the fancy 3D graphics on my development machine as long as I have a good development experience in my virtual environments.

    W3WP Crash When Using SharePoint Designer

    While attempting to use SharePoint Designer to make some minor modifications to the editform.aspx page of a list I ran into a situation where the W3WP.EXE process on the SharePoint server would crash. 

    In the application event log on the SharePoint server I found the following error:

    Faulting application w3wp.exe, version 6.0.3790.3959, stamp 45d6968e, faulting module kernel32.dll, version 5.2.3790.4062, stamp 46264680, debug? 0, fault address 0x0000bee7.

    This really doesn’t offer much help.  But what I did know I could reproduce the error easily by attempting to edit any aspx page in SharePoint Designer.    I decided to load up Fiddler to take a peak at the HTTP requests to the server to see if I could find any clues as to the cause of the error.

    With Fiddler running I could see that everything was loading fine into SharePoint Designer right up until it tried to call the GetAssemblyMetaData method on the webpartpages.asmx webservice.   Once that request was made I immediately saw the w3wp.exe error in the event log and according to Fiddler all other request just appeared to hang.  

    Within Fiddler I could look at an XML representation of the request.  There I saw that the GetAssemblyMetaData method was taking a few parameters.  One of the parameters was called assemblyName and was being set to microsoft.office.server.search, version=12.0.0.0, culture=neutral, publickeytoken=71e9bce111e9429c.

    Interesting, why would SharePoint Designer be trying to get assembly meta data information from the SharePoint search assembly?   I opened up my custom masterpage for the SharePoint site and found the following registration:

    <%@ Register TagPrefix="SEARCHWC" Namespace="Microsoft.Office.Server.Search.WebControls" Assembly="Microsoft.Office.Server.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

    I did some research and from everything I can see I really don’t need that assembly registration in my masterpage.   Once I removed this line from the masterpage I was able to load and edit the editform.aspx file within SharePoint Designer with no problems.

    It is important to note that this issue didn’t surface until the December cumulative patches were applied bringing the environment to version 12.0.0.6335.  Prior to that patch we were able to use SharePoint Designer without issue even when the masterpage had the SharePoint search assembly registration. 

    One other interesting point is that after this registration tag was removed I watched all of the calls SharePoint Designer made to the SharePoint server.   The GetAssemblyMetaData method was never called.    I really wonder what triggers SharePoint Designer to call that method on the SharePoint search assembly registration and not on any other assembly registration.    

    I would love to hear from anyone who has had a similar experience or might be able to shed some light on the GetAssemblyMetaData method call from SharePoint Designer.

    Update: It looks like this may have been fixed in the February cumulative updates for SharePoint.     From the release notes: “issues fixed: When you open a SharePoint Search site by using SharePoint Designer, the W3wp.exe process crashes.”

    SharePoint 2007 – Issue with Active Directory User Information Sync

    Problem:  User had personal information changed in Active Directory, such as last name or email address and SharePoint continues to display and/or use the old information in sites.   The user profile information on the mysite appears correct.

    Issue:  SharePoint only syncs user information in sites for “Active” users.  These are users that are explicitly added to a SharePoint group in a site.   A user that belongs to an AD group that was added into a SharePoint group is not considered active by SharePoint.

    Fix: Add the user directly to a group within the site temporarily until the profile sync process occurs.  Once the information is updated you can remove the user from the group.  You can try to force a sync with the command stsadm –o sync

    Additional Information:
    It is possible to verify this issue by running a query directly against the SQL Database tables.    Run the following query against each of the content databases to find out in what sites the user information needs to be synced.

    select tp_login,tp_title,tp_email,tp_isactive, c.fullurl from dbo.userinfo a
    inner join dbo.sites b on a.tp_SiteID = b.Id
    inner join dbo.webs c on b.RootWebId = c.Id
    where a.tp_login='domain\username'

    Replace domain\username with the full domain and username of the affected user.
    The field tp_isactive should be 1 when the user is directly added to the site and 0 when the user is not directly added to the site.   The sync process will only occur with the tp_isactive is set to 1. 

    NOTE:  Do not use insert, update or delete statements against the database tables. 

    March 05

    Windows 7 “Previous Versions” Feature

    I know that the “Previous Versions” feature is not something exclusive to Windows 7.  In fact Windows Vista users have this same functionality built in.   Most people probably don’t even know it is there and if they do they have no idea what it is for.

    The previous versions feature is a very hand dandy thing for when you royally screw something up like I did this evening.   While messing around with one of my favorite free services, Live Mesh, I managed to accidentally delete several hundred files and folders under the My Documents directory.   It was totally my own fault.   Not only did I send them into my recycle bin, my nasty habit of keeping things clean caused me to also flush out the recycle bin before I realized what I had done.     A couple hours later I realized what I had done and freaked out like any normal person would when they figured out what kind of damage they just caused.

    What to do… indeed.   Well my first thought was “undelete”.  Back in the old days before recycle bins you could run a handy little utility to find and recover deleted files as long as their sectors on the hard drive had not been overwritten.    So a quick search I found a few of these tools; one being free (my favorite price).   For some reason this just didn’t feel right.    I knew I was missing something.    I kept thinking that these new great operating systems must have one last trick to save us when we do something dumb.

    Then it hit me.  I remember seeing the previous versions tab on the properties dialog box for a folder.   I right clicked on the root folder where I had committed the file massacre and then selected properties.   Within a moment there it was; the previous versions tab.   I click on it hoping to see something good and after a few seconds there it was in all of its glory.    This folder had eight previous versions listed, with the last one having a time stamp just about 30 minutes prior to when I engaged in my stupidity. 

    It now only took me a simple selection and then the click of the restore button to watch almost 1,000 files magically restore back to their original location.    The good news is that I had not made any changes to files in that folder after the restore point had been automatically made by the operating system.

    I am all back in business!   

    I would recommended that besides having regular backups of your important files you also check out and understand this great buried gem in Windows Vista and Windows 7!   Who knows, it might save you some headache too.

    More information: WinHelp Online Article

    February 12

    W3WP Crash When Using SharePoint Designer

    While attempting to use SharePoint Designer to make some minor modifications to the editform.aspx page of a list I ran into a situation where the W3WP.EXE process on the SharePoint server would crash. 

    In the application event log on the SharePoint server I found the following error:

    Faulting application w3wp.exe, version 6.0.3790.3959, stamp 45d6968e, faulting module kernel32.dll, version 5.2.3790.4062, stamp 46264680, debug? 0, fault address 0x0000bee7.

    This really doesn’t offer much help.  But what I did know I could reproduce the error easily by attempting to edit any aspx page in SharePoint Designer.    I decided to load up Fiddler to take a peak at the HTTP requests to the server to see if I could find any clues as to the cause of the error.

    With Fiddler running I could see that everything was loading fine into SharePoint Designer right up until it tried to call the GetAssemblyMetaData method on the webpartpages.asmx webservice.   Once that request was made I immediately saw the w3wp.exe error in the event log and according to Fiddler all other request just appeared to hang.  

    Within Fiddler I could look at an XML representation of the request.  There I saw that the GetAssemblyMetaData method was taking a few parameters.  One of the parameters was called assemblyName and was being set to microsoft.office.server.search, version=12.0.0.0, culture=neutral, publickeytoken=71e9bce111e9429c.

    Interesting, why would SharePoint Designer be trying to get assembly meta data information from the SharePoint search assembly?   I opened up my custom masterpage for the SharePoint site and found the following registration:

    <%@ Register TagPrefix="SEARCHWC" Namespace="Microsoft.Office.Server.Search.WebControls" Assembly="Microsoft.Office.Server.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

    I did some research and from everything I can see I really don’t need that assembly registration in my masterpage.   Once I removed this line from the masterpage I was able to load and edit the editform.aspx file within SharePoint Designer with no problems.

    It is important to note that this issue didn’t surface until the December cumulative patches were applied bringing the environment to version 12.0.0.6335.  Prior to that patch we were able to use SharePoint Designer without issue even when the masterpage had the SharePoint search assembly registration. 

    One other interesting point is that after this registration tag was removed I watched all of the calls SharePoint Designer made to the SharePoint server.   The GetAssemblyMetaData method was never called.    I really wonder what triggers SharePoint Designer to call that method on the SharePoint search assembly registration and not on any other assembly registration.    

    I would love to hear from anyone who has had a similar experience or might be able to shed some light on the GetAssemblyMetaData method call from SharePoint Designer.