在网站下添加具有不同端口的应用程序

huangapple go评论61阅读模式
英文:

IIS Add Application Under Website With Different Port

问题

我有一个在IIS 10下创建的名为MyWeb的网站,运行在5000端口下。我需要在其中创建一个应用程序,用来托管.NET 6,并且我需要这个应用程序监听6000端口,这可以做到吗?

我的目标是在同一个站点下托管一个NextJS应用和一个.NET 6应用,所以NextJS将在5000端口运行,而.NET将在6000端口运行。

英文:

I have website created under IIS 10 named MyWeb that runs under port 5000.
I need to create an application under it, to host a .NET 6 and I need this app to listen to port 6000, can this be done?

My goal is to host a NextJS app and a .NET 6 app under the same site, so the NextJS will run at 5000 and .NET at 6000.

答案1

得分: 0

如果您的网站名为MyWeb且绑定到端口5000,那么在此站点下创建的所有应用程序都将通过端口5000访问。您需要创建两个站点,分别绑定到端口5000和端口6000,以托管NextJS应用程序和.NET 6应用程序。

英文:

If your website named MyWeb is bound to port 5000, all applications created under this site will be accessed through port 5000. You need to create two sites binding port 5000 and port 6000 respectively to host NextJS application and .NET 6 application.

答案2

得分: 0

我已经搜索了一段时间,得出了一些结论,感谢你的帮助:

  • SSR 不能在这种情况下使用。
  • VS 没有针对这个的模板。
  • 我们可以使用 SSG,请查看这个链接:https://github.com/NetCoreTemplates/nextjs,但这将使用 serviceStack.net。
    NuGet 网站上有一个名为 "x" 的工具,用于设置模板。
英文:

I have been searching for a while and I came up with some conclusions, thanks to you:

  • SSR can not be used in this case.
  • VS has no template for this.
  • We can use SSG, check this :https://github.com/NetCoreTemplates/nextjs
    but this will use serviceStack.net.
    There is a tool named "x" on the NuGet website, that is used to setup the template.

huangapple
  • 本文由 发表于 2023年7月27日 22:51:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/76780954.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定