Archives / 2008 / January
  • Completely Delete a Site and URL from a SharePoint Portal

    Note to self, you'll need this later...

    So one of the issues with SharePoint is the fact that the tasks you need to complete anything are pretty straight forward as long as nothing goes wrong. Case in point: I tried to deploy one of the "Fab 40" templates on a VPC and forgot that I had not previously deployed the application core template on that machine. The solution deployment went fine and the site template was available for creating a new site. Good to go except the site creation failed. Whoops. Look up the GUID of the feature that the error message listed and realized my error. No problem: delete the site (url is important in this case), deploy the application core wsp and start over.


    After doing my thing, I get an error saying "The web site "/MyURL" address is already in use." How can that be since I deleted the site? Turns out I deleted the site but not the URL leaving the URL an orphan. I don't know if this is absolutely correct and appropriate but these steps were tested by me and they worked.

    1. Navigate to the home site
    2. Select View All Site Content and find the site in the Sites and Workspaces list
    3. Click on the link for the site
    4. Click Site Actions --> Site Settings
    5. Click Site Administration --> Delete this site
    6. Click Delete and confirm

    You should have just deleted everything but you need to back check. If you encountered an error in provisioning the site, the above may not work. So go look at the site hierarchy.

    1. Navigate to the hom esite
    2. Select Site Actions --> Settings Settings --> Modify All Site Settings
    3. Under Site Collection Administration, click on Site hierarchy
    4. If the URL is not there, you're done, if it is there, click on Manage
    5. Under Site Administration, click Delete this site
    6. Click Delete and confirm

    That should actually kill the site and the URL.



  • Back in the Saddle

    Back to the grind. Actually, I've been back to the grind for weeks but haven't been blogging due to time constraints. 2007 ended with a fender bender followed by my eldest daughter going to the hospital in East Podunk New Hampshire with 105 F fever and pneumonia. She's much better and the folks were nice enough if not exactly happy to be there on Christmas Day. Then 2008 started with my dog being diagnosed with terminal lung cancer. She had to be euthenized immediately because a tumor had completely blocked her esphagus preventing her from ever eating again. That really sucked since my wife had never lost an animal before. Bad day. Then my youngest daughter went in for major surgery three days later. It was planned but she wasn't drinking enough on her own after surgery so she had to stay in the hospital for an extry day (3 total). Thank God it was at Johns Hopkins, agruably the best hospital in the world. A far cry from the places we spent nightmare days in China. Then I get my first speeding ticket in YEARS. Not exactly a slap on the face, more of a flick on the ear.

    So I'd like to say it can only get better from here but that would be a really stupid basis upon which to plan...

    My last few posts were directed toward Linq to SQL and I was planning on listing out how to pass an anonymous type to another object. This turned out to be a bad idea and not very well supported. Most of what I found on the subject and generated myself did not fall into the KISS model so I think I'll just reference some of Scott Guthrie's blog posts on Linq. This is part 9 of his series and you can back track from there through the entire thing. Dude is way smart and detailed and has presented more already than I even know so I'll defer to the master. Hot Rodding Lesson 2: Never race when you know you're going to lose. Lesson 1 doesn't really apply here (If you're spinnin', you ain't winnin'). So I'll just leave you in Scott's capable hands and roll off of that. A hint: Either pass a strong object out of your data layer (akin to DTO) or look into the .ToList() method. I think its an extension method.

    What I do need though is a complete tutorial on building a web part in VS 2008 from scratch AND deploying it to multiple environments repeatably. That's coming soon.