简体   繁体   English

.NET Core App 为客户端生成多个网站

[英].NET Core App generate multiple websites for client

I have an app with products and I want to add a new feature "generate public list of your products on your domain".我有一个包含产品的应用程序,我想添加一个新功能“在您的域上生成您的产品的公开列表”。 How can I do that?我怎样才能做到这一点?

I have one .NET Core app with one database.我有一个带有一个数据库的 .NET Core 应用程序。 I want to generate site for my client with products from my db.我想用我的数据库中的产品为我的客户生成网站。 I don't want to manage multiple IIS websites.我不想管理多个 IIS 网站。

My plan is create predefined design and every client can edit texts from admin.我的计划是创建预定义的设计,每个客户都可以从管理员那里编辑文本。 I don't know how to deal with multiple domains and one app.我不知道如何处理多个域和一个应用程序。

Is it possible?可能吗? Thank you谢谢

You can have multiple domains pointing at the same application under the hood.您可以让多个域指向同一应用程序。 They would need some why of knowing what different information they needed to present.他们需要一些原因来了解他们需要提供哪些不同的信息。

You could do this by detecting the current Domain name and using some kind of lookup table or something.您可以通过检测当前域名并使用某种查找表或其他方式来做到这一点。

You could detect the domain name using something like this:您可以使用以下方式检测域名:

System.Net.NetworkInformation.IPGlobalProperties.GetIPGlobalProperties().DomainName;

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

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