Ocelot总是以5000端口启动
我正在尝试部署我的Ocelot网关服务器。
我键入useUrls(“ http:// localhost:6000”)
,看到了使用6000端口的服务器。为了尝试更改端口,在删除 useUrls 语法之后,我像以下一样修改了 ocelot.json 文件
"GlobalConfiguration": {
"BaseUrl": "http://localhost:6000"
}
,但是我的服务器再次使用5000端口启动。
首先,我想JSON文件中存在一些错误。因此,我在同一JSON文件中修改了一个重新路由API。但是效果很好。也就是说,JSON文件运行良好。
其次,我将 globalconfiguration 移至文件的顶部,但它也不正常。但是重新打扰效果很好。
另外,我也尝试在下面
appsettings.json
"urls" : "http://localhost:6000"
这也不起作用。
有人可以帮我吗?提前致谢。
I'm trying to deploy my ocelot gateway server.
I had typed UseUrls("http://localhost:6000")
and I saw the server launched with 6000 port. In order to I tried to change port, after delete UseUrls syntax, I modified ocelot.json file like below
"GlobalConfiguration": {
"BaseUrl": "http://localhost:6000"
}
However, my server launched with 5000 port again.
First, I guess there were some error in json file .So I modified a rerouting APIs in same json file. But It worked well. That is, json file is working well.
Second, I moved GlobalConfiguration to top of the file and It didn't work as well. But rerouting worked well.
Also I tried to below also
appsettings.json
"urls" : "http://localhost:6000"
This didn't work either.
Is there anyone to help me please? Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我使用以下JSON(JSON文件中的 kestral 键)解决了这个问题。我猜这不是一个适当的解决方案,而是对于其他情况的其他人:
I solved this problem using the below JSON (Kestral key in JSON file). I guess it is not a proper solution, but for other people who are in the same situation: