Web Services And AutoEventWireUp
If you get the NullReferenceException error when dealing with web services, it might have to do with AutoEventWireUp being set to false. If you get an error pointing at something like
foreach (ServiceDescription description in serviceDescriptions), it might also have to do with AutoEventWireUp set to false.
For instance, if you set AutoEventWireUp to false globally, in Web.Config, your web services will fail.
There's a fix for this though, although it's a bit of a different one.
You just have to locate the DefaultWsdlHelpGenerator.aspx file in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG (or similar) and add this line to the top:
<%@ Page AutoEventWireup="true" %>