Base solution for your next web application

Activities of "michelmk2"

Hi,

Is it possible to switch language when inside a controller action page, so lets so http://localhost/app/assignment/details?id=5. When I switch language it redirects me to http://localhost/app/assignment/details without the Id param, which isn't valid obviously.

Thanks!

Answer

Where are you loading your javascript? Are you loading your javascript file on the index (Titulos pagar) page?

Fixed by applying https://github.com/aspnetzero/aspnet-zero-core/issues/1609!

I still have this issue. I just sent you a sample project again in which you can see what goes wrong. The email is from [email protected].

Thanks,

Bart

@luqc1985 Does switching back to the host (using the "Back to my account" button) from any other tenants works too?

Actually fixed it. The application URL changed in IIS, so what happened was that on impersonated login the url went from http://a.blabla to http://b.blabla. Which works on most browsers but not on Safari.

I'm getting an error when using the impersonate login feature from the host to a tenant.

When I log in to the host environment, login to a tenant through the impersonation function, I recieve the following error:

System.Exception: Current tenant is different than given tenant. AbpSession.TenantId: , given tenantId: 37 at Robin.Authorization.Impersonation.ImpersonationManager.CheckCurrentTenant(Nullable1 tenantId) at Robin.Authorization.Impersonation.ImpersonationManager.d__8.MoveNext()

--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Robin.Web.Controllers.AccountController.d__51.MoveNext()

--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.Threading.InternalAsyncHelper.d__51.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at lambda_method(Closure , Object ) at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult() at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.TaskOfActionResultExecutor.<Execute>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__12.MoveNext() --- End of stack trace from previous

<br> This problem only occurs on macOS devices with the Safari browser. Anyone got a clue why this is happening, and how we may fix this?

Version: Asp.Net Core MVC version v5.2.0 but we updated all the packages to the latest version a few weeks ago.

Device: Macbook Pro macOS High Sierra. Safari version 12.0

Thanks!!

<cite>ismcagdas: </cite> @michelmk2 this is strange. UserLinkManager class is craeted via dependency injection, so UserManager on it also created via DI.

I couldn't understand why UserManager is null when switching back to host.

If this is a repeatable problem on your project, could you share your project via email ?

Thanks, I will somewhere next week!

<cite>ismcagdas: </cite> In that case, you need to do something like this <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/1608#issuecomment-418185262">https://github.com/aspnetzero/aspnet-ze ... -418185262</a> and use it like this <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/1608#issuecomment-418211767">https://github.com/aspnetzero/aspnet-ze ... -418211767</a>.

If you follow that approach, you can reserve a keyword (host for example) for the host website.

Would I add those things in the *.web.mvc project or in the *.web.host project?

Thanks!

EDIT: Okay so the domainresolver works. When I log go to host.{domain}.com, I can login to the host environment. Still when you use linked accounts to switch to {subdomain}.{domain} and then back to {host}.{domain}, you will recieve an error:

System.ArgumentNullException: Value cannot be null.
Parameter name: user
   at Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory`1.&lt;CreateAsync&gt;d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Abp.Authorization.AbpUserClaimsPrincipalFactory`2.<CreateAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Abp.Threading.InternalAsyncHelper.<AwaitTaskWithPostActionAndFinallyAndGetResult>d__5`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Robin.Authorization.Users.UserLinkManager.&lt;GetSwitchedUserAndIdentity&gt;d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Robin.Web.Controllers.AccountController.&lt;SwitchToLinkedAccountSignIn&gt;d__55.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Abp.Threading.InternalAsyncHelper.&lt;AwaitTaskWithPostActionAndFinallyAndGetResult&gt;d__5`1.MoveNext()
--- End of stack trace from previous ...

<cite>alper: </cite>

<cite>aamoretti: </cite> Please set me as well. Thank you.

done for you @aamoretti

Can you reset my permissions as well? THanks!

Showing 1 to 10 of 30 entries