Our Outlook add-in uses web views to display it’s UI. To make this work, it tries to open a local web-server (accessible from your PC only) under a certain port. If your computer is locked down by your corporate IT, this might fail.

If you check the log files, you’ll see one or more of the following entries:

JiraForOutlook.Lifecycle.AddinLifecycle|Starting web app on "http://localhost:49215/" did not work System.Reflection.TargetInvocationException: Access denied
at System.Net.HttpListener.AddAllPrefixes()
at System.Net.HttpListener.Start()
at Microsoft.Owin.Host.HttpListener.OwinHttpListener.Start(HttpListener listener, Func)

….

This or similar errors might have different reasons:

  • All available local ports are blocked. A simple computer / Windows reboot usually solves this issue.

  • Your computer is very restricted by your central IT, in this case, please follow the steps below.


To solve this for restricted PCs, you (or an administrator) will need to run the following commands from an elevated command line. Please make sure to replace “DOMAIN\user” with your actual domain and user name.

netsh http add urlacl url=http://localhost:49215/ user=DOMAIN\user
netsh http add urlacl url=http://127.0.0.1:49215/ user=DOMAIN\user
CODE

Deployment on Citrix / Terminal Server

In case you are facing this error for a deployment on in a virtualized/shared environment, you might need to allow access to more ports, since users share those in some cases. E.g. if user #1 opens Outlook, it will allocate port 49215, so user #2 will not be able to use the same port. Our add-in tries to open a port in the range between 49215-49315. To make this work, you’ll need to allow access to as many ports as you’ll have users on the same machine simultaneously:

netsh http add urlacl url=http://localhost:49215/ user=DOMAIN\userOrGroup
netsh http add urlacl url=http://127.0.0.1:49215/ user=DOMAIN\userOrGroup

netsh http add urlacl url=http://localhost:49216/ user=DOMAIN\userOrGroup
netsh http add urlacl url=http://127.0.0.1:49216/ user=DOMAIN\userOrGroup

netsh http add urlacl url=http://localhost:49217/ user=DOMAIN\userOrGroup
netsh http add urlacl url=http://127.0.0.1:49217/ user=DOMAIN\userOrGroup

....
CODE