I'm having issues with redirects to public site after logging in when I have subdomains configured on Public site.
Public site config: App:WebSiteRootAddress = https://{TENANCY_NAME}.pub.mysite.com/ App:AdminWebSiteRootAddress = https://{TENANCY_NAME}.mvc.mysite.com/
MVC site config: App:WebSiteRootAddress = https://{TENANCY_NAME}.mvc.mysite.com/ App:RedirectAllowedExternalWebSites = https://{TENANCY_NAME}.pub.mysite.com/
When I navigate to Public home page and do a Login, it navigates to MVC site to render login UI, but does NOT return to the Public site after login. The URL does show a correct returnUrl in the query string (e.g. <a class="postlink" href="https://tenant.mvc.mysite.com/account/login?ss=true&returnUrl=https://tenant.pub.mysite.com/Account/Login">https://tenant.mvc.mysite.com/account/l ... ount/Login</a>)
Does Public site support {TENANCY_NAME} subdomains? I'm using version 5.6
Thanks.
5 Answer(s)
-
0
Can you jump correctly when you don't use {TENANCY_NAME}?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Yes, before I added subdomain config redirects worked fine.
It seems Public site is detecting tenant name correctly from subdomain, but redirect after login is not working.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
@leop can you view the public website if you use subdomain on the url ? I mean what happens when you try to visit <a class="postlink" href="https://tenant.pub.mysite.com/">https://tenant.pub.mysite.com/</a> on your browser directly ? Does it work ?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi ismcagdas, if I navigate to Public site with tenant subdomain, the page shows up fine, everything appears to work OK in regards to detecting tenant on Public site.
It seems the problem is on MVC site with App:RedirectAllowedExternalWebSites setting when public site is configured to support subdomains.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Thanks @leop.
I got it now. Could you create an issue here <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/new">https://github.com/aspnetzero/aspnet-ze ... issues/new</a> ? We will fix the problem.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)