I understand i need to use clientVisibilityProvider, but can i have an example please?
Got it
I think I know why, because AD integration requires user to have an email address. After I assigned an email address to the AD user, i can log in and created an user in my Zero app now.
INFO 2020-10-14 16:12:19,442 [37 ] c.Infrastructure.ControllerActionInvoker - Route matched with {action = "Authenticate", controller = "TokenAuth", area = ""}. Executing controller action with signature System.Threading.Tasks.Task1[FinesseNx.Web.Models.TokenAuth.AuthenticateResultModel] Authenticate(FinesseNx.Web.Models.TokenAuth.AuthenticateModel) on controller FinesseNx.Web.Controllers.TokenAuthController (FinesseNx.Web.Core). ERROR 2020-10-14 16:12:26,090 [4 ] Mvc.ExceptionHandling.AbpExceptionFilter - Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object. at Abp.Authorization.Users.AbpUser
1.SetNormalizedNames()
at Abp.Authorization.AbpLogInManager3.TryLoginFromExternalAuthenticationSourcesAsync(String userNameOrEmailAddress, String plainPassword, TTenant tenant) at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) at Abp.Authorization.AbpLogInManager
3.LoginAsyncInternal(String userNameOrEmailAddress, String plainPassword, String tenancyName, Boolean shouldLockout)
at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation)
at Abp.Authorization.AbpLogInManager3.LoginAsync(String userNameOrEmailAddress, String plainPassword, String tenancyName, Boolean shouldLockout) at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) at FinesseNx.Web.Controllers.TokenAuthController.GetLoginResultAsync(String usernameOrEmailAddress, String password, String tenancyName) in C:\Web Dev\FinesseNx-Main\aspnet-core\src\FinesseNx.Web.Core\Controllers\TokenAuthController.cs:line 649 at FinesseNx.Web.Controllers.TokenAuthController.Authenticate(AuthenticateModel model) in C:\Web Dev\FinesseNx-Main\aspnet-core\src\FinesseNx.Web.Core\Controllers\TokenAuthController.cs:line 138 at lambda_method(Closure , Object ) at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult() at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask
1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.In
Hi,
I later figured out that in the one solution template, there is no HomeController. There is a HomeController in seperate solutions template.
In the HomeController, the Index has redirection to swagger. public IActionResult Index() { return Redirect("/swagger");
}
Hi,
This is what I have in the Startup.cs file.
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) { app.UseAbp(options => { options.UseAbpRequestLocalization = false; }); // Initializes ABP framework.
app.UseCors(_defaultCorsPolicyName); // Enable CORS!
//======= added the following line to run angular and .net core in single Site
app.Use(async (context, next) => { await next();
if (context.Response.StatusCode == 404 && !Path.HasExtension(context.Request.Path.Value) && !context.Request.Path.Value.StartsWith("/api/services", StringComparison.InvariantCultureIgnoreCase)) { context.Request.Path = "/index.html"; await next(); } });
// ==============
app.UseStaticFiles();
app.UseRouting();
app.UseAuthentication();
app.UseAbpRequestLocalization();
Hi,
I followed your suggestion making changes to the start.cs. But it always shows the swagger index.html. I then manually enter
localhost\index.html, i can get the login screen, then i got a bad request when i tried to login. It failed on /api/TokenAuth/Authenticate
Please advise thanks Laurie
Yes, tried it. It works
Hi I am facing the similar issue. I got my certificatte set up on both Client (angular)and Server(Core API). The CorsOrigins setting in appsetting.json is using ip address, if my certificate is signed to www.rtime.com.au and my accessing url will be www.myco.com.au:4432 to my anguar client, do i then change the CorsOrigins to the www.myco.com.au, like
"App": { "ServerRootAddress": "https://www.myco.com.au:4439/", "ClientRootAddress": "https://www.myco.com.au:4432/", "CorsOrigins": "https://www.myco.com.au:4432" },
thanks
Laurie
that looks like what i need. Thanks