Honeymoon
asked on
Self Hosted WebApi Accessible ony in Localhost (not over LAN=
Hi all
I have created a self hosted webapi (appBuilder) that runs in a Windows Service.
If I call the api from windows testclient or from fiddler from localhost, it runs fine.
The service runs under my domainaccount .
The service has to be accessible over the LAN:
Therefore I have called the command:
netsh http add urlacl url=http://+:2345/ user=<domain>\<my domainaccount> delegate=yes
Problem:
- After I have called the command, the service is not accessible over my IP and also no more from localhost.
- If I delete the reservation (with netsh delete) the service is accessible again from localhost
Base-Address: http://127.0.0.1:2345/
Code in startup.vb:
Dim config As New HttpConfiguration()
config.MapHttpAttributeRou tes()
config.Routes.MapHttpRoute (name:="De faultApi", routeTemplate:="api/{contr oller}/{id }", defaults:=New With {Key .id = RouteParameter.[Optional]} )
appBuilder.UseWebApi(confi g)
Code in OnStart:
_server = WebApp.Start(Of Startup)(url:=baseAddress)
What do I have to do, to solve this problem?
Thanks
I have created a self hosted webapi (appBuilder) that runs in a Windows Service.
If I call the api from windows testclient or from fiddler from localhost, it runs fine.
The service runs under my domainaccount .
The service has to be accessible over the LAN:
Therefore I have called the command:
netsh http add urlacl url=http://+:2345/ user=<domain>\<my domainaccount> delegate=yes
Problem:
- After I have called the command, the service is not accessible over my IP and also no more from localhost.
- If I delete the reservation (with netsh delete) the service is accessible again from localhost
Base-Address: http://127.0.0.1:2345/
Code in startup.vb:
Dim config As New HttpConfiguration()
config.MapHttpAttributeRou
config.Routes.MapHttpRoute
appBuilder.UseWebApi(confi
Code in OnStart:
_server = WebApp.Start(Of Startup)(url:=baseAddress)
What do I have to do, to solve this problem?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.