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!!
13 Answer(s)
-
0
Are you using Abp or AbpZero?
-
0
Now I'm using ABP. But, after making a simple application successfully in Abp, I'll move on to AbpZero. Can you please help me on this?
-
0
I suggest you to user js api to get list of items and send to the server via ajax.
-
0
Hi Halil,
Thank you for your reply. Can you please share me a sample code for doing the same? Any help will be highly appreciated! Thanks!!
-
0
Hi,
You can get the multiselect's value like this. $('#multipleSelect').val() which will give you an array of selected values.
If you want to call a controller action, you can simply use jQuery's ajax or ABP's ajax calls.
abp.ajax({ url: '/Controller/Action', method: 'POST', dataType:'application/json', data: JSON.stringify({selectedValues: $('#multipleSelect').val()}) }).done(function(){ //do something here... })
-
0
Hai..
Thanks for your kind help. I got the values of select list & multiselect list using the $('#multipleSelect').val()
And sent the collected data using abp.services. Because i've written the code for inserting the data in AppServices.
But now i'm in trouble with another issue. That is , I'm using the 'InserAsync' function of 'IRepository' interface in the AppService. I've coded to set an instance of the repository in the AppService Constructor. But that constructor is not getting initiated. So that, an error is occurred at the point of inserting the data. If the IRepository instance is initiated, then I'm done.
I'll show you my code.
AppService
public class InstitutionCourseMappingAppService : SmartCampusAppServiceBase, IInstitutionCourseMappingAppService { public readonly IRepository<InstitutionCourseMapping,int> _institutionCourseMappingRepository; public InstitutionCourseMappingAppService() { } public InstitutionCourseMappingAppService(IRepository<InstitutionCourseMapping,int> institutionCourseMappingRepository) { _institutionCourseMappingRepository = institutionCourseMappingRepository; } public async Task MapCourses(string institutionId, string[] courses) { try { foreach (string courseId in courses) { InstitutionCourseMapping mapp = new InstitutionCourseMapping(); mapp.InstitutionId = Convert.ToInt32(institutionId); mapp.CourseId = Convert.ToInt32(courseId); await _institutionCourseMappingRepository.InsertAsync(mapp); // Issue is happening here(Error: _institutionCourseMappingRepository is null) } } catch (Exception ex) { Trace.Write(ex.Message); throw; } } }
JS
(function() { $(function () { var _$form = $('#mapcoursesForm'); _$form.validate(); _$form.find('button[type="submit"]').click(function(e) { e.preventDefault(); if (!_$form.valid()) { return; } var institution= $('#institution').val(); var selectedCourses = $('#courses').val(); if (selectedCourses == null || selectedCourses == '') { swal("No Courses were Selected", "Please select any of the courses!", "warning"); return false; } else { abp.ui.setBusy(_$form); var _institutionService = abp.services.app.institutionCourseMapping; // after this next line, it's directly going to the mapCourses methode. Not to the constructor :( _institutionService.mapCourses(institution,selectedCourses).done(function (e) { swal("Success", "Courses and institutions were mapped successfully!", "Success"); location.reload(true); //reload page }).always(function () { abp.ui.clearBusy(_$form); }); } }); }); })();
How can we make it possible?
-
0
Hi,
Can you delete the parameterless constructor of InstitutionCourseMappingAppService and try again ?
public InstitutionCourseMappingAppService() { }
-
0
Yeah.. I've tried that too.. When deleting the parameterless constructor, even the code doesn't coming to the method 'MapCourses'. And it says 'An internal Server error occurred!', but no exceptions were found in the AbpAuditLogs table.
But when using the 2 constructors together, the same problem exists - it directly comes to the method. Now I'm Stuck!!
-
0
There must be detailed logs in Logs.txt file under your web project. Can you send error details in that file ? And try without parameterless constructor. It should not be necessary.
-
0
Hi,
I've tried again with and without using the parameterless constructor. But the issue remains the same.
I've tried to attach the Log File here.. But your forum does not allow me to do so. So I'm pasting here the text from the log file.
DEBUG 2016-11-04 10:58:59,080 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'SmartCampus.InstitutionCourseMappings.IInstitutionCourseMappingAppService' with service name 'app/institutionCourseMapping'. DEBUG 2016-11-04 10:58:59,112 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'SmartCampus.Courses.ICourseAppService' with service name 'app/course'. WARN 2016-11-04 10:59:03,010 [6 ] Abp.Logging.LogHelper - Abp.Authorization.AbpAuthorizationException: Current user did not login to the application! at Abp.Authorization.AuthorizationHelper.<AuthorizeAsync>d__19.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Authorization\AuthorizationHelper.cs:line 42 --- 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.AuthorizationHelper.<CheckPermissions>d__22.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Authorization\AuthorizationHelper.cs:line 100 --- 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.AuthorizationHelper.<AuthorizeAsync>d__20.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Authorization\AuthorizationHelper.cs:line 67 --- 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 Nito.AsyncEx.AsyncContext.<>c__DisplayClass3.<Run>b__1(Task t) at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- 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 Nito.AsyncEx.AsyncContext.Run(Func`1 action) at Abp.Authorization.AuthorizationHelperExtensions.Authorize(IAuthorizationHelper authorizationHelper, MethodInfo methodInfo) in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Authorization\AuthorizationHelperExtensions.cs:line 27 at Abp.Web.Mvc.Authorization.AbpMvcAuthorizeFilter.OnAuthorization(AuthorizationContext filterContext) in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Mvc\Web\Mvc\Authorization\AbpMvcAuthorizeFilter.cs:line 42 Abp.Authorization.AbpAuthorizationException: Current user did not login to the application! at Abp.Authorization.AuthorizationHelper.<AuthorizeAsync>d__19.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Authorization\AuthorizationHelper.cs:line 42 --- 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.AuthorizationHelper.<CheckPermissions>d__22.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Authorization\AuthorizationHelper.cs:line 100 --- 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.AuthorizationHelper.<AuthorizeAsync>d__20.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Authorization\AuthorizationHelper.cs:line 67 --- 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 Nito.AsyncEx.AsyncContext.<>c__DisplayClass3.<Run>b__1(Task t) at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- 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 Nito.AsyncEx.AsyncContext.Run(Func`1 action) at Abp.Authorization.AuthorizationHelperExtensions.Authorize(IAuthorizationHelper authorizationHelper, MethodInfo methodInfo) in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Authorization\AuthorizationHelperExtensions.cs:line 27 at Abp.Web.Mvc.Authorization.AbpMvcAuthorizeFilter.OnAuthorization(AuthorizationContext filterContext) in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Mvc\Web\Mvc\Authorization\AbpMvcAuthorizeFilter.cs:line 42 DEBUG 2016-11-04 10:59:10,370 [10 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is connected: {"ConnectionId":"ab601690-8e8a-4a0a-8892-ca0941c9aef8","IpAddress":"::1","TenantId":null,"UserId":null,"ConnectTime":"2016-11-04T10:59:10.3609726+05:30","Properties":{}} DEBUG 2016-11-04 10:59:10,800 [6 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is registered: ab601690-8e8a-4a0a-8892-ca0941c9aef8 DEBUG 2016-11-04 11:06:06,612 [28 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is connected: {"ConnectionId":"cd9e9de3-163f-4f44-9957-e29a2769c7e4","IpAddress":"::1","TenantId":null,"UserId":1,"ConnectTime":"2016-11-04T11:06:06.6110182+05:30","Properties":{}} DEBUG 2016-11-04 11:06:06,625 [28 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is registered: cd9e9de3-163f-4f44-9957-e29a2769c7e4 DEBUG 2016-11-04 11:06:09,902 [26 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is disconnected: cd9e9de3-163f-4f44-9957-e29a2769c7e4 DEBUG 2016-11-04 11:06:10,191 [29 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is connected: {"ConnectionId":"2a11d938-bcbf-45d5-9f56-37b15be7592f","IpAddress":"::1","TenantId":null,"UserId":1,"ConnectTime":"2016-11-04T11:06:10.1906595+05:30","Properties":{}} DEBUG 2016-11-04 11:06:10,204 [26 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is registered: 2a11d938-bcbf-45d5-9f56-37b15be7592f DEBUG 2016-11-04 11:06:40,358 [25 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is disconnected: ab601690-8e8a-4a0a-8892-ca0941c9aef8 DEBUG 2016-11-04 11:10:29,265 [1 ] Abp.Modules.AbpModuleManager - Loading Abp modules... DEBUG 2016-11-04 11:10:29,281 [1 ] Abp.Modules.AbpModuleManager - Found 15 ABP modules in total. DEBUG 2016-11-04 11:10:29,288 [1 ] Abp.Modules.AbpModuleManager - Loaded module: SmartCampus.Web.SmartCampusWebModule, SmartCampus.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:10:29,290 [1 ] Abp.Modules.AbpModuleManager - Loaded module: SmartCampus.SmartCampusDataModule, SmartCampus.EntityFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:10:29,290 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.EntityFramework.AbpZeroEntityFrameworkModule, Abp.Zero.EntityFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:10:29,291 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.AbpZeroCoreModule, Abp.Zero, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:10:29,291 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AbpKernelModule, Abp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:10:29,291 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.EntityFramework.AbpEntityFrameworkModule, Abp.EntityFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:10:29,291 [1 ] Abp.Modules.AbpModuleManager - Loaded module: SmartCampus.SmartCampusCoreModule, SmartCampus.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:10:29,292 [1 ] Abp.Modules.AbpModuleManager - Loaded module: SmartCampus.SmartCampusApplicationModule, SmartCampus.Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:10:29,292 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AutoMapper.AbpAutoMapperModule, Abp.AutoMapper, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:10:29,292 [1 ] Abp.Modules.AbpModuleManager - Loaded module: SmartCampus.Api.SmartCampusWebApiModule, SmartCampus.WebApi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:10:29,292 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.WebApi.AbpWebApiModule, Abp.Web.Api, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:10:29,292 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.AbpWebModule, Abp.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:10:29,292 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.AbpWebCommonModule, Abp.Web.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:10:29,292 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.SignalR.AbpWebSignalRModule, Abp.Web.SignalR, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:10:29,293 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.Mvc.AbpWebMvcModule, Abp.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:10:29,295 [1 ] Abp.Modules.AbpModuleManager - 15 modules loaded. DEBUG 2016-11-04 11:10:29,477 [1 ] o.Configuration.LanguageManagementConfig - Converted Abp (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2016-11-04 11:10:29,477 [1 ] o.Configuration.LanguageManagementConfig - Converted AbpZero (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2016-11-04 11:10:29,477 [1 ] o.Configuration.LanguageManagementConfig - Converted SmartCampus (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2016-11-04 11:10:29,477 [1 ] o.Configuration.LanguageManagementConfig - Converted AbpWeb (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2016-11-04 11:10:29,852 [1 ] EntityFramework.AbpEntityFrameworkModule - Registering DbContext: SmartCampus.EntityFramework.SmartCampusDbContext, SmartCampus.EntityFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:10:31,093 [1 ] Abp.Localization.LocalizationManager - Initializing 4 localization sources. DEBUG 2016-11-04 11:10:31,100 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: Abp DEBUG 2016-11-04 11:10:31,102 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: AbpZero DEBUG 2016-11-04 11:10:31,104 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: SmartCampus DEBUG 2016-11-04 11:10:31,105 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: AbpWeb DEBUG 2016-11-04 11:10:31,207 [1 ] Abp.BackgroundJobs.BackgroundJobManager - Start background worker: Abp.BackgroundJobs.BackgroundJobManager DEBUG 2016-11-04 11:10:31,442 [1 ] Abp.AutoMapper.AbpAutoMapperModule - Found 9 classes define auto mapping attributes DEBUG 2016-11-04 11:10:31,442 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SmartCampus.Web.Models.Account.TenantSelectionViewModel+TenantInfo DEBUG 2016-11-04 11:10:31,446 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SmartCampus.Sessions.Dto.TenantLoginInfoDto DEBUG 2016-11-04 11:10:31,446 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SmartCampus.Sessions.Dto.UserLoginInfoDto DEBUG 2016-11-04 11:10:31,446 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SmartCampus.Users.Dto.CreateUserInput DEBUG 2016-11-04 11:10:31,446 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SmartCampus.Users.Dto.UserListDto DEBUG 2016-11-04 11:10:31,446 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SmartCampus.MultiTenancy.Dto.CreateTenantInput DEBUG 2016-11-04 11:10:31,447 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SmartCampus.MultiTenancy.Dto.TenantListDto DEBUG 2016-11-04 11:10:31,447 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SmartCampus.Institutions.Dto.InstitutionListDto DEBUG 2016-11-04 11:10:31,447 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SmartCampus.Courses.Dto.CoursesListDto DEBUG 2016-11-04 11:10:33,331 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'SmartCampus.Sessions.ISessionAppService' with service name 'app/session'. DEBUG 2016-11-04 11:10:33,332 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'SmartCampus.Users.IUserAppService' with service name 'app/user'. DEBUG 2016-11-04 11:10:33,333 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'SmartCampus.Roles.IRoleAppService' with service name 'app/role'. DEBUG 2016-11-04 11:10:33,334 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'SmartCampus.MultiTenancy.ITenantAppService' with service name 'app/tenant'. DEBUG 2016-11-04 11:10:33,335 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'SmartCampus.Institutions.IInstitutionAppService' with service name 'app/institution'. DEBUG 2016-11-04 11:10:33,337 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'SmartCampus.InstitutionCourseMappings.IInstitutionCourseMappingAppService' with service name 'app/institutionCourseMapping'. DEBUG 2016-11-04 11:10:33,338 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'SmartCampus.Courses.ICourseAppService' with service name 'app/course'. DEBUG 2016-11-04 11:10:33,986 [8 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is connected (on reconnected event): {"ConnectionId":"2a11d938-bcbf-45d5-9f56-37b15be7592f","IpAddress":"::1","TenantId":null,"UserId":1,"ConnectTime":"2016-11-04T11:10:33.925982+05:30","Properties":{}} DEBUG 2016-11-04 11:10:38,509 [8 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is disconnected: 2a11d938-bcbf-45d5-9f56-37b15be7592f DEBUG 2016-11-04 11:10:40,569 [6 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is connected: {"ConnectionId":"139a4c9d-65cb-4eea-b9ae-fb8b1adbe020","IpAddress":"::1","TenantId":null,"UserId":1,"ConnectTime":"2016-11-04T11:10:40.5683735+05:30","Properties":{}} DEBUG 2016-11-04 11:10:40,606 [6 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is registered: 139a4c9d-65cb-4eea-b9ae-fb8b1adbe020 DEBUG 2016-11-04 11:10:43,165 [6 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is disconnected: 139a4c9d-65cb-4eea-b9ae-fb8b1adbe020 DEBUG 2016-11-04 11:10:43,487 [9 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is connected: {"ConnectionId":"55778023-367d-42f4-ad67-914595786be9","IpAddress":"::1","TenantId":null,"UserId":1,"ConnectTime":"2016-11-04T11:10:43.4877902+05:30","Properties":{}} DEBUG 2016-11-04 11:10:43,495 [9 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is registered: 55778023-367d-42f4-ad67-914595786be9 ERROR 2016-11-04 11:11:02,584 [9 ] nHandling.AbpApiExceptionFilterAttribute - Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object. at SmartCampus.InstitutionCourseMappings.InstitutionCourseMappingAppService.<MapCourses>d__3.MoveNext() in E:\Working Folder\WebProjects\SmartCampus\SmartCampus.Application\InstitutionCourseMappings\InstitutionCourseMappingAppService.cs:line 42 --- 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.Threading.InternalAsyncHelper.<AwaitTaskWithPostActionAndFinally>d__1.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Threading\InternalAsyncHelper.cs:line 40 --- 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.Threading.InternalAsyncHelper.<AwaitTaskWithFinally>d__0.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Threading\InternalAsyncHelper.cs:line 20 --- 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.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__0.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 System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.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.WebApi.Uow.AbpApiUowFilter.<ExecuteActionFilterAsync>d__5.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Uow\AbpApiUowFilter.cs:line 40 --- 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.WebApi.Validation.AbpApiValidationFilter.<ExecuteActionFilterAsync>d__5.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Validation\AbpApiValidationFilter.cs:line 40 --- 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.WebApi.Auditing.AbpApiAuditFilter.<ExecuteActionFilterAsync>d__4.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Auditing\AbpApiAuditFilter.cs:line 30 --- 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.ActionFilterResult.<ExecuteAsync>d__2.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.WebApi.Security.AntiForgery.AbpAntiForgeryApiFilter.<ExecuteAuthorizationFilterAsync>d__10.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Security\AntiForgery\AbpAntiForgeryApiFilter.cs:line 59 --- 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.WebApi.Authorization.AbpApiAuthorizeFilter.<ExecuteAuthorizationFilterAsync>d__7.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Api\WebApi\Authorization\AbpApiAuthorizeFilter.cs:line 55 --- 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.AuthenticationFilterResult.<ExecuteAsync>d__0.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 System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext() DEBUG 2016-11-04 11:12:28,797 [1 ] Abp.Modules.AbpModuleManager - Loading Abp modules... DEBUG 2016-11-04 11:12:28,813 [1 ] Abp.Modules.AbpModuleManager - Found 15 ABP modules in total. DEBUG 2016-11-04 11:12:28,819 [1 ] Abp.Modules.AbpModuleManager - Loaded module: SmartCampus.Web.SmartCampusWebModule, SmartCampus.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:12:28,822 [1 ] Abp.Modules.AbpModuleManager - Loaded module: SmartCampus.SmartCampusDataModule, SmartCampus.EntityFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:12:28,822 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.EntityFramework.AbpZeroEntityFrameworkModule, Abp.Zero.EntityFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:12:28,822 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.AbpZeroCoreModule, Abp.Zero, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:12:28,823 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AbpKernelModule, Abp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:12:28,823 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.EntityFramework.AbpEntityFrameworkModule, Abp.EntityFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:12:28,823 [1 ] Abp.Modules.AbpModuleManager - Loaded module: SmartCampus.SmartCampusCoreModule, SmartCampus.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:12:28,824 [1 ] Abp.Modules.AbpModuleManager - Loaded module: SmartCampus.SmartCampusApplicationModule, SmartCampus.Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:12:28,824 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AutoMapper.AbpAutoMapperModule, Abp.AutoMapper, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:12:28,824 [1 ] Abp.Modules.AbpModuleManager - Loaded module: SmartCampus.Api.SmartCampusWebApiModule, SmartCampus.WebApi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:12:28,825 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.WebApi.AbpWebApiModule, Abp.Web.Api, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:12:28,825 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.AbpWebModule, Abp.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:12:28,825 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.AbpWebCommonModule, Abp.Web.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:12:28,825 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.SignalR.AbpWebSignalRModule, Abp.Web.SignalR, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:12:28,825 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.Mvc.AbpWebMvcModule, Abp.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:12:28,828 [1 ] Abp.Modules.AbpModuleManager - 15 modules loaded. DEBUG 2016-11-04 11:12:28,968 [1 ] o.Configuration.LanguageManagementConfig - Converted Abp (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2016-11-04 11:12:28,968 [1 ] o.Configuration.LanguageManagementConfig - Converted AbpZero (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2016-11-04 11:12:28,968 [1 ] o.Configuration.LanguageManagementConfig - Converted SmartCampus (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2016-11-04 11:12:28,968 [1 ] o.Configuration.LanguageManagementConfig - Converted AbpWeb (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2016-11-04 11:12:29,441 [1 ] EntityFramework.AbpEntityFrameworkModule - Registering DbContext: SmartCampus.EntityFramework.SmartCampusDbContext, SmartCampus.EntityFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2016-11-04 11:12:30,657 [1 ] Abp.Localization.LocalizationManager - Initializing 4 localization sources. DEBUG 2016-11-04 11:12:30,665 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: Abp DEBUG 2016-11-04 11:12:30,667 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: AbpZero DEBUG 2016-11-04 11:12:30,669 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: SmartCampus DEBUG 2016-11-04 11:12:30,670 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: AbpWeb DEBUG 2016-11-04 11:12:30,787 [1 ] Abp.BackgroundJobs.BackgroundJobManager - Start background worker: Abp.BackgroundJobs.BackgroundJobManager DEBUG 2016-11-04 11:12:31,012 [1 ] Abp.AutoMapper.AbpAutoMapperModule - Found 9 classes define auto mapping attributes DEBUG 2016-11-04 11:12:31,012 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SmartCampus.Web.Models.Account.TenantSelectionViewModel+TenantInfo DEBUG 2016-11-04 11:12:31,016 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SmartCampus.Sessions.Dto.TenantLoginInfoDto DEBUG 2016-11-04 11:12:31,016 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SmartCampus.Sessions.Dto.UserLoginInfoDto DEBUG 2016-11-04 11:12:31,016 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SmartCampus.Users.Dto.CreateUserInput DEBUG 2016-11-04 11:12:31,016 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SmartCampus.Users.Dto.UserListDto DEBUG 2016-11-04 11:12:31,016 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SmartCampus.MultiTenancy.Dto.CreateTenantInput DEBUG 2016-11-04 11:12:31,017 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SmartCampus.MultiTenancy.Dto.TenantListDto DEBUG 2016-11-04 11:12:31,017 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SmartCampus.Institutions.Dto.InstitutionListDto DEBUG 2016-11-04 11:12:31,017 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SmartCampus.Courses.Dto.CoursesListDto DEBUG 2016-11-04 11:12:32,980 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'SmartCampus.Sessions.ISessionAppService' with service name 'app/session'. DEBUG 2016-11-04 11:12:32,981 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'SmartCampus.Users.IUserAppService' with service name 'app/user'. DEBUG 2016-11-04 11:12:32,982 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'SmartCampus.Roles.IRoleAppService' with service name 'app/role'. DEBUG 2016-11-04 11:12:32,983 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'SmartCampus.MultiTenancy.ITenantAppService' with service name 'app/tenant'. DEBUG 2016-11-04 11:12:32,984 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'SmartCampus.Institutions.IInstitutionAppService' with service name 'app/institution'. DEBUG 2016-11-04 11:12:32,985 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'SmartCampus.InstitutionCourseMappings.IInstitutionCourseMappingAppService' with service name 'app/institutionCourseMapping'. DEBUG 2016-11-04 11:12:32,986 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'SmartCampus.Courses.ICourseAppService' with service name 'app/course'. ERROR 2016-11-04 11:12:33,758 [7 ] Abp.Web.SignalR.Hubs.AbpCommonHub - Can not find IP address of the client! connectionId: 55778023-367d-42f4-ad67-914595786be9 ERROR 2016-11-04 11:12:33,758 [7 ] Abp.Web.SignalR.Hubs.AbpCommonHub - Value does not fall within the expected range. System.ArgumentException: Value does not fall within the expected range. at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at System.Web.Hosting.IIS7WorkerRequest.GetServerVariableInternal(String name) at System.Web.Hosting.IIS7WorkerRequest.GetServerVariable(String name) at System.Web.HttpRequest.FillInServerVariablesCollection() at System.Web.HttpServerVarsCollection.Populate() at System.Web.HttpServerVarsCollection.Get(String name) at Microsoft.Owin.Host.SystemWeb.OwinCallContext.Microsoft.Owin.Host.SystemWeb.CallEnvironment.AspNetDictionary.IPropertySource.GetServerRemoteIpAddress() at Microsoft.Owin.Host.SystemWeb.CallEnvironment.AspNetDictionary.get_ServerRemoteIpAddress() at Microsoft.Owin.Host.SystemWeb.CallEnvironment.AspNetDictionary.PropertiesTryGetValue(String key, Object& value) at Microsoft.Owin.Host.SystemWeb.CallEnvironment.AspNetDictionary.System.Collections.Generic.IDictionary<System.String,System.Object>.get_Item(String key) at Abp.Web.SignalR.Hubs.AbpCommonHub.GetIpAddressOfClient() in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.SignalR\Web\SignalR\Hubs\AbpCommonHub.cs:line 102 DEBUG 2016-11-04 11:12:33,797 [7 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is connected (on reconnected event): {"ConnectionId":"55778023-367d-42f4-ad67-914595786be9","IpAddress":"","TenantId":null,"UserId":1,"ConnectTime":"2016-11-04T11:12:33.7638483+05:30","Properties":{}} DEBUG 2016-11-04 11:12:39,936 [9 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is connected: {"ConnectionId":"65768671-f01f-4fcd-b4cf-656e59bfff9f","IpAddress":"::1","TenantId":null,"UserId":1,"ConnectTime":"2016-11-04T11:12:39.9367695+05:30","Properties":{}} DEBUG 2016-11-04 11:12:39,962 [12 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is registered: 65768671-f01f-4fcd-b4cf-656e59bfff9f DEBUG 2016-11-04 11:15:53,128 [27 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is disconnected: 65768671-f01f-4fcd-b4cf-656e59bfff9f DEBUG 2016-11-04 11:15:53,424 [20 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is connected: {"ConnectionId":"3b62d36a-10c7-4ca4-b192-70cbdd130862","IpAddress":"::1","TenantId":null,"UserId":1,"ConnectTime":"2016-11-04T11:15:53.4236988+05:30","Properties":{}} DEBUG 2016-11-04 11:15:53,435 [16 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is registered: 3b62d36a-10c7-4ca4-b192-70cbdd130862 DEBUG 2016-11-04 11:17:00,699 [20 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is disconnected: 3b62d36a-10c7-4ca4-b192-70cbdd130862 DEBUG 2016-11-04 11:17:01,085 [25 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is connected: {"ConnectionId":"3b1bdc22-d9e8-4264-92d3-e72a2bc88046","IpAddress":"::1","TenantId":null,"UserId":1,"ConnectTime":"2016-11-04T11:17:01.0843835+05:30","Properties":{}} DEBUG 2016-11-04 11:17:01,107 [30 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is registered: 3b1bdc22-d9e8-4264-92d3-e72a2bc88046
NB: Also I've tried after removing the IMustHaveTenant from my entities. So, I think the TenantId=null is not a problem!
-
0
Nobody is here to help me???? :cry: :cry: :cry:
-
0
Hi,
Can you send your project to <a href="mailto:[email protected]">[email protected]</a> ? Since you have a lot of errors on your project, it's better to take a look at them like that.
And please write your problems in the email as well.
Thanks.
-
0
Hi, Finally i got the solution from this post: [http://forum.aspnetboilerplate.com/viewtopic.php?p=9706#p9706]) :D
Thank you very much for your kind help :)