[英]Can't access a basic Fabric Azure WebAPI OWIN stateless service
After following the tutorial , I've succeeded running it on localhost:8534/simpleprime/api/values/
* having the same result as the tut. 在完成本教程之后 ,我已成功在
localhost:8534/simpleprime/api/values/
*上运行它,其结果与tut相同。
Later publishing the solution to a remote cloud cluster, I couldn't access it using www.clusterurl:8534/api/values
, timing out each time. 稍后将解决方案发布到远程云集群,我无法使用
www.clusterurl:8534/api/values
访问它,每次都超时。 Even though I got reassuring event diagnostics from Visual Studio during the deploy. 即使我在部署期间从Visual Studio获得了令人放心的事件诊断。
I've also tried each of the nodes seperetly, going to http://node_ip:8543/simpleprime/api/values
, without any luck 我也尝试了每个节点,转到
http://node_ip:8543/simpleprime/api/values
,没有任何运气
If you want to access your service with OWIN listener on Azure, you should define ports that will be used by your application for the LoadBalancer during cluster creation. 如果要在Azure上使用OWIN侦听器访问服务,则应在群集创建期间定义应用程序将用于LoadBalancer的端口。
If you for some reason forgot you can do it later by: 如果您出于某种原因忘记了以后可以通过以下方式完成:
SERVICE PART 服务部分
Define your endpoint directly (so SF will use your definied port number) (in my example 8081) 直接定义您的端点(因此SF将使用您的定义端口号)(在我的示例8081中)
Re-publish application to Azure. 将应用程序重新发布到Azure。
AZURE PART AZURE PART
Finally solved it, inside the service port config (aka ServiceManifest.xml
) there is a port setting. 最后解决了它,在服务端口config(又名
ServiceManifest.xml
)里面有一个端口设置。 After changing it to 19080 - the default http port my cluster was listening to, everything started working. 将其更改为19080 (我的群集正在侦听的默认http端口)后,一切都开始工作了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.