Activities of "MahmoudA"

Answer

I solved it by return Task.FromResult<IActionResult>(Redirect("~/Account/Login")); when i not authorized Big Thanks .

Answer

when i not authrized , i want to go to login page not home ? i means i don't want home page to show

Answer

hi

You can redirect the user in Index page.

public class IndexModel : MyProjectNamePageModel 
{ 
    public Task<IActionResult> OnGetAsync() 
    { 
        if (CurrentUser.IsAuthenticated) 
        { 
            if (CurrentUser.TenantId == null) 
            { 
                return Task.FromResult<IActionResult>(Redirect("~/Dashboard")); 
            } 
            else 
            { 
                return Task.FromResult<IActionResult>(Redirect("~/HostDashboard")); 
            } 
        } 
 
        return Task.FromResult<IActionResult>(Page()); 
    } 
} 
 

Thank you for your solution. it works with me after change the condition (CurrentUser.TenantId == null) to (CurrentUser.TenantId != null)

hi

This demo has been tested by many developer. How do you run it? What steps are not working?

hi No exception appear. Can u tell me the steps to configure subdomain to use it in local or azure ?

hi

Is the demo works on your localhost?

https://github.com/abpframework/abp-samples/tree/master/DomainTenantResolver

no, not

and i want it to work in development environment (localhost) and production environment (azure)

hi MahmoudA

Can you share the details of what you tried?

Are there any error logs?

hi maliming i want to read tenant that host created from url like i described in issue details

Hi,

Please send email to me. shiwei.liang@volosoft.com

I sent to you an email

Hi,

We have an exmaple for DomainTenantResolver, you can check it first: https://github.com/abpframework/abp-samples/tree/master/DomainTenantResolver

If this not help, I check it remotely. shiwei.liang@volosoft.com

Hi liangshiwei I already check on this sample but it is not useful

Please let me know the time of remotely session. Thanks for help

Mahmoud

It seems your ABP Commercial NuGet Source added with wrong url. (it should be nuget.abp.io not nugut.abp.io)

Please run the dotnet nuget remove source "ABP Commercial NuGet Source" on your terminal and then run the following command dotnet tool install -g Volo.Abp.Suite --add-source https://nuget.abp.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/v3/index.json --version 4.4.2.

change the xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx part with your api-key

thanks. It's work

Showing 1 to 10 of 16 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35