TL;DR; Explains how to resolve AddressAccessDeniedException when running tests in Team Build by granting the Build Agent service account permission to create IIS listeners.

If, like me you are trying to run tests against your web services and you the error below, you will need to give permission to the service account that runs your Build Agent to create listeners in IIS.
Class Initialization method TestServiceProjects.RentalCentreServiceRemoteTest.MyClassInitialize threw exception. System.ServiceModel.AddressAccessDeniedException: System.ServiceModel.AddressAccessDeniedException: HTTP could not register URL http://+:3456/RentalCentreServiceRemoteTest/ . Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details). —> System.Net.HttpListenerException: Access is denied.
I first tried giving the service account administrator rights, and this did not work, so I added “Act as part of operating system”. Lo and behold, that worked…
Happy now…
Technorati Tags: ALM
Each classification [Concepts, Categories, & Tags] was assigned using AI-powered semantic analysis and scored across relevance, depth, and alignment. Final decisions? Still human. Always traceable. Hover to see how it applies.
If you've made it this far, it's worth connecting with our principal consultant and coach, Martin Hinshelwood, for a 30-minute 'ask me anything' call.
We partner with businesses across diverse industries, including finance, insurance, healthcare, pharmaceuticals, technology, engineering, transportation, hospitality, entertainment, legal, government, and military sectors.

Qualco

Microsoft

ProgramUtvikling

Higher Education Statistics Agency

Milliman

Illumina

Jack Links

Flowmaster (a Mentor Graphics Company)

ALS Life Sciences

Cognizant Microsoft Business Group (MBG)

Kongsberg Maritime
Boxit Document Solutions

MacDonald Humfrey (Automation) Ltd.

Schlumberger

Slicedbread

Epic Games

Genus Breeding Ltd

Deliotte

Nottingham County Council

Ghana Police Service

Royal Air Force

Department of Work and Pensions (UK)

Washington Department of Enterprise Services

New Hampshire Supreme Court

Capita Secure Information Solutions Ltd

YearUp.org

ALS Life Sciences

Sage

Workday

Big Data for Humans