Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "sayas"

Question

Hi, I've purchased ASPNetZero just before a couple of days. Now I would like to add some PlugIn Modules to my project. Can you please give me a sample project which implements the PlugIn Modules??

Hi,

I need to develop an application which is having a single instance - single database & multiple database at same time. ie, I'm planning to use a single database for all my small clients and will be having multiple databases for the premium clients. But there will be only single instance of the software.

Is that possible? What's your opinion??

Hi dears,

I want to implement a multi-select list to save an Institution-Course Mapping.

I've produced a ComboBox to select an institution and a Multi-Select List for selecting some courses for the selected institution.

I've made it by creating a ViewModel of both the Institution & Course entities. The ViewModel contains of the ListResultDto's of each entities.

My question is, how can i get the selected values of the multiselect list and save it to the database? Should I use a controller actionmethode or the JavaScript API Itself?? Will be appreciable if you share some sample codes please.. thanks!!

Hi,

I've created multi-tenant application to manage some institutions. My requirement is - whenever I create a new tenant, an institution should be created automatically. I've created a master for adding the institutions too. And that's working fine.

But when adding a new tenant, an error is occurred at the point of creating a new tenant. The error message shown in the browser was only 'An Internal Error Occurred'. But I got the 'UserId not found' error from the log.

I've given the permissions as well. Following is my code:

Institute Entity

[Table("AbpInstitutions")]
    public class Institution : FullAuditedEntity,IMustHaveTenant
    {
        public int TenantId { get; set; }
        
        [Required]
        [StringLength(50)]
        public string Name { get; set; }

        [StringLength(250)]
        public string Details { get; set; }

        [StringLength(50)]
        public string Caption { get; set; }

        [StringLength(250)]
        public string Logo { get; set; }

        //public ICollection<InstitutionCourseMapping> InstitutionCourseMappings { get; set; }

        public static Institution CreateInstitutionForNewTenant(string tenantName)
        {
            return new Institution
            {    
                Name = tenantName,
                Caption=tenantName,
                Details= "Institution Created by default for Tenant - " + tenantName,
                Logo=""
            };
        }
    }

InstitutionAppService

[AbpAuthorize(PermissionNames.Pages_Institution)]

 public async Task CreateInstitution(Institution input)
        {
            //var institution = input;
            try
            {
                await _institutionRepository.InsertAsync(input);
            }
            catch (Exception ex)
            {
                Trace.Write(ex.Message);
                throw;
            }
        }

TenantAppService

//Create a Default Institute for the new Tenant
                var defaultInstitution = Institution.CreateInstitutionForNewTenant(tenant.Name);
                await _institutionAppService.CreateInstitution(defaultInstitution);

SmartCampusAuthorizationProvider

var instiuionMaster = pages.CreateChildPermission(PermissionNames.Pages_Institution, L("Manage Institutions"), multiTenancySides: MultiTenancySides.Host);

Stack Trace (Got it from [AbpAuditLogs] )

System.InvalidOperationException: UserId not found.     at Microsoft.AspNet.Identity.UserManager`2.&lt;GetRolesAsync&gt;d__ac.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.Users.AbpUserManager`2.<>c__DisplayClass63_0.<<GetUserPermissionCacheItemAsync>b__0>d.MoveNext() in D:\Halil\GitHub\module-zero\src\Abp.Zero\Authorization\Users\AbpUserManager.cs:line 641  --- 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.Runtime.Caching.CacheExtensions.<>c__DisplayClass5_0`2.&lt;&lt;GetAsync&gt;b__0>d.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Runtime\Caching\CacheExtensions.cs:line 0  --- 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.Runtime.Caching.CacheBase.&lt;GetAsync&gt;d__15.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Runtime\Caching\CacheBase.cs:line 69  --- 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.Runtime.Caching.CacheExtensions.&lt;GetAsync&gt;d__5`2.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Runtime\Caching\CacheExtensions.cs:line 38  --- End of stack trace from previous location where exception was thrown ---     at System.Runtime.CompilerServices.TaskA...

Somebody please help me out.. I'm Stuck here....

Showing 1 to 4 of 4 entries