Welcome to Atlanta .NET Regular Guys Sign in | Join | Help

Visual Studio 2008 Loadfest / Halo Fragfest / Guitar Hero Rockfest!

For those of you in Atlanta or the surrounding area, we (the Atlanta Microsoft Professionals, Atlanta .NET User Group and Microsoft (aka Doug Turnure)) will be hosting a Visual Studio 2008 Loadfest, followed by a Halo Fragfest / Guitar Hero Rockfest in place of the regularly scheduled "talks".  All the fun (and loading) will be happening at the Microsoft Greater Southeast District office in Alpharetta on Monday, December 3rd beginning around 6 PM or so.

Be sure to bring your laptops!  The first 150 people to arrive get a FREE copy of Visual Studio 2008 Professional.  Yes, we know it's not out yet, but trust us, you will get a pretty boxed copy (when it does come out).

The gaming facilities will include 9 very large TV's with 9 XBox 360 Elites each with four controllers.  Can you say "Holy Crap Batman, I'm there!"  Bringing your own guitar is optional!

Having an accurate count of attendees would be extremely helpful so please register here if you plan on attending.

See you then!

Microsoft Corporation
1125 Sanctuary Pkwy.
Suite 300
Atlanta, GA 30004

posted by Dan Attis | 9 Comments
Filed Under:

Yet Another great looking public facing MOSS Internet site!

A good friend of mine recently architected, developed and launched kroger.com using the MOSS 2007 platform.  This is yet another example of using it as a public facing site.  This isn’t to say that there weren’t a few hurdles, he mentioned many, but all in all, it seems to be a success and it "looks" awesome!

Hopefully this will be the first of many Fortune #25 companies jumping on board (Kroger is #21 at press time)!

Check it out!

posted by Dan Attis | 5 Comments
Filed Under:

You Don't Need to Copy PDB Files to Debug in the GAC!

I generally don't post a link without much else but this was a no brainer and I feel every SharePoint developer, heck, every .NET developer needs to know this.  My friend and SharePoint pal, Doug Ware has discovered how to debug assemblies in the GAC WITHOUT having to copy the pdb symbols file to the MSIL folder.  In other words, simply attaching to the correct w3wp worker process will work.

It's awe inspiring, I had no idea!

I'm not going to steal his thunder so you will have to read all about here!

posted by Dan Attis | 2 Comments
Filed Under:

Technical Interview Tips

Keith Rome, an über smart friend of mine and fellow MVP, recently posted some interview tips on how to increase the odds of landing that next dream job.  Remember, it's the little things that help!


SharePoint 2007 - Add a Lookup Field to a List Template Element that references its own List

I had a real hard time coming up for a title for this post.  Here is what I am trying to explain in the title.  I had a need to create a custom List Template.  This can be done via a Feature.  The issue I ran across was I needed a Lookup Field in my list that contained values in another column in the same list.  The problem was that when you create a Lookup List, behind the scenes, SharePoint is assigning the Guid of the list that you are performing the lookup in to the LookupList property.  This works fine when doing this thru the user interface because the list exists when you add the column.  But to place a lookup into a List Template, as far as I can tell anyways, is impossible to do via any of the schemas.  It needs this Guid when it creates the field, which we obviously do not have when we are creating the List Template. 

My solution was as follows:  I created the list without that field and I added some code in the Feature receiver FeatureActivated method.  This allowed me to programmatically add the lookup field AFTER the list was created.

public override void FeatureActivated(SPFeatureReceiverProperties properties)
        using (SPWeb _SPWeb = properties.Web)
            // the name of the list is set in the ListInstance Element of
            // this Feature
            SPList _SPList = (SPList)_SPWeb.Lists["ListName"];

            if (_SPList != null)
                // add a new lookup field to the list
                _SPList.Fields.AddLookup("LookupField", _SPList.ID, false);                      
                // update the list

                // get a reference to the SPFieldLookup we just added
                SPFieldLookup _SPFieldLookup = new SPFieldLookup(_SPList.Fields, "LookupField");

                // get a reference to the default view
                SPView _SPView = _SPList.DefaultView;

                // add the field to the view if it is not there
                if (!_SPView.ViewFields.Exists("LookupField"))

                // update the view

Now I have a lookup field in my list that points to a column in the same list!  Happy coding!

posted by Dan Attis | 6 Comments
Filed Under:

SharePoint 2007 - Content Editor Web Part and Absolute Url's

I am not sure if this type of information has been posted before.  I looked around for a good 2 days or so trying to find a solution to my particular problem and could not.  Here is a short description of the problem.

My current project involves a public facing WCM site.  The site has 2 zones, one for anonymous access and forms users and another zone for AD users.

The content owners all have AD accounts and will be managing the content via the AD zone.  Many of the layout pages use Content Editor Web Parts.  When a user selects an image or a link using a CEWP, the relative url that appears in the text box is replaced with an absolute url in the database (genius!).  Why this happens is beyond me but the end result was unacceptable.  Since AD users were uploading content to the site, the url's were being converted to the absolute url of the AD site, which of course is not accessible to anonymous or forms users.  My solution was to create an event handler to handle the OnUpdating event of the Page (which is just a list item) and cycle thru the CEWP's on the page to replace any absolute url's with relative ones.

I began by creating my Feature file:

<!-- _lcid="1033" _version="12.0.4518" _dal="1" -->
<!-- _LocalBinding -->
  Description="Changes absolute urls to relative urls for all Content Editor Web Parts used in the Pages library."
  ReceiverAssembly="Ratman.SharePoint.EventHandlers.ForceRelativeUrl, Version=, Culture=neutral, PublicKeyToken=xxxtokenxxx"
  Title="Ratman Force Relative Url"

Notice that the above Feature definition defines an assembly.  In this assembly we will be hooking up our event handler to the appropriate library in a single site.  The reason I did it this way was because the List Type Id of the library I am hooking it up to is 850 and is not in the list of available List Type Id's available when defining an event handler via XML.  Well, now to think of it I am not sure if I actually confirmed that.  Either way, activating event handlers this way gives you more control over "where" it is activated.  For example, when defining an event handler via XML, you must provide (as mentioned above) a List Type Id.  This will attach the event handler to all lists of a certain type.  For example, were we to define 101, the event handler would be attached to all document libraries.  This may not be the behavior that we want.  With all that said it is also important to note that the List Template Id for a Pages library is 850.  This number can be viewed by looking at the source of a list view of a Pages library.  I have not found a single reference to this Id in any MSDN documentation so be weary.  I am guessing it may be hard-coded in many places.

The following code is my Feature handler, obviously replace xxxtokenxxx with your own token:

public class ForceRelativeUrlFeature : SPFeatureReceiver
    public override void FeatureActivated(SPFeatureReceiverProperties properties)
        // get a reference to the current SPWeb
        using (SPWeb _SPWeb = SPContext.Current.Web)
            // get a reference to the "Pages" library
            SPDocumentLibrary _SPDocumentLibrary = (SPDocumentLibrary)_SPWeb.Lists["Pages"];

            // if the "Pages" library exists
            if (_SPDocumentLibrary != null)
                // create an empty Guid
                Guid _ItemUpdatingGuid = Guid.Empty;

                // enumerate thru all of the event receiver definitions, attempting to
                // locate the one we are adding
                foreach (SPEventReceiverDefinition _SPEventReceiverDefinition in _SPDocumentLibrary.EventReceivers)
                    // if we find the event receiver we are about to add
                    // record its Guid
                    if (_SPEventReceiverDefinition.Type == SPEventReceiverType.ItemUpdating &&
                        _SPEventReceiverDefinition.Assembly == "Ratman.SharePoint.EventHandlers.ForceRelativeUrl, Version=, Culture=neutral, PublicKeyToken=xxxtokenxxx" &&
                        _SPEventReceiverDefinition.Class == "Ratman.SharePoint.EventHandlers.ForceRelativeUrl.ForceRelativeUrlItem")
                        _ItemUpdatingGuid = _SPEventReceiverDefinition.Id;

                // if we did not find the event receiver we are adding, add it
                if (_ItemUpdatingGuid == Guid.Empty)
                        _SPDocumentLibrary.EventReceivers.Add(SPEventReceiverType.ItemUpdating, "Ratman.SharePoint.EventHandlers.ForceRelativeUrl, Version=, Culture=neutral, PublicKeyToken=xxxtokenxxx", "Ratman.SharePoint.EventHandlers.ForceRelativeUrl.ForceRelativeUrlItem");
                    catch (Exception ex)

I made a few assumptions in this code, some of which you may want to remove.  I assumed that the Pages library is the name of the Pages library.  I assumed this because if you look at the list definition of a Pages library, located @ C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\Publishing you will see that the UNIQUE attribute is set to true.  What this means is that you really can have only one of these types of list on a single site.  It has also been suggested that many of the publishing features themselves will not work if this is not the name of the library.  Here is the Pages library list template definition as it is defined on above on the file system.

<!-- _lcid="1033" _version="12.0.4518" _dal="1" -->
<!-- _LocalBinding -->
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

The code after that is pretty straight forward.

  • Get a reference to the current SPWeb.
  • Get a reference to the Pages library (I assume this name) and check if it exists.
  • Check to make sure that the event handler you are attaching to this library is not already attached.
  • If the event handler is not found, attach it.

Here is the code for the event handler itself:

public class ForceRelativeUrlItem : SPItemEventReceiver
    public override void ItemUpdating(SPItemEventProperties properties)

        // 850 is the ListTemplateId of the OOB Pages library on a publishing site
        if (Int32.Parse(properties.ListItem.ParentList.BaseTemplate.ToString()) == 850)
            // get a reference to the list item (the page in this case)
            SPListItem _SPListItem = properties.ListItem;

            // get a reference to the containing SPWeb
            using (SPWeb _SPWeb = _SPListItem.Web)
                // get a reference to the the web part manager on the page
                using (SPLimitedWebPartManager _SPLimitedWebPartManager = _SPWeb.GetLimitedWebPartManager(_SPListItem.Url, PersonalizationScope.Shared))
                    // loop thru all of the web parts on the page and up update
                    // all of the CEWP's
                    foreach (Microsoft.SharePoint.WebPartPages.WebPart _WebPart in _SPLimitedWebPartManager.WebParts)
                        if (_WebPart.GetType().Equals(typeof(ContentEditorWebPart)))
                            using (ContentEditorWebPart _ContentEditorWebPart = (ContentEditorWebPart)_WebPart)
                                // get the contents of the CEWP
                                string _ContentString = _ContentEditorWebPart.Content.InnerText;

                                // remove the absolute url
                                _ContentString = _ContentString.Replace(_SPWeb.Site.RootWeb.Url, "");
                                // create an Xml element to use to update the CEWP
                                XmlDocument _XmlDocument = new XmlDocument();
                                XmlElement _XmlElement = _XmlDocument.CreateElement("MyElement");
                                _XmlElement.InnerText = _ContentString;

                                // update the Content property of the CEWP
                                _ContentEditorWebPart.Content = _XmlElement;

                                catch (Exception ex)



The code here is a little more complex, but not terribly difficult.

  • Disable event firing.  Since we are updating this item, we wouldn't want to get caught in some sort of loop, since this is the OnUpdating event handler :)
  • Ensure that the List Template Id of the list containing this item is in fact 850.  This is really just a double check, since we know it is true since we hooked the event handler up to a Pages library in the Feature handler defined above.
  • Get a reference to the Web Part Manager on the page itself which is really just an item in the Pages library.
  • Loop thru the web parts on the page and identify CEWP's.
  • Update the CEWP's content.  This was a little tricky.  You can't just update the XML directly, you need to create the new XML using an XmlElement and update the XmlElement that defines the Content property of the CEWP.  This part took me a while.  For some reason intellisense lead me to think that you can update the XML directly.
  • Re-enable event firing.

It is important to be sure that all of your disposable objects are disposed of.  If there is a single gotcha to SharePoint coding (coding, not development, that's another set of gotchas) it is this.  Memory leaks can sprout up quickly and are hard to trace after code is deployed.  I hope you find this techniques as useful as I did.  I am sure there are some improvements that can be made.  This was a relatively quick fix to a VERY BIG problem.

The end result here is that all images and links created via a CEWP on a page in the Pages library on a publishing will contain relative url's as opposed to absolute url's!

posted by Dan Attis | 6 Comments
Filed Under:

Oodles of Trial Software...

I stumbled across this link today that I never knew existed.  I have always had a hard time locating trial software, but look no more.  Here you will find links to download the following products, enjoy!

Server Products and Technologies

•BizTalk Server 2006

•Commerce Server 2007

•Windows Compute Cluster Server 2003

•Microsoft Office Communications Server 2007 and Microsoft Office Communicator 2007

•Exchange Server 2007

•Identity Integration Server 2003

•Identity Lifecycle Manager 2007

•SharePoint Server 2007

•Windows Small Business Server 2003 R2

•Speech Server 2004

•SQL Server 2005

•Virtual Server 2005 R2 SP1

Server Operating Systems

•Windows Server 2003 R2

Security Products and Technologies

•Microsoft Antigen

•Forefront Client Security

•Forefront Security for Exchange Server

•Forefront Security for SharePoint

•Internet Security and Acceleration (ISA) Server 2006 [Standard Edition]

•Internet Security and Acceleration (ISA) Server 2006 [Enterprise Edition]

System Center Products

•System Center Configuration Manager 2007

•System Center Data Protection Manager 2006

•System Center Essentials 2007

•Microsoft Operations Manager 2005

•System Center Operations Manager 2007

•Systems Management Server 2003 R2

Office System Products

•Live Communications Server 2005

•Office Enterprise 2007

•Office Project Server 2007

•Office Project Professional 2007

posted by Dan Attis | 1 Comments

NET Runtime version 2.0.50727.42 - Fatal Execution Engine Error (7A05E2B3) (80131506)

What an obscure title for a blog entry eh?  I just want to make sure that if someone else searches for this, they will find it because I was spinning my wheels for 3 hours researching for this fix.  At any rate, here is what happened.

I have an Office SharePoint Server 2007 virtual machine that I use for private development and user group demos.  Well, I opened it up today (to work on a talk for tonight, that is now canceled :)) and saw that there was an update available on Windows update (I had not opened it for about a week).  How silly of me to expect that update to have been fully tested, but I digress.  I forget exactly what update it was, but that is not as important as the symptom I am about to describe   I installed it without thinking about it, although in hindsight, I remembered this exact same issue happening to me earlier this year, on site at a client and going thru the same thing.  At any rate, hindsight is 20/20.  So, after installing this update, in my case, it seemed that running any ASP.Net 2.0 application, i.e.: a SharePoint site (either Central Admin, your SSP Administration site or any ASP.Net 2.0 site for that matter that uses as an application pool identity one that does not have a profile on the server (built in system accounts are OK I think, although I have not tested this).  Generally this means that that account has never actually interactively logged on to the server; the case for almost ALL service accounts.  Now that is what I call brilliant design.  Clearly Microsoft has received enough calls about this issue and has released Hotfix.

It's available here:

FIX: A .NET Framework 2.0 application that runs under a user account context when no user profile is associated with the user account context may crash, or you may receive an access violation error message

If the hotfix gives you an error when installing, it has done this for me, simply log on to the machine as the service account.  If the machine is also domain controller you will have to manually give that account that privilege in the Domain Controller Security Policy editor.  Be sure to remove this policy after the profile gets created!

Without this fix, the CLR just stops.  That's right stops dead in its tracks.  Nothing was working.

Well, hopefully this will save another poor soul some time.

Side note:  I have used this fix before but it does not seem to be working in my VM.  I suspect something else.  I read somewhere that the fix is also bundled with Visual Studio 2005 Service Pack 1.  I am curious as to why a framework fix would be bundled with a development tool update.  At any rate, I am still fighting my virtual machine and entertaining suggestions.

posted by Dan Attis | 3 Comments
Filed Under:

SharePoint 2007 - Calculated Fields

I was reading thru some blogs, namely that of Kevin DeRudder, today.  He recently posted some information on calculated fields.  I get questions pretty often from clients on the available formulas when creating a calculated field.  In his post, Kevin talks about how to reference a yes/no field from a formula inside a calculated field.

I just wanted to expand on his post a little and post this link to Examples of common formulas on the Microsoft Office Online site.  I frequently complain about the lack of documentation when it comes to SharePoint, but it seems someone had the time this time around and has documented a good deal of the formulas available for calculated fields.

Everything from Conditional Formulas, Date and time formulas, Math formulas, Text formulas and a few others are documented quite nicely.

There is even a page that talks about the Calculation operators.  This includes the "Types of operators" available and "The order in which a list performs operations in a formula".

I hope you find this page as useful as I did.

posted by Dan Attis | 3 Comments
Filed Under:

What does it take to be an SharePoint expert?

As a SharePoint SME, I tend to get odd looks sometimes from people who clearly have no idea of all that is involved in the technology, let alone being a subject matter expert.  Most people think it's point and click and I have to say, that drives me batty.  I'm not sure what fosters this perception, but it's out there.  Joel Oleson has an excellent blog post that lists a pretty good set of skills that we are are required to have extensive knowledge of to be good at what we do.  His list does not include any dev skills, so go ahead and add those in for an even more well rounded SME.

Joel's list is here.

Now no more funny looks, ok?

posted by Dan Attis | 0 Comments
Filed Under:

Using the Save site as template link on a publishing site

A colleague recently asked me if there was a way to save a publishing site as a template recently.  I responded by informing them that the "Save site as template" link is on the Site Settings page under Look and Feel.  He said it was not.  After a quick investigation, I realized that it is in fact not there; see below...

Blank Team Site


Collaboration Portal (Publishing)


The easy solution that seemed to work, and I leave you with the caveat that I have not fully tested this solution, is to simply determine what page this link goes to on a Team site, namely savetmpl.aspx, and type that into the location bar of your publishing site.  The "Save site as template" page then appears and you are able to save your publishing site as a template.

Blank Team Site


Collaboration Portal (Publishing)


I am not sure why they removed this link on the publishing enabled sites, but I am certain there must be a perfectly good reason; maybe there are some things that happen in a publishing site that you simply cannot store in a template.  If anyone is aware of the reasons or has seen them documented somewhere, please do let me know.

posted by Dan Attis | 7 Comments
Filed Under:

I'm an MVP now!

I am very happy and humbled to say that Microsoft has chosen to award me an MVP for Windows Server - Windows SharePoint Services.  I'll take this chance to thank some of the people who have helped me over the years, including Stacy Draper, Matt Ranlett, Keith Rome, Brendon Schwartz, Jim Wooley and last but not least by any stretch of the imagination, Doug Turnure.  Without these people and any others I may have not mentioned (not on purpose), I may not be blogging this post today!

Thanks everyone and here's to a great year ahead!

posted by Dan Attis | 7 Comments
Filed Under: ,

Office SharePoint Server 2007 search guidelines

Mike Taghizadeh has posted some recommended limits on search configuration with Office SharePoint Server 2007 Search.  There is lots of good information here.  I have yet to personally see a client even come close to some of these limits, so it makes me feel good that Msft has tested these numbers.


posted by Dan Attis | 0 Comments
Filed Under:

Wandering In Seattle

I came to Seattle last week to visit the home office of my new employer.  I have attended a presentation on the MSFT campus and have had a great time meeting lots of new people.  I have been meeting a couple of clients and as it turns out my presence was needed at one (here in Seattle).  My hotel is here.


It's raining and I am bored.  Any ideas much appreciated.

posted by Dan Attis | 0 Comments
Filed Under:

So, where has Dan been?

As if anyone noticed :).

I have been quite busy the last month or so, hence the lack of posts.  To make a long story short, I have switched employers.  After one and a half years at Intellinet I have chosen to move one and now call Slalom Consulting home.  My experience at Intellinet was awesome.  I got to work on a lot of great projects, almost all SharePoint, both 2003 and 2007.  I met some great people and developed some outstanding relationships while there.  I will miss many of the friends I have made there but intend to keep in touch on both a professional and personal level with most if not all of them.

The opportunity I have at Slalom is a ground floor opportunity for the Atlanta office of a national consulting firm.  I will be helping to build a Portals practice locally, with "no travel".  I am extremely excited about it and can't wait to get started (even though I started last Monday).

Right now I am in Seattle (corporate office) meeting a lot of the people that I will be working with moving forward.  Oh I forgot to mention, Brendon and I are now working together.  How lucky (or unlucky, you decide) can I guy get?

posted by Dan Attis | 1 Comments
Filed Under:
More Posts Next page »