Tech. reference and notes discovered whilst thrashing Microsoft SharePoint, SQL, BI, KM, Security and Windows Servers
Sunday, May 27, 2007
BartPE bootable live windows CD/DVD
"BartPE allows a user to boot Windows XP/Windows Server 2003 from a CD-ROM regardless of the condition of the installed operating systems on the internal hard drive. This means that the user can, for instance, recover data from a failed operating system installation, or reset a lost administrator password."
As such this is a brilliant admin and disaster recovery tool. There is also a small industry of numerous plugins to work with BartPE which look very useful. Full details at Bart's Preinstalled Environment (BartPE) bootable live windows CD/DVD
Tuesday, May 22, 2007
Sharepoint Web services - UpdateLists gotcha
Microsoft's sample code (which works ok) in both the WSS2 and WSS3 examples shows your being able to add 2 fields using the XML new field node definitions as follows:
HOWEVER if you try to delete or update these new fields you've added you get all sorts of nasty and unhelpful errors back saying that the web service won’t do what you’ve asked it.
After 4 or 5 hours of head scratching I eventually figured out that because the MS examples create fields that are derived from a BaseType ie FromBaseType="TRUE" - you can't update or delete a FromBaseType Field. (At least I can't find a way to do it - and it would seem to be a bad thing to do anyhow!) (link here to SPField.FromBaseType defn.)
So if you want to programmatically add new fields to Sharepoint lists, and you want to update or delete them afterwards DO NOT include the attribute FromBaseType="True".
This is an example of an XML new field node definition which can be edited or deleted programmatically.
Configuring SQL database servers for Sharepoint 3 (MOSS)
Blogger Backups
(Blogger say you can backup by adjusting the page template to show everything and then saving it, however this doesnt seem a very viable option with a lot of posts)
Other examples of a Blog backup is Lab Asprise’s Blog Collector whilst you could use Httrack to copy the website as a whole.
Marines flex their muscle with SharePoint - Network World
Monday, May 21, 2007
Updating Sharepoint List schema's using web services
The arguments for UpdateList are :
listService.UpdateList("List_Name", ndProperties, ndNewFields, ndUpdateFields, ndDeleteFields, ndVersion.Value); //where nd is an XML Node.
Although I only wanted to add fields I was still creating all of the root elements of the nd.. parameters and then calling UpdateList only to return a SoapServerException message.
such as: XmlNode ndUpdateFields = xmlDoc.CreateNode(XmlNodeType.Element, "Fields", "") etc..
I then discovered that if I replaced the parameters for the actions I didn't need with nulls then everything sprung into life! - I couldnt find any documentation for this, however I guess thats what blogs are for!
Thus to just add new Fields use the UpdateList command in the form of:
listService.UpdateList("List_Name", ndProperties, ndNewFields, null, null, ndVersion.Value);
Tuesday, May 15, 2007
Web services deployment problems (dotnet 2.0 and VS2005)
Firstly create your web service - The VS code out of the box will do. ie
New project->Visual C#->ASP.NET Web Service Application
This will give you code similar to the following:
namespace SimpleTestWebService
{
[WebService(Namespace = "http://iwaszko.com/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
public class Service1 : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
}
Run this code and envoke the http Post to test all is well.
Now choose File->Add new project->Other Project Types->Setup and Deployment->Web Setup Project
Now Right click on the WebSetup project and choose Add->Project Output
Make sure that the correct WebService project is selected and select Project Output, Debug Symbols & Content Files
Then Build the WebSetup project - (Depending on whether you Build in Debug or Release, it will put its setup.exe and websetup.msi in the same named directory)
Note: you can Install or uninstall the web service from VS by right clicking on the WebSetup project in solution explorer and choosing install/uninstall.
Once I installed the web service to IIS these are the issues I had:
1) Make sure you set your IIS site/virtual directory to use ASP.NET 2.0 if you are using VS2005 - see this post for examples
2) Accessing http://localhost/websetup/service1.asmx gave me the following very unhelpfull error:
Failed to access IIS metabase (see link)
This relates to an error where the local machine ASPNET cannot access the IIS metabase. It can occur where DotNet 2 has been installed after IIS and lots of other combinations.
Workaround: Microsoft published several fixes including using asp_regiis -ga ASPNET, however the best solution I found was to go to control panel-> add/remove programs and choose repair on the DotNet 2.0 install.
3) After the dotnet 2.0 repair succeeded, accessing the web service gave me a new error:
HttpParseException, Could not create type 'Service'. (see link)
The solution seems to be that when the package is deployed to the web server, the bin directory is created but the dll's are put in the directory above. Moving the dll to the bin directory manually seemed to fix this error, however I found a setting in the VS2005 deployment project which corrects this behaviour.
Select the Properties for Primary Output from the WebSetup project. Under the Folder property choose bin. This then seems to put the dll's into the bin directory and the web service works correctly.
Why such a simple thing such as deploying a web service seems to be so difficult is something I very much hope Microsoft is addressing with Orcas, however in the meantime I hope that these notes assist you in not having to struggle quite as much as I did.
Infopath 2007 sequential counters
Easy, I thought... I'll just connect a second data source to a SQL server stored procedure to give me the next invoice number - BUT this seemed to break the browser compatibility no matter what configuration I tried.
This is the SP code - (crude but effective for what I needed)
ALTER Procedure [dbo].[NextInvoiceNumber]
@NextNumb INT OUT as
begin
update lookup
set NumValue=NumValue+1
where Header='InvNumb'
select @NextNumb=NumValue from lookup where Header ='InvNumb'
So attempt two was to use Web Services. (I am new to these but used to do a lot of COM+ distributed applications 0 so how difficult can it be?). Well it turned out very easy to write and debug the web service using VS2005, however deployment was an absolute nightmare.
Ive documented solutions to all the web service deployment problems I found in this post
Monday, May 14, 2007
Sunday, May 13, 2007
Thursday, May 10, 2007
Microsoft SharePoint Products and Technologies Team Blog
SharePoint Migration tools
List And Library Migration Manager for SharePoint
...This tool does exactly what it says it does. It moves lists and libraries, including all the meta data columns, to and from both 2003 and 2007
Tzunami Deployer
Quick & easy migration from a multitude of content sources, including SharePoint Portal Server 2001,
Windows SharePoint Services 2003, and SharePoint Portal Server 2003
Drag and Drop emails from Outlook into SharePoint
Tuesday, May 08, 2007
Thursday, May 03, 2007
Sharepoint 2003 to MOSS 2007 Document migration
One option is to use the Microsoft Spin and Spout Document Library Migration Tools
Another option might be to use the following 2 tools
To download the documents from SPS2003:
All About SharePoint : SharePoint Document Puller v4.0
And to upload them to MOSS 2007 using WSUploadService - A Web Service for uploading documents into SharePoint All About SharePoint : WSUploadService - Web Service for uploading documents into SharePoint
All About SharePoint : SharePoint Document Puller v4.0
This tool extracts documents from the SharePoint's DB. It works with SharePoint Portal Server 2003 (and WSS 2.0).
Wednesday, May 02, 2007
Guide to InfoPath 2007 Developer Documentation
Very useful link to MS Infopath 2007 resources