In my code i have this:
HOST = "*"; PORT = 9000;
baseAddress = "http://" + HOST + ":" + PORT + "/";
// Start OWIN host. Should be called in TT extension code
WebApp.Start<Startup>(url: baseAddress);
which is leading to:
A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll Additional information: Exception has been thrown by the target of an invocation.
Online I have found a possible solution by typing in CMD run as Admin:
netsh http add urlacl url=http://+:9000/ user=Everyone
but this has not resolved the issue. Can anyone help?
You simply run in an elevated cmd:
netsh http add urlacl url=http://*:9000/ user=your_user_name
Please note, that you mentioned using a star and not the plus sign. So you have to add a star route to your urlacl and not a plus route as mentioned in your post. After this, you don't have to start it as Admin.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With