Hi (Angular + .Net Core)
I have company website on mycompanydomain.com and www.mycompanydomain.com
I want to host all of ASP.NET Zero on sbdomain:
- core.mycompanydomain.com (For the .Net Core App)
- host.mycompanydomain.com (For the Admin)
- tenant1.mycompanydomain.com (For Tenant 1)
- tenant2.mycompanydomain.com (For Tenant 2)
These are my current configuration which is not working. Also when i am on tenant1.mycompanydomain.com the images are not displaying as its taking main webiste URL www.mycompanydomain.com where my images and css are not hosted.
File: Web.Host\appsettings.Staging.json "App": { "ServerRootAddress": "https://{TENANCY_NAME}.mycompanydomain.com", "ClientRootAddress": "https://{TENANCY_NAME}.mycompanydomain.com", "CorsOrigins": "https://{TENANCY_NAME}.mycompanydomain.com" }
File: Angular "remoteServiceBaseUrl": "https://core.mycompanydomain.com", "appBaseUrl": "https://{TENANCY_NAME}.mycompanydomain.com", "localeMappings": {
** Also, how to differentiate between Host and the Tenant?**
Thanks
4 Answer(s)
-
0
- You should configure DNS to redirect all subdomains to a static IP address. To declare 'all subdomains', you can use a wildcard e.g. *.mydomain.com.
- You should configure IIS to bind this static IP to your application.
core.mycompanydomain.com (For the .Net Core App)
Thecore
subdomain will be redirected to the angular side. It should be another domain or subdomain.Please share the real url. If this is confidential, please share it to my email. [email protected]
-
0
@maliming I have sent you an email.
-
0
hi optixdev
I got your e-mail, thank you.
Like I said before, your api should use a different domain or subdomain than angular.
api:
tenantname.api.mycompanydomain.com
angular:tenantname.mycompanydomain.com
api
appsettings
"App": { "ServerRootAddress": "https://{TENANCY_NAME}.api.mycompanydomain.com", "ClientRootAddress": "https://{TENANCY_NAME}.mycompanydomain.com", "CorsOrigins": "https://{TENANCY_NAME}.mycompanydomain.com" }
angular
appconfig
{ "remoteServiceBaseUrl": "https://{TENANCY_NAME}.api.mycompanydomain.com", "appBaseUrl": "https://{TENANCY_NAME}.mycompanydomain.com" }
-
0
Thank you very much its working now.