Forum Discussion
Julien_Marpault
Nov 10, 2021Copper Contributor
Blazor WebAssembly Subdomain routing
Hello, Is someone knows if it's possible to use subdomain routing with Blazor WASM ? I have a project where each user space is a subdomain. ex: julien.contoso.com john.contoso.com .... ...
- Nov 12, 2021I don't understand why would you want to do it that way ...
Provided you have all the URL of each user pointing at the proper resource where the app is hosted, you could do it by retrieving the URL in the code, parsing the username from it, and use it as a cascading parameter for instance... (You would have to implement this yourself)
But wouldn't it be easier just using the default routing method? contoso.com/julien/xxx, contoso.com/john/xxx
Regards,
Iker
ikulloa
Nov 12, 2021Copper Contributor
I don't understand why would you want to do it that way ...
Provided you have all the URL of each user pointing at the proper resource where the app is hosted, you could do it by retrieving the URL in the code, parsing the username from it, and use it as a cascading parameter for instance... (You would have to implement this yourself)
But wouldn't it be easier just using the default routing method? contoso.com/julien/xxx, contoso.com/john/xxx
Regards,
Iker
Provided you have all the URL of each user pointing at the proper resource where the app is hosted, you could do it by retrieving the URL in the code, parsing the username from it, and use it as a cascading parameter for instance... (You would have to implement this yourself)
But wouldn't it be easier just using the default routing method? contoso.com/julien/xxx, contoso.com/john/xxx
Regards,
Iker
- Julien_MarpaultNov 12, 2021Copper ContributorHello,
Cascading parameter is a good idea, I’ll take a look.
I want to do that because I’m remastering an old MVC app which is is based on sub domains. If possible I would prefer to keep same routes.
Thanks.