Base solution for your next web application

Activities of "robdocherty"

Hi Justin - i've been working with the angular 2 app for a couple of weeks trying it out. I love it. I just went to VS 2017 Community and Zero 3.3. I was a bit confused about the migrator docs too, but it's actually pretty simple. If you look inside that project it has a program.cs, so it must be a console app. So just set it as your startup app in VS and hit CTRL+F5 and off it goes. Two things to note. 1) it has its own appsettings.json so you need to set your database conn string in there, and 2) remember to set your statup app back to the .host project when you're done. cheers

Hi, do you have sample code to implement the ACTIONS drop down within the JTable grid for Angular 2? This would be per shown on the Angular2 demo (but not in the download): <a class="postlink" href="http://xyz.demo.aspnetzero.com/Application#!/roles">http://xyz.demo.aspnetzero.com/Application#!/roles</a>

If this example is using angular's ui grid then maybe that sample code would be useful? thanks rob

I would like to echo the opinion expressed here. The step-by-step guide is great for helping new users get up and running quickly but it really NEEDS a simple entity update sample code added. This is a major omission. Surely not a big task to add simple update function on the Person entity? thanks.

Specifically having trouble working out how to configure the "create or edit" modal in the angular app. This requires a dto to get the selected item to edit? What else. There is really quite a lot left out here that is important and slowing me down to get started. I cannot really understand why a "step-by-step development guide" has "C", "R", "D" and no "U". It is a fundamental requirement.

Hi there I'm getting the "An internal error occurred during your request!" popup from the Angular 2 app whenever I run it against either of the two available social logins using the latest build. When I first purchased the product a few weeks ago, this was working OK (or it was working with the asp boilerplate download - cant remember which but definitely was not an issue with my fb setup) but seems not to be working on the latest build. Are you able to check this please? How can we troubleshoot this issue? Also, on the facebook auth settings should the site URL be <a class="postlink" href="http://localhost:22742/">http://localhost:22742/</a> or <a class="postlink" href="http://localhost:4200/">http://localhost:4200/</a>? ie, is the angular app making the facebook request or the .core app? Thanks

log details for the transaction shown below. cheers rob

INFO 2017-03-28 11:39:02,797 [23 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 OPTIONS <a class="postlink" href="http://localhost:22742/api/TokenAuth/ExternalAuthenticate">http://localhost:22742/api/TokenAuth/Ex ... thenticate</a>
DEBUG 2017-03-28 11:39:02,797 [23 ] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HL3LC41UQD7M" completed keep alive response. INFO 2017-03-28 11:39:02,797 [23 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 0.2546ms 204 INFO 2017-03-28 11:39:02,933 [9 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 POST <a class="postlink" href="http://localhost:22742/api/TokenAuth/ExternalAuthenticate">http://localhost:22742/api/TokenAuth/Ex ... thenticate</a> application/json; charset=UTF-8 270 DEBUG 2017-03-28 11:39:02,933 [9 ] NetCore.StaticFiles.StaticFileMiddleware - POST requests are not supported DEBUG 2017-03-28 11:39:02,933 [9 ] osoft.AspNetCore.Routing.Tree.TreeRouter - Request successfully matched the route with name '(null)' and template 'api/TokenAuth/ExternalAuthenticate'. DEBUG 2017-03-28 11:39:02,937 [9 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action tiktok.Web.Controllers.TokenAuthController.ExternalAuthenticate (tiktok.Web.Core) DEBUG 2017-03-28 11:39:02,972 [9 ] Mvc.ModelBinding.Binders.BodyModelBinder - Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.JsonInputFormatter' for content type 'application/json; charset=UTF-8'. WARN 2017-03-28 11:39:02,974 [9 ] Abp.MultiTenancy.TenantResolver - System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at Abp.AspNetCore.MultiTenancy.DomainTenantResolveContributor.ResolveTenantId() at Abp.MultiTenancy.TenantResolver.GetTenantIdFromContributors() System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at Abp.AspNetCore.MultiTenancy.DomainTenantResolveContributor.ResolveTenantId() at Abp.MultiTenancy.TenantResolver.GetTenantIdFromContributors() INFO 2017-03-28 11:39:02,975 [9 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method tiktok.Web.Controllers.TokenAuthController.ExternalAuthenticate (tiktok.Web.Core) with arguments (tiktok.Web.Models.TokenAuth.ExternalAuthenticateModel) - ModelState is Valid ERROR 2017-03-28 11:39:02,985 [15 ] Mvc.ExceptionHandling.AbpExceptionFilter - Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) System.IO.FileLoadException: Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'System.Diagnostics.DiagnosticSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' at System.Net.Http.WinHttpHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClientHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpMessageInvoker.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken) at System.Net.Http.HttpClient.GetAsync(Uri requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken) at System.Net.Http.HttpClient.GetAsync(String requestUri) at tiktok.Web.Authentication.External.Facebook.FacebookAuthProviderApi.<GetUserInfo>d__1.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.Runtime.CompilerServices.TaskAwaiter1.GetResult() at tiktok.Web.Controllers.TokenAuthController.<GetExternalUserInfo>d__23.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.Runtime.CompilerServices.TaskAwaiter1.GetResult() at tiktok.Web.Controllers.TokenAuthController.<ExternalAuthenticate>d__20.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 Microsoft.AspNetCore.Mvc.Internal.ObjectMethodExecutor.<CastToObject>d__40`1.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.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

DEBUG 2017-03-28 11:39:02,986 [15 ] ore.Mvc.Internal.ControllerActionInvoker - Request was short circuited at exception filter 'Abp.AspNetCore.Mvc.ExceptionHandling.AbpExceptionFilter'. DEBUG 2017-03-28 11:39:02,987 [15 ] etCore.Mvc.Internal.ObjectResultExecutor - Could not find an output formatter based on content negotiation. Accepted types were (application/json; charset=UTF-8) DEBUG 2017-03-28 11:39:02,987 [15 ] etCore.Mvc.Internal.ObjectResultExecutor - Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.JsonOutputFormatter' and content type 'application/json' to write the response. INFO 2017-03-28 11:39:02,987 [15 ] etCore.Mvc.Internal.ObjectResultExecutor - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. INFO 2017-03-28 11:39:02,987 [15 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action tiktok.Web.Controllers.TokenAuthController.ExternalAuthenticate (tiktok.Web.Core) in 49.652ms DEBUG 2017-03-28 11:39:02,987 [15 ] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HL3LC41UQD7M" completed keep alive response. INFO 2017-03-28 11:39:02,987 [15 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 54.5456ms 500 application/json; charset=utf-8

Hi - ABP is per the latest version of aspnetzero (3.3) on the 14th march. i am using the angular 2 front end. I tried with host set to allow new users to register and without. same error each time. what other details can i give you to help?

also, what is supposed to happen when you click the social login and the tenant does not allow user accounts to be created? is there any provision anywhere to associate a social login with an existing user account?

thanks.

When I first installed zero it was working fine and i was able to go through the step by step development guide and get the sample screen working. Later on, I had some issues adding new data access screens to the angular app so i removed both apps and went back to the original download. The app works OK but I cannot get anything new to work. I get the same error on the console every time and it's driving me nuts. To confirm, the standard admin pages are all working fine. However I can't get even the simple Phonebook page to load.. The error is always like per below. Can anyone help? rob

EXCEPTION: Uncaught (in promise): Error: DI Error Error: DI Error at NoProviderError.ZoneAwareError (<a class="postlink" href="http://localhost:4200/polyfills.bundle.js:6205:33">http://localhost:4200/polyfills.bundle.js:6205:33</a>) at NoProviderError.BaseError [as constructor] (<a class="postlink" href="http://localhost:4200/vendor.bundle.js:37836:16">http://localhost:4200/vendor.bundle.js:37836:16</a>) at NoProviderError.AbstractProviderError [as constructor] (<a class="postlink" href="http://localhost:4200/vendor.bundle.js:91873:16">http://localhost:4200/vendor.bundle.js:91873:16</a>) at new NoProviderError (<a class="postlink" href="http://localhost:4200/vendor.bundle.js:91935:16">http://localhost:4200/vendor.bundle.js:91935:16</a>) at ReflectiveInjector_.throwOrNull (<a class="postlink" href="http://localhost:4200/vendor.bundle.js:129897:19">http://localhost:4200/vendor.bundle.js:129897:19</a>) at ReflectiveInjector.getByKeyDefault (<a class="postlink" href="http://localhost:4200/vendor.bundle.js:129936:25">http://localhost:4200/vendor.bundle.js:129936:25</a>) at ReflectiveInjector.getByKey (<a class="postlink" href="http://localhost:4200/vendor.bundle.js:129868:25">http://localhost:4200/vendor.bundle.js:129868:25</a>) at ReflectiveInjector.get (<a class="postlink" href="http://localhost:4200/vendor.bundle.js:129737:21">http://localhost:4200/vendor.bundle.js:129737:21</a>) at RootModuleInjector.NgModuleInjector.get (<a class="postlink" href="http://localhost:4200/vendor.bundle.js:92809:52">http://localhost:4200/vendor.bundle.js:92809:52</a>) at CompiledTemplate.proxyViewClass.AppView.injectorGet (<a class="postlink" href="http://localhost:4200/vendor.bundle.js:130672:45">http://localhost:4200/vendor.bundle.js:130672:45</a>) at CompiledTemplate.proxyViewClass.DebugAppView.injectorGet (<a class="postlink" href="http://localhost:4200/vendor.bundle.js:131100:49">http://localhost:4200/vendor.bundle.js:131100:49</a>) at ElementInjector.get (<a class="postlink" href="http://localhost:4200/vendor.bundle.js:130176:27">http://localhost:4200/vendor.bundle.js:130176:27</a>) at ReflectiveInjector_.getByKeyDefault (<a class="postlink" href="http://localhost:4200/vendor.bundle.js:129933:24">http://localhost:4200/vendor.bundle.js:129933:24</a>) at ReflectiveInjector.getByKey (<a class="postlink" href="http://localhost:4200/vendor.bundle.js:129868:25">http://localhost:4200/vendor.bundle.js:129868:25</a>) at ReflectiveInjector.get (<a class="postlink" href="http://localhost:4200/vendor.bundle.js:129737:21">http://localhost:4200/vendor.bundle.js:129737:21</a>)

Hi, in your step-by-step example, you add the Phone entity to the GetPeople DTO to retrieve each person and their phone numbers. Suppose each person has 10 phone numbers and you wanted to sort that list by Phone Number to make it easier to read (sort by detail entity of master-detail), how can this be done? It seems like EF/LINQ may not support this. If so, how to sort the DTO prior to returning it from the appservice? see below in red. thanks.

public ListResultDto<PersonListDto> GetPeople(GetPeopleInput input) { var persons = _personRepository .GetAll() .Include(p => p.Phones) .WhereIf( !input.Filter.IsNullOrEmpty(), p => p.Name.Contains(input.Filter) || p.Surname.Contains(input.Filter) || p.EmailAddress.Contains(input.Filter) ) .OrderBy(p => p.Name) .ThenBy(p => p.Surname) <span style="color:#FF0000">.ThenBy(p => p.Phones.Number) // ideally you would do this</span> .ToList();

return new ListResultDto&lt;PersonListDto&gt;(persons.MapTo&lt;List&lt;PersonListDto&gt;>());

}

Thank you for your suggestions. It compiles OK but unfortunately throws error per below...

INFO 2017-03-31 08:15:36,310 [10 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET <a class="postlink" href="http://localhost:22742/api/services/app/Division/GetDivisions">http://localhost:22742/api/services/app ... tDivisions</a>
INFO 2017-03-31 08:15:36,318 [10 ] entication.JwtBearer.JwtBearerMiddleware - Successfully validated the token. INFO 2017-03-31 08:15:36,322 [10 ] entication.JwtBearer.JwtBearerMiddleware - HttpContext.User merged via AutomaticAuthentication from authenticationScheme: Bearer. DEBUG 2017-03-31 08:15:36,322 [10 ] NetCore.StaticFiles.StaticFileMiddleware - The request path /api/services/app/Division/GetDivisions does not match a supported file type DEBUG 2017-03-31 08:15:36,322 [10 ] osoft.AspNetCore.Routing.Tree.TreeRouter - Request successfully matched the route with name '(null)' and template 'api/services/app/Division/GetDivisions'. DEBUG 2017-03-31 08:15:36,325 [10 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action tiktok.TiktokCore.Divisions.DivisionAppService.GetDivisions (tiktok.Application) INFO 2017-03-31 08:15:36,342 [10 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method tiktok.TiktokCore.Divisions.DivisionAppService.GetDivisions (tiktok.Application) with arguments ((null)) - ModelState is Valid ERROR 2017-03-31 08:15:36,350 [26 ] Mvc.ExceptionHandling.AbpExceptionFilter - The Include path expression must refer to a navigation property defined on the type. Use dotted paths for reference navigation properties and the Select operator for collection navigation properties. Parameter name: path System.ArgumentException: The Include path expression must refer to a navigation property defined on the type. Use dotted paths for reference navigation properties and the Select operator for collection navigation properties. Parameter name: path at System.Data.Entity.QueryableExtensions.Include[T,TProperty](IQueryable1 source, Expression1 path) at tiktok.TiktokCore.Divisions.DivisionAppService.GetDivisions() at lambda_method(Closure , Object , Object[] ) at Microsoft.AspNetCore.Mvc.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__27.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 Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__25.MoveNext() --- End of stack trace from previous location where exception was thrown --- 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.<InvokeNextExceptionFilterAsync>d__24.MoveNext() DEBUG 2017-03-31 08:15:36,358 [26 ] ore.Mvc.Internal.ControllerActionInvoker - Request was short circuited at exception filter 'Abp.AspNetCore.Mvc.ExceptionHandling.AbpExceptionFilter'.

Showing 1 to 10 of 14 entries