Base solution for your next web application

Activities of "geek1913"

Answer

Disregard...seem to have had a false positive in that testing. Real issue is that I tried to use an "Entity Name" of "Event"

This causes atlease 2 problems. First and biggest is that "event" is a special name in C# so the generated code blows up on things like: public async Task<GetEventForEditOutput> GetEventForEdit(EntityDto<Guid> input) { var event = await _eventRepository.FirstOrDefaultAsync(input.Id); var output = new GetEventForEditOutput {Event = ObjectMapper.Map<CreateOrEditEventDto>(event)}; return output; }

The other and smaller one is the way varibles are picked for {ProjectName}DbContext.cs. It seems to use the first letter of the "Entity Name" which if it starts with an E causes this variable overload problem... modelBuilder.Entity<Event>(e => { e.HasIndex(e => new { e.TenantId }); });

Anyway, I'll send a bug about the E based Names and maybe a suggestion to add some validations to the Entity Name fields. :)

Answer

Thanks, that kinda helped. :) I dislike things that break for no reason. Here are the steps I followed.

  1. Run RAD, get "Build failed."
  2. Build Solution from VS - worked with no errors.
  3. Add-Migration manually in VS - worked with no errors.
  4. Close everything\reboot
  5. Run RAD again, get "Build failed."
  6. Ask for help here, and got answer to do something I've already done. (but it gave me an idea)
  7. Run "Delete-BIN-OBJ-Folders.bat"
  8. Test Build Solution from VS again - worked with no errors.
  9. Run "Delete-BIN-OBJ-Folders.bat" again
  10. Run RAD, success!!!

I've seen VS get messed up where you can't build the solution unless you delete the BINs (not for a long time but it's happened). I've never seen VS build, but something else fail. I'll add running Delete-BIN-OBJ-Folders.bat to my best practices for using RAD.

Question

Running ASP.Net Core & Angular 6.5.0. Tried to add a new form with the RAD Tool and get this. ... -> CustomDtoMapper.cs is being modified. Running add-migration... Build failed. -> events.component.ts is being generated. ...

Is there a way to see what failed or why?

please see this thread: [https://forum.aspnetboilerplate.com/viewtopic.php?f=5&t=11429&start=10])

follow the steps to resolve this issue.

Is there a way to deploy client and server on the same app on azure like demo.aspnetzero.com?

No. The Angular site and Host site run in separate azure web apps.

Can you suggest me how to set the dns mydomain.com to resolve the tenant on sub domain? I think that *.mydomain.com go to the angular app, but how can I set the DNS for the server?

This is how I did it in azure

ANGULAR web app: *.mydomain.com = static SSL IP of ANGULAR web app mydomain.com = static SSL IP of ANGULAR web app

SERVER web app: *.api.mydomain.com = static SSL IP of SERVER web app api.mydomain.com = static SSL IP of SERVER web app

figured it out finally. first issue was that the issue can repro if you run in visual studio as Production by setting the "ASPNETCORE_ENVIRONMENT" variable. this helped troubleshooting drastically.

the root problem was missing files. when RAD creates new sites it creates all the files and database migrations, but it doesn't update the bundleconfig.json or trigger minify on the new *.js files in any other way.

all seems to be working now. thanks for the guidance. now i'm off to the next sprint.

thx @alper, this new Delete file and the new npm "Full-Build" command have fixed me up!

I can't see what would be missing. The files ref'd just before the 404 errors are present, and any files inside those are also present. I don't think the 404 error is giving enough detail to be helpful at this point.

I can recreate this with a vanilla 5.5.2 build, using the latest RAD tool and have the exact same issue after publishing. Something must be missing but i'm not seeing it. Can anyone else repro with vanilla code? Remember, don't run from VS2017, run the resulting publish site content.

I'm planning to try to attach the VS debugger to the published site next, but I've not had luck with this in the past.

Yes, the Create New OU\User\Tenant\etc buttons are working. Anything built with the RAD Tool is the issue. I'm going to test a vanilla code base in the morning.

There are 2 things I see in the logs file regularly... <ins>1 is on startup, I think it's just a timing issue</ins>

DEBUG 2018-07-03 07:38:33,040 [1    ] Abp.Modules.AbpModuleManager             - Loading Abp modules...
DEBUG 2018-07-03 07:38:34,157 [1    ] Abp.Modules.AbpModuleManager             - Found 23 ABP modules in total.
DEBUG 2018-07-03 07:38:34,238 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: {MyNameSpace}.Web.Startup.ProjectNameWebMvcModule, {MyNameSpace}.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,253 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: {MyNameSpace}.Web.ProjectNameWebCoreModule, {MyNameSpace}.Web.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,256 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: {MyNameSpace}.ProjectNameApplicationModule, {MyNameSpace}.Application, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,265 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: {MyNameSpace}.ProjectNameCoreModule, {MyNameSpace}.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,269 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.Zero.AbpZeroCoreModule, Abp.ZeroCore, Version=3.7.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,271 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.Zero.AbpZeroCommonModule, Abp.Zero.Common, Version=3.7.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,278 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.AbpKernelModule, Abp, Version=3.7.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,285 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.Zero.Ldap.AbpZeroLdapModule, Abp.Zero.Ldap, Version=3.7.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,291 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.AutoMapper.AbpAutoMapperModule, Abp.AutoMapper, Version=3.7.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,299 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.AspNetZeroCore.AbpAspNetZeroCoreModule, Abp.AspNetZeroCore, Version=1.1.3.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,303 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.MailKit.AbpMailKitModule, Abp.MailKit, Version=3.7.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,305 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: {MyNameSpace}.EntityFrameworkCore.ProjectNameEntityFrameworkCoreModule, {MyNameSpace}.EntityFrameworkCore, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,309 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.Zero.EntityFrameworkCore.AbpZeroCoreEntityFrameworkCoreModule, Abp.ZeroCore.EntityFrameworkCore, Version=3.7.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,311 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.EntityFrameworkCore.AbpEntityFrameworkCoreModule, Abp.EntityFrameworkCore, Version=3.7.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,312 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.EntityFramework.AbpEntityFrameworkCommonModule, Abp.EntityFramework.Common, Version=3.7.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,313 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.IdentityServer4.AbpZeroCoreIdentityServerEntityFrameworkCoreModule, Abp.ZeroCore.IdentityServer4.EntityFrameworkCore, Version=3.7.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,324 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.IdentityServer4.AbpZeroCoreIdentityServerModule, Abp.ZeroCore.IdentityServer4, Version=3.7.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,330 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.AspNetZeroCore.Web.AbpAspNetZeroCoreWebModule, Abp.AspNetZeroCore.Web, Version=1.1.3.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,331 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.AspNetCore.AbpAspNetCoreModule, Abp.AspNetCore, Version=3.7.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,333 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.Web.AbpWebCommonModule, Abp.Web.Common, Version=3.7.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,335 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.AspNetCore.SignalR.AbpAspNetCoreSignalRModule, Abp.AspNetCore.SignalR, Version=3.7.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,340 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.Runtime.Caching.Redis.AbpRedisCacheModule, Abp.RedisCache, Version=3.7.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,343 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.Hangfire.AbpHangfireAspNetCoreModule, Abp.HangFire.AspNetCore, Version=3.7.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:34,363 [1    ] Abp.Modules.AbpModuleManager             - 23 modules loaded.
DEBUG 2018-07-03 07:38:34,886 [1    ] o.Configuration.LanguageManagementConfig - Converted Abp (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource
DEBUG 2018-07-03 07:38:34,895 [1    ] o.Configuration.LanguageManagementConfig - Converted AbpZero (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource
DEBUG 2018-07-03 07:38:34,897 [1    ] o.Configuration.LanguageManagementConfig - Converted ProjectName (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource
DEBUG 2018-07-03 07:38:34,898 [1    ] o.Configuration.LanguageManagementConfig - Converted AbpWeb (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource
DEBUG 2018-07-03 07:38:38,228 [1    ] ameworkCore.AbpEntityFrameworkCoreModule - Registering DbContext: {MyNameSpace}.EntityFrameworkCore.ProjectNameDbContext, {MyNameSpace}.EntityFrameworkCore, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null
DEBUG 2018-07-03 07:38:41,442 [1    ] Abp.Localization.LocalizationManager     - Initializing 4 localization sources.
DEBUG 2018-07-03 07:38:41,820 [1    ] Abp.Localization.LocalizationManager     - Initialized localization source: Abp
DEBUG 2018-07-03 07:38:41,874 [1    ] Abp.Localization.LocalizationManager     - Initialized localization source: AbpZero
DEBUG 2018-07-03 07:38:41,997 [1    ] Abp.Localization.LocalizationManager     - Initialized localization source: ProjectName
DEBUG 2018-07-03 07:38:42,017 [1    ] Abp.Localization.LocalizationManager     - Initialized localization source: AbpWeb
DEBUG 2018-07-03 07:38:42,188 [1    ] Abp.BackgroundJobs.BackgroundJobManager  - Start background worker: Abp.BackgroundJobs.BackgroundJobManager
DEBUG 2018-07-03 07:38:42,464 [1    ] Abp.AutoMapper.AbpAutoMapperModule       - Found 14 classes define auto mapping attributes
DEBUG 2018-07-03 07:38:42,466 [1    ] Abp.AutoMapper.AbpAutoMapperModule       - {MyNameSpace}.Web.Models.TokenAuth.ExternalLoginProviderInfoModel
DEBUG 2018-07-03 07:38:42,487 [1    ] Abp.AutoMapper.AbpAutoMapperModule       - {MyNameSpace}.Friendships.Cache.FriendCacheItem
DEBUG 2018-07-03 07:38:42,495 [1    ] Abp.AutoMapper.AbpAutoMapperModule       - {MyNameSpace}.Web.Views.Shared.Components.TenantChange.TenantChangeViewModel
DEBUG 2018-07-03 07:38:42,510 [1    ] Abp.AutoMapper.AbpAutoMapperModule       - {MyNameSpace}.Web.Models.TenantRegistration.EditionsSelectViewModel
DEBUG 2018-07-03 07:38:42,511 [1    ] Abp.AutoMapper.AbpAutoMapperModule       - {MyNameSpace}.Web.Models.TenantRegistration.TenantRegisterResultViewModel
DEBUG 2018-07-03 07:38:42,512 [1    ] Abp.AutoMapper.AbpAutoMapperModule       - {MyNameSpace}.Web.Areas.App.Models.Users.CreateOrEditUserModalViewModel
DEBUG 2018-07-03 07:38:42,514 [1    ] Abp.AutoMapper.AbpAutoMapperModule       - {MyNameSpace}.Web.Areas.App.Models.Users.UserPermissionsEditViewModel
DEBUG 2018-07-03 07:38:42,515 [1    ] Abp.AutoMapper.AbpAutoMapperModule       - {MyNameSpace}.Web.Areas.App.Models.Tenants.TenantFeaturesEditViewModel
DEBUG 2018-07-03 07:38:42,516 [1    ] Abp.AutoMapper.AbpAutoMapperModule       - {MyNameSpace}.Web.Areas.App.Models.SubscriptionManagement.PaymentResultViewModel
DEBUG 2018-07-03 07:38:42,519 [1    ] Abp.AutoMapper.AbpAutoMapperModule       - {MyNameSpace}.Web.Areas.App.Models.Roles.CreateOrEditRoleModalViewModel
DEBUG 2018-07-03 07:38:42,521 [1    ] Abp.AutoMapper.AbpAutoMapperModule       - {MyNameSpace}.Web.Areas.App.Models.Profile.MySettingsViewModel
DEBUG 2018-07-03 07:38:42,523 [1    ] Abp.AutoMapper.AbpAutoMapperModule       - {MyNameSpace}.Web.Areas.App.Models.OrganizationUnits.EditOrganizationUnitModalViewModel
DEBUG 2018-07-03 07:38:42,525 [1    ] Abp.AutoMapper.AbpAutoMapperModule       - {MyNameSpace}.Web.Areas.App.Models.Languages.CreateOrEditLanguageModalViewModel
DEBUG 2018-07-03 07:38:42,527 [1    ] Abp.AutoMapper.AbpAutoMapperModule       - {MyNameSpace}.Web.Areas.App.Models.Editions.CreateOrEditEditionModalViewModel
DEBUG 2018-07-03 07:39:04,015 [1    ] enancy.SubscriptionExpirationCheckWorker - Start background worker: {MyNameSpace}.MultiTenancy.SubscriptionExpirationCheckWorker
DEBUG 2018-07-03 07:39:04,021 [1    ] cy.SubscriptionExpireEmailNotifierWorker - Start background worker: {MyNameSpace}.MultiTenancy.SubscriptionExpireEmailNotifierWorker
FATAL 2018-07-03 07:39:08,330 [1    ] soft.AspNetCore.Hosting.Internal.WebHost - Hosting startup assembly exception
System.InvalidOperationException: Startup assembly StartupBootstrapper failed to execute. See the inner exception for more details. ---> System.IO.FileNotFoundException: Could not load file or assembly 'StartupBootstrapper, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, IntPtr ptrLoadContextBinder)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, IntPtr ptrLoadContextBinder)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices(AggregateException& hostingStartupErrors)
   --- End of inner exception stack trace ---
INFO  2018-07-03 07:39:10,483 [7    ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET http://default.mydomain.com/  
INFO  2018-07-03 07:39:17,034 [7    ] ore.Mvc.Internal.ControllerActionInvoker - Route matched with {action = "Index", controller = "Home", area = ""}. Executing action {MyNameSpace}.Web.Controllers.HomeController.Index ({MyNameSpace}.Web.Mvc)
INFO  2018-07-03 07:39:17,983 [7    ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method {MyNameSpace}.Web.Controllers.HomeController.Index ({MyNameSpace}.Web.Mvc) with arguments (, False) - Validation state: Valid
INFO  2018-07-03 07:39:18,052 [7    ] ore.Mvc.Internal.ControllerActionInvoker - Executed action method {MyNameSpace}.Web.Controllers.HomeController.Index ({MyNameSpace}.Web.Mvc), returned result Microsoft.AspNetCore.Mvc.RedirectToActionResult in 33.1287ms.
INFO  2018-07-03 07:39:19,177 [7    ] ft.AspNetCore.Mvc.RedirectToActionResult - Executing RedirectResult, redirecting to /Account/Login.
INFO  2018-07-03 07:39:19,238 [7    ] ore.Mvc.Internal.ControllerActionInvoker - Executed action {MyNameSpace}.Web.Controllers.HomeController.Index ({MyNameSpace}.Web.Mvc) in 2176.2262ms
INFO  2018-07-03 07:39:19,723 [7    ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 9284.9073ms 302

<ins>2 is that it looks like some scripts result in a 404 result even thou the files are there.</ins>

INFO  2018-07-03 07:39:32,094 [10   ] NetCore.StaticFiles.StaticFileMiddleware - Sending file. Request path: '/view-resources/Areas/App/Views/_Bundles/account-layout-libs.min.js'. Physical path: 'D:\home\site\wwwroot\wwwroot\view-resources\Areas\App\Views\_Bundles\account-layout-libs.min.js'
INFO  2018-07-03 07:39:32,096 [10   ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 1059.5172ms 200 application/javascript
INFO  2018-07-03 07:39:32,085 [7    ] NetCore.StaticFiles.StaticFileMiddleware - Sending file. Request path: '/view-resources/Areas/App/Views/_Bundles/common-scripts.min.js'. Physical path: 'D:\home\site\wwwroot\wwwroot\view-resources\Areas\App\Views\_Bundles\common-scripts.min.js'
INFO  2018-07-03 07:39:32,086 [5    ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET http://default.mydomain.com/Error?statusCode=404  
INFO  2018-07-03 07:39:32,110 [5    ] ore.Mvc.Internal.ControllerActionInvoker - Route matched with {action = "Index", controller = "Error", area = ""}. Executing action {MyNameSpace}.Web.Controllers.ErrorController.Index ({MyNameSpace}.Web.Mvc)
INFO  2018-07-03 07:39:32,139 [5    ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method {MyNameSpace}.Web.Controllers.ErrorController.Index ({MyNameSpace}.Web.Mvc) with arguments (404) - Validation state: Valid
INFO  2018-07-03 07:39:32,147 [5    ] ore.Mvc.Internal.ControllerActionInvoker - Executed action method {MyNameSpace}.Web.Controllers.ErrorController.Index ({MyNameSpace}.Web.Mvc), returned result Microsoft.AspNetCore.Mvc.ViewResult in 6.6972ms.
INFO  2018-07-03 07:39:32,156 [5    ] Core.Mvc.ViewFeatures.ViewResultExecutor - Executing ViewResult, running view Error404.

different issue.

again, everything works in local but not from server. win the code is deployed to the server it is clearing the previous deployment and then running "npm run full-build" the code is a clean git pull, and the repository doesn't have any "node_modules" or bin, or obj, or libs, or _bundles folders. only what is needed is generated fresh on the server.

i did notice that there is no node_modules in the site after being deployed. must their be? I thought the gulp command copied it all to libs anyway.

Showing 1 to 10 of 15 entries