简体   繁体   English

ASP.net web 服务和 Web Z72664DC0959F3B0C04891F8C7046A9FZ3

[英]ASP.net web service and Web Api in a single port

I already have a webservice which is running on a port, and we are going to implement another webapi project which need to be hosted on the same server without opening a new port.我已经有一个在端口上运行的 web 服务,我们将实现另一个 webapi 项目,该项目需要托管在同一台服务器上,而无需打开新端口。 Is there any way to achieve that???有什么办法可以实现吗???

Here are two possibilities:这里有两种可能性:

  • Run the WebAPI in a virtual directory of the same site.在同一站点的虚拟目录中运行 WebAPI。
  • Run the WebAPI as a new site on the same port but with a different hostname binding.在同一端口上将 WebAPI 作为新站点运行,但使用不同的主机名绑定。 Requires a new DNS entry and (if using https) a new certificate (or a wildcard certificate).需要新的 DNS 条目和(如果使用 https)新证书(或通配符证书)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM