Base solution for your next web application

Activities of "OriAssurant"

Hi,

When we were using the SPA (MVC & jQuery) we had access to a WebAPI Controller.

When we migrated (mostly everything) to SPA solution, everything works and builds, except now we can't hit the custom controller we built in the WebAPI proj.

This is the error from hitting the Controller w/valid input: {"message":"An error has occurred."}

Here is what it looks like, more or less:

public class nameOfController : MajesticApiControllerBase
    {
        public nameOfController()
        {
        }

        [HttpGet, ActionName("CheckIfSIM")]
        public IHttpActionResult nameOfController(string value)
        {
        }
}

I also want to mention that it vanished from Swagger.

Thanks for the help.

Hi, Not able to route between cshtml pages within the same Dashboard Tab both having same permissions. I tried to put an url for my page in the app.js as well with same permission and Also added a value in the Navigations- PageName class. But its not working

if (abp.auth.hasPermission('Pages.Tenant.Dashboard')) { $urlRouterProvider.otherwise("/tenant/dashboard"); //Entrance page for a tenant $stateProvider.state('tenant.dashboard', { url: '/dashboard', templateUrl: '~/App/tenant/views/dashboard/index.cshtml' }); }

    if (abp.auth.hasPermission('Pages.Tenant.Dashboard')) {
     $urlRouterProvider.otherwise("/tenant/isvalidsim"); //Entrance page for a tenant
       $stateProvider.state('tenant.isvalidsim', {
         url: '/isvalimsim',
       templateUrl: '~/App/tenant/views/dashboard/isvalidsim.cshtml'
           
       });
    }

This is going to be similar to a partial page ajax rendering . Can you please send me a sample code i can look at ? Also is there a reason why you are using angularjs version 1.6.6 and not angular version 4 and above on the mvc-angularjs project.

I am trying to implement my own AbpUser and AbpUserBase classes instead of using one of the Abp's. I am creating the same classes(AbpUser ,AbpUserBase ) in my application as I need to customize it as per my requirement for User.cs class which implements AbpUser<User>.

But I came across this issue across multiple classes that passes <User> like for example:

public class RoleManager : AbpRoleManager<Role, User>
    {
        public RoleManager(
            RoleStore store,
            IPermissionManager permissionManager,
            IRoleManagementConfig roleManagementConfig,
            ICacheManager cacheManager,
            IUnitOfWorkManager unitOfWorkManager)
            : base(
                store,
                permissionManager,
                roleManagementConfig,
                cacheManager,
                unitOfWorkManager)
        {

        }
    }

I am getting errors like

The type 'Project.project.Authorisations.Users.User' cannot be used as a Type parameter 'TUser' in the generic type or method AbpRoleManager<Role, User>. There is no implicit reference conversion from 'Project.project.Authorisations.Users.User' to 'Abp.Authorisation.Users.AbpUser<Project.project.Authorisations.Users.User>'.

How to resolve this issue?

Answer

So in using OU's, how would we prevent cross OU members from seeing each other's data? You're not suggesting modifying every controller output's LINQ statement, are you?

Answer

Can you point me to the documentation about "UserGroups"? I only see Org. Units...

I am consuming a WCF Service in .Application project. To achieve the same, I have specified system.serviceModel configuration in app.config(.Application project) and Web.config(.Web project)

Now, I want to remove the syste.serviceModel from the config and be able to derive endpoint from the database leveraging settings.

I did the following:

  1. Remove system.serviceModel from App.config
  2. Place the below code in Preinitialise method of MajesticApplicationModule: String baseAddress = "This will come from SettingManager"; BasicHttpBinding binding = new BasicHttpBinding(); using (ServiceHost host = new ServiceHost(typeof(ServiceClient))) { host.AddServiceEndpoint(typeof(IService), binding, baseAddress); }
  3. Remove system.serviceModel from Web.config
  4. Place the code from step 2 in Preinitialize method of MajesticWebModule

After making these changes, I am getting the below error:

Could not find default endpoint element that references contract 'UserService.IOktaService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

Is there something I am missing? Please point me in the right direction.

Question

How can we achieve User Groups (OU?) with scope only within the group? For example:

Tenant 1

  • (Store#1)

    • User 1
    • User 2
  • (Store#2) - User 3

    • User 4
  • (Store#3) - User 3

    • User 5

We would like to have Store#2, Store#3 be within the same scope (Group?), without sharing information (data) with Store#1.

After observing the behavior of OU's, it is a logical grouping but not scoped w/Privacy.

Thoughts?

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

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?

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

Showing 131 to 140 of 147 entries