WSUS Connection Error

Went to administer WSUS today, and my MMC window prompted this:

Update Services: Error: Connection Error An error occurred trying to connect the WSUS server. This error can happen for a number of reasons. Check connectivity with the server. Please contact your network administrator if the problem persists. Click Reset Server Node to try to connect to the server again.

Strange. Started investigating and found the following

  • Server was up and connecting via RDP / RPC
  • IIS was up
  • Windows Internal Database & WSUS Service both up
  • Server connecting via telnet on port 8530
  • Local admin of the WSUS console via MMC failed with the same error message

Found errors in the event log:

clientwebThe WSUS administration console has encountered an unexpected error. This may be a transient error; try restarting the administration console. If this error persists, Try removing the persisted preferences for the console by deleting the wsus file under %appdata%\Microsoft\MMC\. System.NullReferenceException -- Object reference not set to an instance of an object. Source Microsoft.UpdateServices.UI.SnapIn Stack Trace: at Microsoft.UpdateServices.UI.SnapIn.Scope.ServerSummaryScopeNode.ResetScopeNode() Update Services failed its initialization and stopped.

Ran a “wsutil checkhealth”:

wsusutil checkhealth

Which led me to this error:

WebHost failed to process a request. Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/40282060 Exception: System.ServiceModel.ServiceActivationException: The service '/ClientWebService/client.asmx' cannot be activated due to an exception during compilation. The exception message is: This collection already contains an address with scheme http. There can be at most one address per scheme in this collection. If your service is being hosted in IIS you can fix the problem by setting 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' to true or specifying 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'. Parameter name: item. ---> System.ArgumentException: This collection already contains an address with scheme http. There can be at most one address per scheme in this collection. If your service is being hosted in IIS you can fix the problem by setting 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' to true or specifying 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'. Parameter name: item at System.ServiceModel.UriSchemeKeyedCollection.InsertItem(Int32 index, Uri item) at System.Collections.Generic.SynchronizedCollection`1.Add(T item) at System.ServiceModel.UriSchemeKeyedCollection..ctor(Uri[] addresses) at System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses) at System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses) at System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) --- End of inner exception stack trace --- at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath, EventTraceActivity eventTraceActivity) Process Name: w3wp Process ID: 2536

So I went off to C:\Program Files\Update Services\WebServices\ClientWebService\ to edit the web.config file. Had to take ownership of the file to enable me to make a change, and added the required flag at the appropriate level:

<serviceHostingEnvironment aspNetCompatibilityEnabled=”true”  multipleSiteBindingsEnabled=”true”/>

Restarted the server and everything started working again


Posted in Uncategorized | Leave a comment

Forums Online

Mucking around with some forum software, and have made a forum available at

You need to register to post, which will probably put most people off posting – The alternative is a forum full of Indonesian viagra spam, which the internet already has enough of.

You can post threads and request assistance with anything you come across here, or any other server issues which you would like to discuss.

Posted in Uncategorized | Leave a comment

RDS Broken after Virtual Machine reconfiguration

After migrating a few virtual machines across datacentres (using vConverter in this instance, but the same error could occur with any type of VM configuration, specifically when adding and removing virtual NICs), I was no longer able to RDP a server previously configured with Remote Desktop Services (RDS). I actually forgot to screenshot the RDP error, but it was “Remote Desktop can’t connect to the remote computer for one of these reasons: 1) Remote accces to the server is not enabled 2) The remote computer is turned off 3) The remote computer is not available on the network.  Make sure the remote computer is turned on and connected to the network, and that remote access is enabled.”

On the affected host, navigate to RDS Administration (Start > Admin Tools > Remote Desktop Services > Remote Desktop Session Host Configuration:

Right-click the RDP-Tcp connection & select Properties:


The error message is displayed when switching to the Network Adapter tab:


“Remote Desktop Session Host Configuration tool is not able to obtain the properties for this connection. The connection has either been deleted or the internal state of this connection has been corrupted. Please close all property pages, and select refresh from the menu.”

You can see here the defined Network Adapter is missing completely, but can’t be changed:


Start Regedit and navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp

Set the ‘LanAdapter’ value to 0

Restart RDS services or server, and retry RDP!


Posted in Server 2008, Server 2012, Uncategorized | Tagged , , , , | Leave a comment

Macro Enabled Purchase Order Template

It’s been two years since I uploaded my Macro Enabled Purchase Order Template, and it’s been one of the most popular pages & downloads on my site to date…. I’ve recently updated this to fit some new requirements & I thought I’d share this with you all as it’s a bit shinier than before (oooh)

Purchase Requisition Template 63.4 KB

It has the same requirements as before:

  • Unique purchase order number on each request
  • Reduce the number of manual steps required to get approval from line manager
  • Provide centralised logging & archive of purchase orders raised

The updated template now also does the following:

  • Macro added to add & remove rows as required
  • Removed rows are deleted to prevent contribution to the total when non-visible
  • Protects cell formatting against pasted formatting
  • Conditional formatting to make the form look a bit neater
  • Only emails the range as it displays within Excel, not the entire worksheet

Important Steps:

  • You will need to add a reference to the Microsoft Office Object Library from Excel
  • Macros must be enabled (make the XLSX file a trusted document)
  • You must have Outlook & a valid MAPI profile for Outlook to be called
  • The email macro does not look up against exchange – The names you use must match the display name or exchange alias of the users as they appear in your GAL. As long as the name matches, Outlook will add the address and the mail will send. You could also use email addresses instead of names
  • You must update the paths to Purchase Order Log and the Archive PDF output, relative to your system. If you try and use the root of C:\ or any protected system folders the code will not run
  • The worksheet is protected except for editable cells, but there is no password. If unprotected, the worksheet will re-protect itself during various actions performed by the user

The Process Explained:

  • The user opens Purchase Requisition Form.xlsx. The PO number automatically increments by one & the file saves
  • User enters the details as required to the form. Once completed, the user his the Generate button
  • Email is generated & a PDF copy attached. Email is addressed To: {Approval field}; Cc: {Requested By field}
  • If there is a value inserted to the Service Request field, then our address is CC’d to the email, and the SR# is added to the subject line for email integration
  • The PDF is written to disk, using the variables from the spreadsheet & today’s date/time for the filename to ensure no accidental file overwrites
  • The summary on the ‘Data’ worksheet is copied & pasted to the Purchase Order Log.xlsx sheet. You can hide the ‘Data’ worksheet once you’ve finished modifying anything
  • The visible portion of the purchase order is copied as a range & pasted to the email ready to send
  • User closes the workbook without saving changes (leaving the blank template ready for other staff)
  • In order to raise two consecutive PO’s, simply hit the ‘Reset Fields’ button to wipe input data, and increment to the next PO number

The Code:

I have added comments throughout the code which will assist you in editing this to fit your requirements. There code is broken down on the prior version of this post here, it’s not changed enough to warrant me reposting the same  information. To edit the VBA, press ALT+F11 in Excel. The different parts of the code can be found in the following locations:

Microsoft Excel Objects > ThisWorkbook
Autorun macros

Modules > Module1
Required fields validation
Create email
Save archive PDF
Update log

Modules > Module2
Reset form button

Modules > Module 4:
Add Row / Delete Row

The empty form:


Once completed, the generated email:






Posted in Macro, MS Excel, VBA | 2 Comments