Tuesday, December 11, 2007

Microsoft SharePoint Server2007 , Security Explorer, ScriptLogic

Managing security for a large and complex MOSS installation with over 1000 users can be a large manual job. We are looking at ways of automating this process to assign individuals from AD rather than groups. This will mean that we can use the permissions to see which users have access to what, however the overhead of maintaining this is large. This is an internesting program which may be of some assistance with backup and restore security policies. Microsoft SharePoint Server2007 , Security Explorer, ScriptLogic

Monday, December 10, 2007

Exposing Excel contents to make reporting easy in SharePoint

Some time adding Excel forms to a Sharepoint document library makes more sense than a complexly designed infopath form. This is especially the case when the form has a lot of financial computations. The problem is how to get the values in the Excel documents back to sharepoint so that they can be used in the document list views. This article gives an example of how to do it Exposing Excel contents to make reporting easy in SharePoint

Microsoft Outlook Utilities and Add-ons - TechHit.com

I was looking for a utility to store some reference email folders into the file system (or ultimatly Sharepoint) and I came across this interesting site.

Microsoft Outlook Utilities and Add-ons - TechHit.com

Friday, November 16, 2007

MOSS Mysite blog multiple categories

The default Blog template for a mysite will create a category field that only allows one category to be created. If you want to allow multiple categories you must alter this fields properties as per the imgage.

Tuesday, November 13, 2007

Rouge TCPIP gateway settings - Netsh commands for Interface IP

I have a problem with the TCPIP settings on a windows 2003 workstation running windows terminal services.

It is showing 2 gateways on network details or under ipconfig, however only one gateway is defined in the networking setup. Ive used Netsh to try to remove the additional gateway and although this is a powerful command it didnt see it.

So I deliberately added the rouge gateway address with a high network metric using netsh. This command worked but the metric was being ignored, (tested using tracert). Using netsh again I removed the gateway address I’d just added and it seemed to remove itself from the TCPIP configuration successfully. Using tracert to test the routing again it showed all was well. Has anyone else seen something like this ?

Microsoft Windows XP - Netsh commands for Interface IP

Monday, November 12, 2007

Sharepoint Navigation Editing Problem - The page has been modified by another author - MSDN Forums

Navigation Editing Problem - The page has been modified by another author - MSDN Forums: "Navigation Editing Problem - The page has been modified by another author "

This is a really frustrating problem where you try to edit a navigation structure and MOSS just errors. The attached link has a work around and hopefully it will be fixed in MOSS SP1

Thursday, September 27, 2007

Tim Sneath : Windows Vista Secret #10: Open an Elevated Command Prompt in Six Keystrokes

A very usefull tip for running elevated command prompts in Vista

Tim Sneath : Windows Vista Secret #10: Open an Elevated Command Prompt in Six Keystrokes: "Windows Vista Secret #10: Open an Elevated Command Prompt in Six Keystrokes User Account Control is, as I mentioned in secret #4, an important part of the security protection that Windows Vista offers. For any user with administrative credentials, you can always execute a process with full admin rights by right-clicking on the executable or shortcut and choosing 'Run as Administrator'. For myself, I regularly want to open an admin-level command prompt, and it's a distraction to have to move my hands off the keyboard to go through the elevation contortions. So I was delighted to find a little keyboard shortcut for launching an elevated process. Simply press Ctrl+Shift+Enter from the search bar on the start menu with a selected application, and that triggers elevation. For example, to launch an elevated command prompt, simply press the Win key; type cmd; press Ctrl+Shift+Enter; and then hit Alt+C to confirm the elevation prompt. Six keystrokes to an elevated command prompt! (Once I've got an elevated command prompt, I always like to execute color 4f as my first input so that this console window is visually differentiated from other non-elevated windows.)

Monday, September 24, 2007

Friday, September 21, 2007

ISA woes with Windows 2003 SP2

Ive been having intermittent network connectivity server issues in a number of locations since Windows 2003 SP2 was installed. Specifically on ISA2004 and ISA2006 servers.

It took me some time to realise that the issue was caused by Win2K3SP2, however I seem to be in good company as this service pack has caused huge problems.

Specifically the problems I'd seeing are intermittent VPN Client error 619 for no good reason. If the user tries again many times they will eventually get in. Also I am unable to create an RDP console to the ISA server. This makes life even more frustrating.

From the links below 2 items seem to stand out. Firstly that you need to get your NIC drivers fully up to date. Apparently Win2k3SP2 is trying to make use of advanced NIC features that the original or older drivers don't know about. Secondly you need to remove Receive Side Scaling on any machine where you have 2 network cards such as ISA. You should also disable TaskOffload if you are still getting problems.

There is a good article on the technet blogs here (Dont let the fact its in the SBS forum put you off) and one from the ISA product team blog here

MS Article "You may experience network-related problems after you install Windows Server 2003 SP2 or the Scalable Networking Pack" at http://support.microsoft.com/kb/936594

MS KB927695 on Receive Side Scaling is here

Symptoms are as follows:

• When you try to connect to the server by using a VPN connection, you receive the following error message:
Error 800: Unable to establish connection.
• You cannot create a Remote Desktop Protocol (RDP) connection to the server.
• You cannot connect to shares on the server from a computer on the local area network.
• You cannot join a client computer to the domain.
• You cannot connect to Microsoft Exchange Server from a computer that is running Microsoft Outlook.
• You can only connect to Web sites that are hosted on the server or on the Internet by using a secure sockets layer (SSL) connection. In this scenario, you cannot connect to a Web site that does not use SSL encryption.
• You experience slow network performance.
• You cannot create an outgoing FTP connection from the server.
• The DHCP Server service crashes.
• Clients experience slow domain logons.
• Network Address Translation (NAT) clients that are located behind Windows SBS 2003 experience intermittent connection failures.
• You experience intermittent RPC communications failures.
• Clients that are configured as SecureNat clients may be unable to connect to the Internet.
• Some Outlook clients may be unable to connect to Exchange.
• You cannot run the Configure E-mail and Internet Connection Wizard successfully.
• Microsoft Internet Security and Acceleration (ISA) Server blocks RPC communications.
• Clients cannot visit the http://companyweb Web site.
• You cannot browse Internet Information Services (IIS) Virtual Directories.

Wednesday, September 19, 2007

VistaBootPRO - Go PRO with Microsoft Windows Vista Boot Manager

VistaBootPRO - Go PRO with Microsoft Windows Vista Boot Manager: "Chances are you're here because you're running Windows Vista and want to do one of two things. Install a second OS or manage your boot configuration without directly editing the BCDEdit file. As you likely now realize, Windows Vista has made this task somewhat complicated for most users. VistaBootPRO was developed to make changes to the Windows Vista Boot Configuration Data (BCD) registry quickly and easily, doing the job in a fraction of the time it would take using the alternative. The only other way to edit the BCD is to use the command prompt application 'bcdedit.exe,' located in the Windows\system32 folder of Windows Vista, which requires users to become familiar with the ins and outs of the bcdedit.exe switches and options, leaving many frustrated users in its path. VistaBootPRO allows users to easily and neatly organize their boot configuration entries from within all flavors of Windows."

Wednesday, September 12, 2007

HD Tune

Interesting hard drive tuning program HD Tune

Thursday, September 06, 2007

Which Intel CPU for a power workstation ?

Xeon processors have been the choice for the ultimate performance server and workstation for some time, however with so many different Intel CPU's available which is the best to get now and planning for the future?

Single and dual quad core Xeon processors are very good for multi threading processes, however on non multithreaded applications this advantage is lost and its just down to raw Ghz speed.

Intel started shipping its new Woodcrest CPUs in June 07 and they are now available from Dell and HP. The key importance with these new processors is that they have upport for a 1,333MHz FSB frequency, up from a previous maximum of 1,066MHz. In theory, this represents a substantial 25% increase in bandwidth between the CPU and the rest of the system, which in particular should help memory performance with DDR3 RAM.

There are 2 types of new processor releases of interest:
Intel® Core™2 Extreme quad-core processor QX6850
Quad-Core Intel® Xeon® processor 5300 series

A usefull list of the CPU's Dell ship is here
So should you choose a Core 2 Extreme or a Xeon? The answer is difficult to call and I'm still gathering information on this

The fastest Xeon quad cpu runs at 2.66ghz and I think a single quad of this type would be better than a dual quad of 1.8ghz with a 1066mhz fsb.

The fastest new release is at the very top end of Intel's enthusiast CPU line-up: the Core 2 Extreme Edition QX6850, replacing the QX6800 is not a Xeon! It is a quad-core processor and is the third Core 2 Extreme model to be released since the original quad-core QX6700 at the end of last year. The new part's basic specifications haven't leapt massively, starting from 2.66GHz in the QX6700 and now hitting the 3GHz mark. The architecture remains identical, with two dual-core dies in one package, each with 4MB of L2 cache, making for a total of 8MB.

Also the QX6850 - like all other Extreme Edition Intel CPUs before it - is clock unlocked, allowing for direct clock-multiplier overclocking. This means that Dell is shipping a 3.4Ghz XPS machine using the 3.0Ghz QX6850.

The last fly in the ointment is the new DDR3 memory.

DDR2 RAM is set to be replaced by DDR3. DDR3 offers benefits; operating voltage is reduced from DDR2's 1.8V to 1.5V, and while DDR2 officially supports a maximum I/O bus rate of 533MHz, DDR3 goes up to 800MHz - effectively 1,600MHz due to DDR's double-pumped bus. The pre-fetch buffer is also doubled, from 4 bits to a whole byte.
These improvements are now offset by increased CAS latency, though. Most DDR2 DIMMs have a latency of 4 or 5 clocks before they can start to return the data stored at a given address. Current DDR3 modules, meanwhile, have a latency of 7-9 clock cycles, and while this may fall as the manufacturing process is refined, the standard dictates an absolute minimum CAS latency of 5 clock cycles for DDR3.
So the answer is not clear and information gathering is still ongoing, but hopefully this article has identified the main issues.

Going int the future, Intel are working on a Penryn-microarchitecture parts to be released towards the end of the year. Penryn-based processors will be the first produced with a 45nm fabrication process; the existing CPUs remain on 65nm

(Extracts from PcPro article)

Moving the first Operations Manager / Global catalogue server to a new server

I’ve recently needed to move a Windows 2003 domain controller to a Windows 2003 R2 server. I’d been putting it off for a while because I knew it would be complex. These are the steps I followed. (For clarity Ive called the original Server A and the destination Server B.

Firstly upgrade the schema to conform to Windows 2003 R2. On the R2 second install CD is a directory called F:\CMPNENTS\R2\ADPREP . Copy this to the existing DC and run ADPREP /forestprep. You may also need to run ADPREP /domainprep and ADPREP /domainprep /gpprep. (More details

Now run DCPromo on ServerB and add it to an existing forest/domain. When it completes reboot the server.

Global Catalog promotion
Add ServerB to be a Global catalog and remove ServerA from being a GC. Allow time for ServerB to replicate all the changes required before removing the GC from ServerA. (Details
To create a new global catalog:

1. On the domain controller where you want the new global catalog, start the Active Directory Sites and Services snap-in. To start the snap-in, click Start, point to Programs, point to Administrative Tools, and then click Active Directory Sites and Services. double-click Sites, and then double-click sitename.
2.Double-click Servers, click your domain controller, right-click NTDS Settings, and then click Properties. On the General tab, click to select the Global catalog check box to assign the role of global catalog to this server. Restart the domain controller

Transferring operations master roles
Whilst AD supports multimaster replication there are some functions which are not supported in this way in the domain. Details of these can be found
For procedures describing the transfer of operations master roles, see:
Transfer the schema master role
Transfer the domain naming master role
Transfer the RID master role
Transfer the PDC emulator role
Transfer the infrastructure master role

Wednesday, August 08, 2007

MOSS GetUserProfileByIndex(int index) unexpected behaviour

We are trying to get a list of user profiles from MOSS using the UserProfile WebService. We were assuming that as each user gets created the index is incremented by one, so we could do a for next loop to get them all, however this gives errors.

Here is the solution from Microsoft:
We are using the GetUserProfileByIndex(int index) method in a for loop looping from index = 0 to index = (GetUserProfileCount() -1) value.

This is however not the right approach.

While the profiles are created and deleted the profile list does not keep continuous indexing (e.g. if you have 10 profiles indexed from 0 to 9 and then you delete profiles (5) and (6) there will be a gap - indexes 5 and 6 will not be used. Adding new profiles to the list will not insert them into the gap, but will append them to the end of the list. So, if after deleting profiles (5) and (6) you add 3 new profiles the indexes will be as follows {0, 1, 2, 3, 4, 7, 8, 9, 10, 11, 12}). If you would run a for loop for this list for the indexes 0 to (GetUserProfileCount() -1), so 0 to 10, you would never get the profiles (11) and (12) returned and you would get the profile (7) returned 3 times (if a profile under a given index is missing the function returns the next available one).

The right approach is to use the NextValue field of the GetUserProfileByIndexResult object returned by the GetUserProfileByIndex(int index) function. This field contains a string value indicating the next valid index in the profile list. The string value needs to be converted into an integer and then used in the next call of the GetUserProfileByIndex(int index) function as the index. The fist value in the list can be obtained by using an index <= 0.
The pseudo code for extracting all the user profiles:

p = GetUserProfileByIndex(-1); // gets the first profile on the list
While (p.UserProfile != null)
// do what you want with the User Profile
int nextValue = ConvertToInteger(p.NextValue);
p = GetUserProfileByIndex(nextValue);

Tuesday, August 07, 2007

Updated Fiddler2 Extensions

Fiddler is a really usefull debugging tool to see what is really happening between Internet Explorer and applications. Updated Fiddler2 Extensions shows new extension
MSDN link to Fiddler

Sunday, August 05, 2007

VSTO 2005 SE Outlook Addin Deployment problems

I was initially impressed by how easy it was to create and Outlook 2007 addin using VSTO2005 SE. The addin works fine on the development machine, however trying to deploy it has been a nightmare.

On the machine which you are deploying to, the first thing was (I didnt realise probably because I didnt read the instruction manual closely enough) that you must install the VSTO2005 SE run time, however you should only do this after you make sure that the Office PIAs are installed. Apparently this is because the VSTO2005 run time updates one of the Office PIA DLLs. You should also initially make sure that dotNet 2.0 is installed otherwise VSTO2005 SE wont run.

The next issue is to get your custom DLL trusted by dotNet. This is a lot easier said than done.

Identifying the problem
The first problem I had was actually finding out why my Outlook addin would run. It would run fine on my VS dev. machine, however Outlook just kept disabling it. I found a really helpful forum post here which says that if you set the environment variable VSTO_SUPPRESSDISPLAYALERTS to 0 (zero) then VST will display all errors that occur during startup. You can also get the errors logged to a file by setting the environment variable VSTO_LOGALERTS variable to 1 (one). This creates the log file in the folder that contains the application manifest. The default name is .manifest.log. (See MS Article Debugging in Application-Level Projects)

Debugging the problem

The startup error I found was "Failed to grant permission to execute." Basically this means that dotNet is not trusting your assembly on the deployment machine. (Note: once Office starts with and Addin error, it helpfully disables it for you. To re-enable it update the registry key HKCU\Software\Microsoft\Office\Outlook\Addins\youraddin.connect\LoadBehavior = 3. After a failed load Outlook will have set it to 2)

To enable security on the DLLs, there is an MSDN article on adding a SetSecurity project to your existing project (available from MS here). You then update the setup deployment project for the custom action data for the Install method (full info here)- I couldnt get this to work.

Some people suggested trying to bypass the windows CAS and give enough security-level to the addin. You could use CASPOL or add the assembly to the GAC (dragging and dropping it at c:\windows\assembly) - however I cant get either of these to work in Vista. Adding the assembly to the GAC on XP fixes the addin load permissions problem. (To add your assembly to the GAC you will need to sign it with a key in VS2005 to make it a strong assembly).

So after more than a days work trying to deploy my Outlook addin - I have a workaround with XP where I can use the GAC and have made no progress on getting it deployed using SetSecurity or on Vista!

Deploying Visual Studio 2005 Tools for Office Second Edition Solutions Using Windows Installer
Visual Studio Developer Center - Debugging in Application-Level Projects
Microsoft .Net Framework 2.0
Microsoft Office 2007 Primary Interop Assemblies
Microsoft Visual Studio Tools for Office 2005 Second edition runtime

Outlook 2007 Free/Busy FTP Publisher
Outlook Redemption

Friday, July 27, 2007

Plan for availability (Office SharePoint Server)

Plan for availability (Office SharePoint Server)

MOSS Web application configuration notes for a medium farm - from the field

I attended another UK SPSUG usergroup meeting last night at the new Microsoft building near Victoria Station in London. There were interesting presentations on MOSS architecture and some of the more varied tasks you can use Sharepoint designer for.

Hardware Topology

We have configured a medium farm using 6 x 64-bit HP servers with 8GB RAM. 2 load balanced Front End web servers also running query, an application server running index and an application server running forms and excel services. The second application server also runs web so that the index server can hit it directly without impacting on the users FE servers. The SQL backend servers are clustered in an Active-Active configuration using an HP SAN for storage.

With all of this hardware and horsepower you would have thought that things would run very well, however we have been having large IIS issues. These seem to have come from some of our design decisions which were taken for the right reason at the time, but in retrospect need significant tuning.

The importance of design and planning

We spent a lot of time deciding to split out our Departments (Services), Offices, Industry Sectors, Mysite the SSP and other published extranets into separate Web applications each with their own site and site collections. This would mean that each part would be isolated and resilient and addressable using discrete DNS paths, such as http://services.company.com/ . We took this idea further in the design by creating web applications for each of the individual services ie http://it.company.com/ .

We rolled this model out and found that it was a disaster. Performance was awful and memory usage sky rocketed. Subsequently we consolidated the Web Applications down to about 8. This helped significantly with the memory and performance but we were concerned that after all our careful planning we had arrived at a compromise solution by fire fighting and not science.

SPSUG discussion on Web application design

The first thing to note is that by default an IIS worker-process within a web application will consume up to 1Gb RAM. You can modify this figure so that the worker-process re-cycles after a defined memory limit is hit, however whilst it is re-cycling your users cant access the site.

Web gardens

A recommendation to solve this problem (from an IIS environment generally rather than MOSS in particular) is to setup 2 or 3 worker-processes within each web application. Configure them to re-cycle at around 500Mb. This has the benefit of users not loosing connection whilst one of the worker processes is re-cycling and actively controlling the refresh and memory usage of each worker process. (Be careful not to set the memory re-cycling limits too low as there is the possible down side when the first worker process re-cycles the second and third have to takeup the load from the users. This increases the memory usage of the second and third worker processes which may then have to re-cycle in turn causing a cyclical spiral of constantly re-cycling worker processes!) . You should not set more than 4 worker processes per web application.

How many web applications and how do you apply them ?

So now we can control the memory for the web applications, where is the most appropriate place to use separate web applications?

From the discussions at the usergroup it would appear that best practice is to initially setup separate web applications for:

  1. The SPS (obviously as this is only used for administration it only needs one small worker process)
  2. MySite
  3. Portal Site

After that the decision on additional web applications seems to be based on

  1. The isolation required between Sites

    If a high isolation level is required then separate web applications should be produced

  2. The planned activity within a Site

    Sites which have dynamic and frequently changing content should be in separate web applications to those that provide mostly static content. Again a more aggressive web garden strategy should be applied to the dynamic site, whereas more object caching should be enabled for the static sites.

32bit vs 64bit

At the user group there was a discussion about using 64bit processors. With the extra memory and addressing capabilities a medium farm with 64bit servers throughout gains a 40% increase in performance over a 32 bit solution. It was also noted that Microsoft dont support a mixed hardware farm of 32 and 64bit machines. They say you should not do this and it will cause problems.

OneNote PowerToys

OneNote PowerToys

Tuesday, July 24, 2007

Traversing SharePoint List Folder Hierarchies « Krichie - That SharePoint Guy

Traversing SharePoint List Folder Hierarchies « Krichie - That SharePoint Guy

SharePoint File System Replication Tool - The Code Project - SharePoint Server

Good article on moving data into shareopint SharePoint File System Replication Tool - The Code Project - SharePoint Server: "= 'PUT';
Stream requestStream "

Mart Muller's Sharepoint Weblog - 23 October 2006

Im trying to find an easy way to list a set of subfolders in a sharepoint site using Web services. Marts article doesnt use webservices but does offer an interesting method using the new features of WSS3
Mart Muller's Sharepoint Weblog - 23 October 2006

Thursday, July 19, 2007

David Boschmans Weblog : Re-enabling hibernation in Windows Vista after disk cleanup

I am tryng to get the best out of Vista and ReadyBoost, and was wondering how you put the hibernate file onto a memory card. AlthoughThis article doesnt tell you how to do it, it does tell you about a number of pitfals which you dont want to fall into.

David Boschmans Weblog : Re-enabling hibernation in Windows Vista after disk cleanup

Wednesday, July 04, 2007

Vista Business - no DVD Codec

I tried to play a DVD on my laptop with Vista Business installed and found that it doesn’t ship with a DVD decoder! This seems a bit tight as you would either have to buy it seperatly, or download a codec from: Download the K-Lite Codec Pack

Thursday, June 21, 2007


A good dotNet API wrapper to use google maps from within dotnet http://be.sys-con.com/read/171162_1.htm

Google Maps API Docs here

Sunday, June 10, 2007

Mobile connect on Vista kills normal wireless/ethernet access - eXpansys UK

Ive installed Vista Business on a Toshiba M400 and then put the Vodafone Mobile connect drivers (VMC_R9.1.0.4345) onto my machine and now have severe network problems.

DHCP will not work on either the wireless to cabled LAN. Even if you put a fixed address with vaild DNS entries in the DNS wont resolve. You can ping the external DNS server but you cant get nslookup to resolve at all. I thought it might be firewall related but its not.

Suplimental work around
It would appear that this is related to Vista patching, or the lack thereof.

Initially I installed the 3G drivers on a clean Vista with no connection to the Internet and no patches installed which gave me the problems.

Installing the 3G drivers onto a fully patched Vista install works ok

Tuesday, June 05, 2007

Sunday, May 27, 2007

BartPE bootable live windows CD/DVD

I came across BartPE by accident and wondered what it was. Looking at Wikipedia it defines BartPE as:

"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

After some success with Sharepoint Web services, adding fields to a list programmatically, I wanted to be able to also update and delete them from the same program.

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)

I am currently building a 6 server Sharepoint 2007 (MOSS) Farm. All servers are x64 with 2 x Front End Servers, an application server, an Index Server and a SQL2005 2 node cluster connected to an HP SAN. After sizing and designing the MOSS architecture the next step is to configure your SQL server(s). Here is the MS guide for that. Prepare the database servers

Blogger Backups

I keep a lot of information for reference in my blog and felt I'd be more comforatble if I could back it up locally. CodePlex is one example of a new Blogger Backup tool.

(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

Marines flex their muscle with SharePoint - Network World: - If its good enough for the Marines ......

Monday, May 21, 2007

Updating Sharepoint List schema's using web services

Using Microsofts UpdateList web method from (_vti_bin\lists.asmx) for both WSS2 and MOSS I couldn't figure out why I kept getting a SoapServer.SoapServerException error message (of course without any helpful explanations)

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)

It is very easy to write and debug the web service using VS2005, however deploying that web service to IIS has so many issues to trip you up that I'm documenting my experience here so I can remember all of them.

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)]
public class Service1 : System.Web.Services.WebService
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

I needed to create an Infopath form which would create a sequential invoice number. I am publishing the form to a MOSS Forms library and using the browser to edit the form.

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
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

Thursday, May 10, 2007

Microsoft SharePoint Products and Technologies Team Blog

Microsoft SharePoint Products and Technologies Team Blog: "Security guidance for an external anonymous access environment is targeted to allow anonymous access to content while protecting back-end servers in the farm from direct user access or malicious actions targeted through front-end Web servers. In an environment where multiple farms might be deployed to support authoring, staging, and publishing, the guidance for this environment is intended for the published farm (the farm that is anonymously accessed by users)."

SharePoint Migration tools

SharePoint Software: Backup, Recovery & Migration for SharePoint by AvePoint

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

The Boiler Room - Mark Kruger, SharePoint MVP : 2007 MOSS Resource Links (Microsoft Office SharePoint Server)

The Boiler Room - Mark Kruger, SharePoint MVP : 2007 MOSS Resource Links (Microsoft Office SharePoint Server)

Thursday, May 03, 2007

Sharepoint 2003 to MOSS 2007 Document migration

I need to migrate a number of documents from one sharepoint environmen to another.
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

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).

All About SharePoint : WSUploadService - Web Service for uploading documents into SharePoint

All About SharePoint : WSUploadService - Web Service for uploading documents into SharePoint: "WSUploadService "

Wednesday, May 02, 2007

Monday, April 30, 2007

Infopath Locked Fields

Ive been working with Infopath 2007 and my own XML Schema recently. After I published the form to a MOSS2007 document library I found that all the fields and groups in the data source were now locked and had a padlock against them. Even if I tried to edit the local copy of the XSN I couldnt change the settings.

Ive read that InfoPath locks the schema for imported and connected data sources, however this is my own schema and its locked me out of it.

I urgently needed to add a field so I saved the Infopath form as its constiutent files and edited the XSD, Template.XSL and the Manifest XML files manually. The opening the manifest file into InfoPath brought in the additional field (still locked!!!), but usable.

Ive read that you can use Tools -> Change Main Data Source for this however InfoPaths heavy handedness in the respect of a local XSD schema is rather worrying.

Monday, April 23, 2007

InfoPath Team Blog : Submitting to a SharePoint List

Sharepoint lists are a great place to store data and Infopath 2007 is a great form editing tool, so you'd thought the two would work seamlessly together....but no....

Perhaps naively I thought that Infopath 2007 would seamlessly allow editing of MOSS Sharepoint lists, however, you have to use code, define your schema in XML and then write submit code to the Sharepoint web service using the lists GUID. Infopath 2007 and MOSS are such powerful tools, why cant a little codeless integration be put in place to ease this task?

Here is an article from March 2007 which shows you how to do it in code : InfoPath Team Blog : Submitting to a SharePoint List: "Submitting to a SharePoint List"

Saturday, April 21, 2007

ThreeWill's Personal Backup for Groove - Rapid Solutions Exchange

Once you have finished with a workspace in Groove it would be very nice to be able to archive it to a DVD so that if you ever needed it in the future you could get to it.

Over several PC upgrades workspaces have been "misslaid" and a backup would help with this as well.

A number of blogs mention Dicodemy's GForce.Backup but the but www.dicodemy.net seems to be down.

Another option is to use ThreeWill's Personal Backup for Groove - Rapid Solutions Exchange

Monday, April 16, 2007

Creating a Custom Web Service for SharePoint

Creating a Custom Web Service for SharePoint

I need to programatically migrate data from WSS2 to WSS3. As the new V3 Microsoft.Sharepoint.DLLs dont seem to be backwardly compatible to WSS2 Im considering writing code using the old DLL and accessing the new version using Webservices.

Sunday, April 15, 2007

Ton Stegeman - SharePoint 2007 weblog : Exporting and importing SharePoint 2007 content using the object model

Ton Stegeman - SharePoint 2007 weblog : Exporting and importing SharePoint 2007 content using the object model

Good note about using Microsoft.Sharepoint.Deployment features in WSS3. Unfortunatly this only works with WSS3 and MOSS2007, if only we could get it to talk to WSS2 as well.

Sharepoint Tips And Tricks: Synchronous Add List event (ItemAdding) will not give access to item properties

Sharepoint Tips And Tricks: Synchronous Add List event (ItemAdding) will not give access to item properties

Ive been trying to understand how best to handle WSS3's event model and was getting rather bogged down not being able to see any SPItemEventProperties properties on the Async ItemAdding event.

I found I am not alone in my struggles and the link above to Ishai Sagi's blog shows that Microsoft had said that this behaviour is by design. Im not sure how it can be a very helpfull design to fire off an event and then not be able to see what caused that event, however one of the responses to Ishai gives the following code which at least gives some information on what is being added.

foreach (DictionaryEntry de in properties.AfterProperties)
{ string myValue = de.Value;
string myKey = de.Key; }

I'll add more as I find it, but there should be a clearer lead from Microsoft on this rather than just updating thier MSDN examples to ignore this issue.

Tuesday, April 03, 2007

Wednesday, March 28, 2007

Finding the last data cell in Excel 2007

Using VBA use the Range.SpecialCells Method such as

RCount = ActiveCell.SpecialCells(xlLastCell).Row
CCount = ActiveCell.SpecialCells(xlLastCell).Column

Friday, March 23, 2007

Renaming WSS 3 Sharepoint sites (webs)

I'm building a Sharepoint MOSS 2007 environment and found that one of the sites I had created had the wrong name. I began looking around to see if I could migrate the content from one site to another easily which didnt look promissing. I then found that I could rename the site using STSADM.EXE Something like
stsadm -o renameweb -url http://portal/[oldname] -newname [newname]

Brilliant, (remember to change the site title as well) and its job done !

Wednesday, March 21, 2007

Dark Blue Duck | Scanning Enabler (TM)

Dark Blue Duck Scanning Enabler (TM): "Scanning EnablerTM Product enhances SharePoint adding support for Desktop Scanning"

Whilst this is and interesting product im not sure why you wouldnt just scan your files directly to an WSS URL document library instead. I must be missing something.

Sunday, March 18, 2007

ScottGu's Blog : New C# "Orcas" Language Features: Automatic Properties, Object Initializers, and Collection Initializers

ScottGu's Blog : New C# "Orcas" Language Features: Automatic Properties, Object Initializers, and Collection Initializers

Interesting C# 3 new bits

WSS 3 anonymous setting

I couldnt find an easy way to enable Anonymous access after setting up a WSS 3 web application. I couldnt find anything in the book references but this article gives the steps to explain what is needed.

Firstly you need to go the WSS3 Central Administration -> Application Management-> Authentication Providers section and edit the default zone properties to allow anonymous. This has the effect of allowing anonymous in the IIS Service manager -> Web -> Directory Security section.

Then you need to enable the setting on each Site Collection. You do this by going to the collection and choosing Site Actions -> Site Settings -> Users and permissions -> Advanced Permissions -- and enable anonymous access under the "Settings" drop down.

This last step isnt very intuative and I didnt find it until I read this article

Sunday, March 04, 2007

Joel Oleson's SharePoint Land

Joel Oleson's SharePoint Land - interesting avanced articles on SP 2007

Saturday, March 03, 2007

Changing SQL Server 2005 language

SQL Server Forums - Changing SQL Server 2005 language: "EXEC sp_configure 'default language', 23 RECONFIGURE"

PCTV To Go HD Wireless

Pinnacle Systems - Product summary - PCTV To Go HD Wireless: "PCTV To Go HD Wireless" Ive been looking for an HD transmission system for some time and this solution seems to solve this with a combination of slingbox type web tranmission as well.

CHM Page cannot be displayed

Ive often had frustrating problems with CHM files not expanding their pages properly and endedup routing round various PC's trying to find one that would work. Thanks to Dennis Crane for suggesting re-registering the CHM viewer "regsvr32 hhctrl.ocx" which did the trick ! CHM files: The page cannot be displayed error

Tuesday, February 20, 2007

YouTube - Web 2.0 ... The Machine is Us/ing Us

This is a very good clip on the fundementals of XML. (Boring I hear you say! - watch it and judge afterwards)

If you every have to persuade anyone that digital is better than paper then the first 30 seconds are a must !

YouTube - Web 2.0 ... The Machine is Us/ing Us

hello its liam (trainbloggin) : MOSS2007 + GROOVE2007 – Document Conflicts

hello its liam (trainbloggin) : MOSS2007 + GROOVE2007 – Document Conflicts

Saturday, February 10, 2007

VMTN Top News

VMware 6.0 beta 3 available - looking forwards for the full release especially as the Host can be vista

Thursday, February 08, 2007