Base solution for your next web application

Activities of "enio"

Hi

I am using version 5.4.1 AspNetZeroAngular2 and would like to roll out the application on azure. Unfortunately the backend is not working once deployed to the azure app service. If I check out the log file I only see a lot of the following statements: Exception thrown: 'System.Data.SqlClient.SqlException' in System.Data.dll

...but not more information. Do you have an idea why there is no detailed information about the sql exception?

For a test I have started the backend localy and changed the password in the DB connection string to a non working value. And even in this case I can't see a clear information about the issue. So I guess that I miss some configuration option of the entityframework which filters out the details of the issue.

Thank you @ismcagdas! Indeed I forgot to look up the log file. For a while I was working with another application which logged every statement also to the console... now everything is clear again.

We are currently developing a distributed system with the help of nServiceBus. Now we would like to linke the back-backend-part of the system (which is processing the messages) with the entity framework part of asp.netzero. Therefore we referenced the asp.netzero Application project in our solution and make use of the Windsor DI container over the IocManager from Abp. However the entity framwork repositories are not registered in the container as we don't actually start the asp.netzero application.

Can you give us the direction where we should go?:

  • Is there a simple way to just register the entity framework repositories without starting the web.host project?
  • Or should we just copy the Web.Host project and start our back-backend-system within this context? Actually we would like to use as less as possible asp.netzero code in this part of our system.

Yes it is a console app. Thank you very much for pointing me the direction. Embedding our system in a custom module is what I have done already. Your second hint is new to me and exactly what I was looking for.

kind regards, marco

@maliming thank you for the hint with downgrading to ng 8.0.x. It is working now for me. But this can't be the solution for the long run.

Could you please post into this thread once there is a solution for higher angular versions?

I have enabled LDAP authentication in code and afterwards on the settings page.

When I try to login with a non existing AD-User or take a wrong password I get the correct not authorized error message. However if I use an existing AD-username and correct password I get the following exception:

ERROR 2019-07-24 17:24:18,800 [82 ] 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.AbpUser1.SetNormalizedNames() at Abp.Authorization.AbpLogInManager3.TryLoginFromExternalAuthenticationSources(String userNameOrEmailAddress, String plainPassword, TTenant tenant) at Abp.Authorization.AbpLogInManager3.LoginAsyncInternal(String userNameOrEmailAddress, String plainPassword, String tenancyName, Boolean shouldLockout) at Abp.Authorization.AbpLogInManager3.LoginAsync(String userNameOrEmailAddress, String plainPassword, String tenancyName, Boolean shouldLockout) at Abp.Threading.InternalAsyncHelper.AwaitTaskWithPostActionAndFinallyAndGetResult[T](Task1 actualReturnValue, Func1 postAction, Action`1 finalAction) at web_manager.Web.Controllers.TokenAuthController.GetLoginResultAsync(String usernameOrEmailAddress, String password, String tenancyName) in /home/vsts/work/1/s/src/web_manager.Web.Core/Controllers/TokenAuthController.cs:line 590 at web_manager.Web.Controllers.TokenAuthController.Authenticate(AuthenticateModel model) in /home/vsts/work/1/s/src/web_manager.Web.Core/Controllers/TokenAuthController.cs:line 112 at lambda_method(Closure , Object ) at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync() at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync() at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync() at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextExceptionFilterAsync()

Can you please point me the direction where I should search for a solution? As I get the exception message above only with correct login credentials I guess that ABP successfully communicated with the AD.

kind regards, marco

I found the answer elsewhere in the forum - our users in the ActiveDirectory don't have an email adress set:

https://support.aspnetzero.com/QA/Questions/6180#answer-2ce4d101-ea8a-5387-f188-39eade0e077c

AND

https://support.aspnetzero.com/QA/Questions/3121#answer-2c69c3d0-fab5-479a-8189-01157bfbaa5d

My understanding of the ^8.0.0 pattern is that npm/yarn will install the latest version with 8.x.x. Therefore in my scenario the problem suddenly occured when angular has published version 8.1. So my build automatically switched to 8.1. My solution was simple - I have just changed all angular related entries in package.json from ^8.0.0 to ~8.0.0. In my opinion this pattern represents 8.0.x - therefore the angular version was nailed down to 8.0 and not switching to the problematic 8.1 version.

As stated in the this issue we do have the possibility to pass custom values to the initial GetAll by providing an implementation of ICustomConfigProvider. My question is how can I load some data from the database within such an implementation? Obviously DI is not working at this part of the application :-(

In order to update an entity object including child object properties we have created a custom repository and are using the Update-Method directly on the EF-Context. But when we update the entities like this we don't have any entries in the AbpEntityPropertyChanges table. However we do have a new entry in AbpEntityChanges. Is there a simple way to fix this issue or is is meanwhile fixed - we are on version 6.7 from last february.

Do we have to implement IEntityHistoryStore in our custom repository - if yes could you please provide a simple example?

Showing 1 to 10 of 24 entries