Base solution for your next web application

Activities of "OriAssurant"

I am noticing that it takes upwards of 1 min to load all of the symbols and libraries needed on the MVC + Angular app. (Downloaded in the past month, in terms of version)

Is that standard behavior?

I have the following classes and I am trying to implement Dependency Injection into calling a WCF Service. IUserProxyService : IApplicationService

CreateUser(User user)

UserProxyService : IUserProxyService
        private IUserRepository repository;

        public UserProxyService()
        {          
        }

        public UserProxyService(IUserRepository _repository)
        {
            repository = _repository;
        }

      CreateUser()
     {repository.CreateUser(User);}

IUserRepository
     CreateUser()
  
UserRepository : IUserRepository
       public UserRepository()
        {
            proxy = new WCFServiceClient();
        }

      //for mocking
        public UserRepository(IWCFService_proxy)
        {
            proxy = _proxy;
        }

      CreateUser(User user)
    { proxy.CreateUser();}

Now, in UserAppService class in Authorisation.User(Application project). I am adding IUserProxyService as an additional parameter to my constructor. So that I can use that object to make createuser calls.

However, after doing this, when I load the Users section on the web application I am getting a javascript error:

_Header.js:74 Uncaught TypeError: Cannot read property 'app' of undefined at HTMLDocument.<anonymous> (_Header.js:74) at i (jquery.min.js:2) at Object.fireWith [as resolveWith] (jquery.min.js:2) at Function.ready (jquery.min.js:2) at HTMLDocument.K (jquery.min.js:2)

In Header.js: //Manage linked accounts var _userLinkService = abp.services.app.userLink; - erroring line

What am I doing wrong? Can you guide me in the right direction?

Yes, the error is abp.services.app cannot be loaded. However, I am not sure why does this happen only when I use IApplicationInterface

DEBUG 2018-01-08 10:32:24,478 [6 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is connected: {"ConnectionId":"ec33c09e-9270-4b28-bec3-e240676c583e","IpAddress":"::1","TenantId":2,"UserId":19,"ConnectTime":"2018-01-08T15:32:24.47856Z","Properties":{}} DEBUG 2018-01-08 10:32:24,681 [19 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is registered: ec33c09e-9270-4b28-bec3-e240676c583e DEBUG 2018-01-08 10:32:46,821 [27 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is disconnected: ec33c09e-9270-4b28-bec3-e240676c583e ERROR 2018-01-08 10:32:48,813 [21 ] nHandling.AbpApiExceptionFilterAttribute - Only one complex type allowed as argument to a web api controller action. But CreateUser contains more than one! Abp.AbpException: Only one complex type allowed as argument to a web api controller action. But CreateUser contains more than one! at Abp.WebApi.Controllers.Dynamic.Scripting.ActionScriptingHelper.GenerateBody(DynamicApiActionInfo actionInfo) at Abp.WebApi.Controllers.Dynamic.Scripting.jQuery.JQueryActionScriptGenerator.GenerateAjaxCallParameters() at Abp.WebApi.Controllers.Dynamic.Scripting.jQuery.JQueryActionScriptGenerator.GenerateMethod() at Abp.WebApi.Controllers.Dynamic.Scripting.jQuery.JQueryProxyGenerator.AppendMethod(StringBuilder script, DynamicApiControllerInfo controllerInfo, DynamicApiActionInfo methodInfo) at Abp.WebApi.Controllers.Dynamic.Scripting.jQuery.JQueryProxyGenerator.Generate() at Abp.WebApi.Controllers.Dynamic.Scripting.ScriptProxyManager.GetAllScript(ProxyScriptType type) at Abp.WebApi.Controllers.Dynamic.Scripting.AbpServiceProxiesController.GetAll(ProxyScriptType type) at lambda_method(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken) --- 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 System.Web.Http.Controllers.ApiControllerActionInvoker.

Question

Hi,

I am showing that the ASP.NET MVC & Angular Project is not getting great results on SonarQube:

Are the engineers watching quality analysis output when putting together this solution?

How can we expire a user's session while he is already in session and on the other end admin set his status to inactive?

Question

I want to seed some tenant related data when a Tenant is created.

This is where I think I should seed data : protected override void Seed(EntityFramework.MajesticDbContext context) { context.DisableAllFilters();

        context.EntityChangeEventHelper = NullEntityChangeEventHelper.Instance;
        context.EventBus = NullEventBus.Instance;

        if (Tenant == null)
        {
            //Host seed
            new InitialHostDbBuilder(context).Create();

            //Default tenant seed (in host database).
            new DefaultTenantBuilder(context).Create();
            new TenantRoleAndUserBuilder(context, 1).Create();
           
        }

else { //You can add seed for tenant databases using Tenant property... new InitialPeopleCreator(context).Create(); }

I need to call this class InitialPeopleCreator.cs in the else block, but this part of code is never called? How do I do this?

Answer

As far from my research in MultiTenantMigrateExecuterclass I found that, this else block will be called only when we configure "connectionString" for that Tenant in AbpTenants table. If that connection string is not null, then this else block is been called. Now my question here is, I set the connection string as "Server=localhost; Database=Majestic; Trusted_Connection=True;" (without quotes) in the table. But when I debug then I get this error: "System.FormatException: 'The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters. '" while trying to log the connection string using "Log.Write("Connection string : " + SimpleStringCipher.Instance.Decrypt(tenant.ConnectionString));"

Can you let me know what format of the connection string does it is looking for? I was using the samething that aspnetzero provides

For a tenancy I created, I updated the password complexity settings from Security tab in Administration section. But it does not seem to make a difference, when I create a new user with invalid password.

Is there anything else I need to change?

@ismcagdas If I want to incorporate this even in the create user screen. What would be the best approach?

Showing 1 to 10 of 147 entries