Peter Sullivan – SharePoint, SQL Server and .NET Learnings


Viewing a SharePoint site via Windows Explorer and Network Places
8 September, 2008, 9:57 pm
Filed under: SharePoint | Tags: , , , , ,

In both SharePoint 2003 and 2007, you are able to connect to a SharePoint site and browse it using Windows Explorer. This is very useful if you need to do things like:

  • Take a copy of all the items in a library
  • Copy all the documents in a TFS project (site) to migrate to a different TFS server (unusual requirement – but that is why I hunted for this solution)
  • Do a bulk upload by “copy and pasting” or “dragging and dropping” (Note: If you have required meta data on items in a document library, for example, this method will not enforce that requirement!)

I came across a couple of issues when trying to get this working on Windows Server 2003. Here are a couple of tips that could help when troubleshooting:

1. Make sure that you have WebDAV allowed on IIS on the server hosting your WSS Site.

2. If you are trying to add the WSS Site to “My Network Places” on a Windows Server 2003, you will need to install a patch from Microsoft – Software Update for Web Folders (KB907306). You know that you will need to do this when you get an error message about the address not being recognised as a folder. Also, if you a get a “404 – Page not Found” panel when switching to Explorer view, you need to install this update.

For more information on setting this up and about the web folders download, have a look at these articles:

http://www.intermedia.net/support/kb/default.asp?id=1207

http://blogs.tamtam.nl/mart/SoftwareUpdateForWebFolders.aspx



Faceted Search v2.5 has been announced
13 August, 2008, 10:56 am
Filed under: Search, SharePoint | Tags: ,

The details of the next version are covered in detail on the Enterprise Search blog:

 http://blogs.msdn.com/enterprisesearch/archive/2008/08/12/announcing-faceted-search-v2-5.aspx 

In summary, the main new features include:

  • Caching – dramatically improves performance and decreases the load on the search engine
  • Synchronization with Core Search Results web part
  • Support for advanced search
  • Match of search counters
  • Introducing Parent-Child relationships
  • Extending search to logical “OR” queries
  • Simplified web part properties

Make sure you also check out the Codeplex project too: http://www.codeplex.com/FacetedSearch



Paterns & Practices SharePoint Guidance
10 August, 2008, 8:39 pm
Filed under: SharePoint | Tags:

The paterns and practices team are developing a guidance kit on how to build SharePoint Intranet Applications. At this stage, the information prepared is in draft, however they are encouraging people to contribute to the duscussions to help develop the product. Have a look here…

http://www.codeplex.com/spg



AJAX Update Panels and SharePoint
13 June, 2008, 6:17 pm
Filed under: SharePoint | Tags:

If you have added an AJAX UpdatePanel to a control or webpart inside of SharePoint, you will become very frustrated when you find that the second postback does not work. This is due to the way SharePoint wraps buttons.

Mike Ammerlaan has an example of this problem and some additional information about ASP.NET AJAX with SharePoint.

Basically, the workaround is adding an additional function to your code page that alters the _spFormOnSubmitWrapper and the _spFormOnSumitWrapper (example in C#):

private void EnsureUpdatePanelFix()
{
   
if (this.Page.Form != null)
    {
       
string formOnSubmitAtt = this.Page.Form.Attributes["onsubmit"];
       
if (formOnSubmitAtt == “return _spFormOnSubmitWrapper);”)
        {
           
this.Page.Form.Attributes["onsubmit"] = “_spFormOnSubmitWrapper();”;
        }
    }
   
ScriptManager.RegisterStartupScript(this, typeof(CompanyRegistration),
       
“UpdatePanelFixup”,
       
“_spOriginalFormAction = document.forms[0].action; _spSuppressFormOnSubmitWrapper=true;”,
       
true);
}

Make sure that you change the typeof(CompanyRegistration) to reflect the name of your class.

Next, override the CreateChildControls method and add a call to the EnsureUpdatePanelFix() method: 

 

protected override void CreateChildControls()
{
   
base.CreateChildControls();
    EnsureUpdatePanelFix();

}

And that’s it. Problem solved.


AJAX and .NET 3.5 in SharePoint 2007
13 June, 2008, 9:03 am
Filed under: SharePoint | Tags: , , ,

SharePoint now has support for .NET 3.5. This support was impoved after SP1 for WSS 3.0 and MOSS 2007 was released.

To get AJAX and .NET 3.5 working, you need to make a few changes to the web.config file. Make sure that you are *very careful* when making these changes…..

Have a look at Patrick Tisseghem’s post about configuring SharePoint for Silverlight… It has all of the information needed to get .NET 3.5 and AJAX up and going too. The web.config file that he has attached is very useful – http://www.u2u.info/Blogs/Patrick/Lists/Posts/Post.aspx?ID=1794

I will post some examples of using the AJAX Control Toolkit in SharePoint as soon as I can.



Setting up a SharePoint 2007 Development Virtual PC
16 March, 2008, 9:41 pm
Filed under: SharePoint

Setting up a SharePoint 2007 VPC is not a next next finish installation. Below is an installation sequence that I have followed in order to setup a development VPC that has all the tools in need to create WorkFlows. Basically this VPC is going to have the Tools that I need to develop in SharePoint 2007.

Prerequisites

  • Microsoft Virtual PC 2007 
  • Windows Server 2003 (I used R2, you could try 2008 if you’re feeling lucky)
  • Media for SharePoint 2007 (I used my MSDN media)
  • Media for SQL Server 2005 (You can use SQL Express but I have chosen to install with Developer Edition) 
  • Media for Visual Studio 2005 (At the time of writing this post, 2008 did not have all the tools I needed to create WF)

Alright, let’s get started:

  1. Install Windows Server on your VPC and get is all patched up. You should be able to get away with one 20GB VHD
  2. Install VPC Add-in tools 
  3. Install IIS and make sure you include the SMTP option.
  4. Promote your VPC to be a Domain Controller of a new domain.
  5. Install SQL Server
  6. Next Install MOSS 2007 (I have installed Enterprise Edition as I do BDC development)
  7. Configure MOSS 2007. This includes Search, SSP, Single Sign On etc. (You will need to create some domain accounts for different parts of the configuration)
  8. Setup a SharePoint Web Application and Add a Site Collection. Now you should have a working version of SharePoint. Make sure you can browse to the new site collection you just created. It takes a while the first time to load.Lets add the development tools……
  9. Install Office 2007 (Use a version that has InfoPath – or install that seperately. InfoPath 2007 works great with SharePoint) 
  10. Install Visual Studio 2005 (Team Edition if you use Team Server)
  11. Install Visual Studio 2005 extensions for Windows SharePoint Services version 1.1 (http://www.microsoft.com/downloads/details.aspx?FamilyId=3E1DCCCD-1CCA-433A-BB4D-97B96BF7AB63&displaylang=en)
  12. Microsoft Visual Studio 2005 – Update to Support Web Application Projects (http://www.microsoft.com/downloads/details.aspx?familyid=8B05EE00-9554-4733-8725-3CA89DD9BFCA&displaylang=en)
  13. Microsoft Visual Studio 2005 extensions for Windows Workflow Foundations (http://www.microsoft.com/downloads/thankyou.aspx?familyId=5d61409e-1fa3-48cf-8023-e8f38e709ba6&displayLang=en)
  14. Open the Visual Studio Command Prompt and execute the following commands:
    1. devenv /setup
    2. regsvr32.exe “%vs80comntools%\..\IDE\projectaggregator.dll”
    3. devenv /resetskippkgs (Say Yes to the prompt)

That should be all that you need to get started.

Oh and one more thing, this tool (SharePoint Spy) to be very helpful for displaying events that are happening inside SharePoint. Install that as well (http://www.echotechnology.com/products/spy/Pages/default.aspx)