We are using the ASP.NET Core & Angular version of the project.
We modified the Web.Host appsettings.Production.json ClientRootAddress to point to the web server url instead of the default localhost:4200. However. whenever a new user clicks on the confirmation email link, we receive the following message: The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
So, let's say our server is at https://www.random.com, the link we get is https://www.random.com/account/confirm-email?c=yaddayaddayadda
What are we doing wrong here?
6 Answer(s)
-
0
What is the content of your appsettings.Production.json file?
-
0
{ "ConnectionStrings": { "Default": "<RemovedConnectionString>" }, "App": { "ServerRootAddress": "http://localhost:9901/", "ClientRootAddress": "#{appBaseUrl}#", "CorsOrigins": "http://localhost:9902" } }
We are replacing the #{appBaseUrl}# token during deployment. That changes to the web app url.
-
0
OK - so what I've found is that our routing seems odd. The URL is in this format: https://www.random.com/#/account/login
The email activation url is: https://www.random.com/account/confirm-email
If i add the /#/ to the second URL, everything works. Where is this coming from, and why? We have made no modifications to the routing.
-
0
you need to look at your angular settings (
appconfig.production.json
) -
0
I have, and as far as I can tell, it looks fine:
{ "remoteServiceBaseUrl": "https://not-real-uri-api.azurewebsites.net", "appBaseUrl": "https://not-real-uri.azurewebsites.net", "localeMappings": [ { "from": "pt-BR", "to": "pt" }, { "from": "zh-CN", "to": "zh" }, { "from": "he-IL", "to": "he" } ] }
-
0
OK - found the issue - for whatever reason a developer added {useHash:true} to the root-routing.module.ts. At this point I have no idea why, but, there it is.
Thank you.