Base solution for your next web application
Open Closed

Acme.PhoneBookDemo does not work #6245


User avatar
0
rbreton created

Hi all! I'm Ricardo, I'm new to ASP.NET ZERO

I followed the instructions in detail to download and install Acme.PhoneBookDemo for ASP.NET Core & Angular. Instructions that I followed

However, when I browse http://localhost:4200 in my browser show a circle turning indefinitely as show in the next image...

Also the following errror message is displayed in the browser console: zone.js:2969 GET http://localhost:4200/sockjs-node/info?t=1546868477137 net::ERR_CONNECTION_REFUSED

Please, I need help urgently

Thanks in advanced!

Ricardo


12 Answer(s)
  • User Avatar
    0
    rbreton created

    I run "dotnet ef database update" command and get de next error:

    Your startup project 'Acme.PhoneBookDemo.AngularUI' doesn't reference Microsoft.EntityFrameworkCore.Design. This package is required for the Entity Framework Core Tools to work. Ensure your startup project is correct, install the package, and try again.

    The browser error send me to the following link: http://localhost:22742/AbpUserConfiguration/GetAll?d=1546901558640

    No se puede acceder a este sitio web La página localhost ha rechazado la conexión. Busca localhost 22742 AbpUserConfiguration GetAll en Google ERR_CONNECTION_REFUSED

  • User Avatar
    0
    ryancyq created
    Support Team

    Hi, can you visit http://localhost:22742 to check if the host API is running correctly?

    Also, run the command dotnet ef database update on *.EntityFrameworkCore project only.

  • User Avatar
    0
    maliming created
    Support Team

    You can also use Entity Framework's built-in tools for migrations. Open Package Manager Console in Visual Studio, set *.EntityFrameworkCore as the Default Project and run the Update-Database command as shown below:

    You need to migrate in the aspnet-core directory

  • User Avatar
    0
    rbreton created

    Hi ryancyq,

    Thanks for your response.

    When visit http://localhost:22742 the following error occurs... No se puede acceder a este sitio web La página localhost ha rechazado la conexión. Busca localhost 22742 en Google ERR_CONNECTION_REFUSED

    I ran "dotnet ef database update" on *.EntityFrameworkCore project only.. Reply: No migrations were applied. The database is already up to date.

  • User Avatar
    0
    rbreton created

    Hi maliming,

    Thanks for the reply.

    I had already run this command, however I did it again receiving the following message...

  • User Avatar
    1
    ryancyq created
    Support Team

    When visit http://localhost:22742 the following error occurs... No se puede acceder a este sitio web La página localhost ha rechazado la conexión. Busca localhost 22742 en Google ERR_CONNECTION_REFUSED

    Can you include the screenshot of the browser and its network panel as well when you accessing the url.

    Can you check the log file at App_Data/Log.txt for relevant error as well.

  • User Avatar
    0
    rbreton created

    Hi ryancyq,

    I include the requested screenshot:

    I checked the log file at "App_Data/Log.txt" but I can not find any error. These are the last records of today...

    DEBUG 2019-01-08 13:17:26,175 [1 ] Abp.Modules.AbpModuleManager - Loading Abp modules... DEBUG 2019-01-08 13:17:29,168 [1 ] Abp.Modules.AbpModuleManager - Found 23 ABP modules in total. DEBUG 2019-01-08 13:17:29,246 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Acme.PhoneBookDemo.Web.Startup.PhoneBookDemoWebHostModule, Acme.PhoneBookDemo.Web.Host, Version=6.4.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,253 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Acme.PhoneBookDemo.Web.PhoneBookDemoWebCoreModule, Acme.PhoneBookDemo.Web.Core, Version=6.4.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,254 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Acme.PhoneBookDemo.PhoneBookDemoApplicationModule, Acme.PhoneBookDemo.Application, Version=6.4.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,255 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Acme.PhoneBookDemo.PhoneBookDemoCoreModule, Acme.PhoneBookDemo.Core, Version=6.4.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,255 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.AbpZeroCoreModule, Abp.ZeroCore, Version=4.0.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,256 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.AbpZeroCommonModule, Abp.Zero.Common, Version=4.0.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,256 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AbpKernelModule, Abp, Version=4.0.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,257 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.Ldap.AbpZeroLdapModule, Abp.Zero.Ldap, Version=4.0.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,258 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AutoMapper.AbpAutoMapperModule, Abp.AutoMapper, Version=4.0.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,259 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AspNetZeroCore.AbpAspNetZeroCoreModule, Abp.AspNetZeroCore, Version=1.1.9.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,259 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.MailKit.AbpMailKitModule, Abp.MailKit, Version=4.0.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,260 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Acme.PhoneBookDemo.EntityFrameworkCore.PhoneBookDemoEntityFrameworkCoreModule, Acme.PhoneBookDemo.EntityFrameworkCore, Version=6.4.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,261 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.EntityFrameworkCore.AbpZeroCoreEntityFrameworkCoreModule, Abp.ZeroCore.EntityFrameworkCore, Version=4.0.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,261 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.EntityFrameworkCore.AbpEntityFrameworkCoreModule, Abp.EntityFrameworkCore, Version=4.0.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,262 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.EntityFramework.AbpEntityFrameworkCommonModule, Abp.EntityFramework.Common, Version=4.0.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,263 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.IdentityServer4.AbpZeroCoreIdentityServerEntityFrameworkCoreModule, Abp.ZeroCore.IdentityServer4.EntityFrameworkCore, Version=4.0.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,264 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.IdentityServer4.AbpZeroCoreIdentityServerModule, Abp.ZeroCore.IdentityServer4, Version=4.0.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,267 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AspNetZeroCore.Web.AbpAspNetZeroCoreWebModule, Abp.AspNetZeroCore.Web, Version=1.1.9.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,267 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AspNetCore.AbpAspNetCoreModule, Abp.AspNetCore, Version=4.0.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,268 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.AbpWebCommonModule, Abp.Web.Common, Version=4.0.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,268 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AspNetCore.SignalR.AbpAspNetCoreSignalRModule, Abp.AspNetCore.SignalR, Version=4.0.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,269 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Runtime.Caching.Redis.AbpRedisCacheModule, Abp.RedisCache, Version=4.0.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,269 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Hangfire.AbpHangfireAspNetCoreModule, Abp.HangFire.AspNetCore, Version=4.0.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:29,278 [1 ] Abp.Modules.AbpModuleManager - 23 modules loaded. DEBUG 2019-01-08 13:17:30,671 [1 ] o.Configuration.LanguageManagementConfig - Converted Abp (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2019-01-08 13:17:30,671 [1 ] o.Configuration.LanguageManagementConfig - Converted AbpZero (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2019-01-08 13:17:30,671 [1 ] o.Configuration.LanguageManagementConfig - Converted PhoneBookDemo (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2019-01-08 13:17:30,671 [1 ] o.Configuration.LanguageManagementConfig - Converted AbpWeb (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2019-01-08 13:17:35,799 [1 ] ameworkCore.AbpEntityFrameworkCoreModule - Registering DbContext: Acme.PhoneBookDemo.EntityFrameworkCore.PhoneBookDemoDbContext, Acme.PhoneBookDemo.EntityFrameworkCore, Version=6.4.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2019-01-08 13:17:39,278 [1 ] Abp.Localization.LocalizationManager - Initializing 4 localization sources. DEBUG 2019-01-08 13:17:39,519 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: Abp DEBUG 2019-01-08 13:17:39,679 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: AbpZero DEBUG 2019-01-08 13:17:40,103 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: PhoneBookDemo DEBUG 2019-01-08 13:17:40,172 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: AbpWeb DEBUG 2019-01-08 13:17:40,401 [1 ] Abp.BackgroundJobs.BackgroundJobManager - Start background worker: Abp.BackgroundJobs.BackgroundJobManager DEBUG 2019-01-08 13:17:40,547 [1 ] Abp.AutoMapper.AbpAutoMapperModule - Found 2 classes define auto mapping attributes DEBUG 2019-01-08 13:17:40,547 [1 ] Abp.AutoMapper.AbpAutoMapperModule - Acme.PhoneBookDemo.Web.Models.TokenAuth.ExternalLoginProviderInfoModel DEBUG 2019-01-08 13:17:40,581 [1 ] Abp.AutoMapper.AbpAutoMapperModule - Acme.PhoneBookDemo.Friendships.Cache.FriendCacheItem DEBUG 2019-01-08 13:17:42,849 [4 ] oCore.Licensing.AspNetZeroLicenseChecker - C:\Users\c20\AppData\Local\Temp\80d72e10c312cfb01398ac8e05e2f5ce.tmp INFO 2019-01-08 13:18:07,574 [4 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET http://localhost:5000/
    INFO 2019-01-08 13:18:10,711 [4 ] ore.Mvc.Internal.ControllerActionInvoker - Route matched with {action = "Index", controller = "Home", area = ""}. Executing action Acme.PhoneBookDemo.Web.Controllers.HomeController.Index (Acme.PhoneBookDemo.Web.Host) INFO 2019-01-08 13:18:10,877 [4 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method Acme.PhoneBookDemo.Web.Controllers.HomeController.Index (Acme.PhoneBookDemo.Web.Host) - Validation state: Valid INFO 2019-01-08 13:18:10,890 [4 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action method Acme.PhoneBookDemo.Web.Controllers.HomeController.Index (Acme.PhoneBookDemo.Web.Host), returned result Microsoft.AspNetCore.Mvc.RedirectResult in 2.5496ms. INFO 2019-01-08 13:18:10,924 [4 ] vc.Infrastructure.RedirectResultExecutor - Executing RedirectResult, redirecting to /swagger. INFO 2019-01-08 13:18:10,941 [4 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action Acme.PhoneBookDemo.Web.Controllers.HomeController.Index (Acme.PhoneBookDemo.Web.Host) in 223.9211ms INFO 2019-01-08 13:18:11,079 [4 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 3546.5627ms 302 INFO 2019-01-08 13:18:11,081 [4 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET http://localhost:5000/swagger
    INFO 2019-01-08 13:18:11,117 [4 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 36.5958ms 301 INFO 2019-01-08 13:18:11,137 [9 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET http://localhost:5000/swagger/index.html
    INFO 2019-01-08 13:18:11,542 [9 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 405.3671ms 200 text/html INFO 2019-01-08 13:18:11,601 [9 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET http://localhost:5000/swagger/swagger-ui.css
    INFO 2019-01-08 13:18:11,621 [8 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET http://localhost:5000/swagger/ui/abp.swagger.js
    INFO 2019-01-08 13:18:11,625 [6 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET http://localhost:5000/swagger/ui/abp.js
    INFO 2019-01-08 13:18:11,725 [8 ] NetCore.StaticFiles.StaticFileMiddleware - The file /swagger/ui/abp.swagger.js was not modified INFO 2019-01-08 13:18:11,728 [6 ] NetCore.StaticFiles.StaticFileMiddleware - The file /swagger/ui/abp.js was not modified INFO 2019-01-08 13:18:11,740 [8 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 119.2298ms 304 application/javascript INFO 2019-01-08 13:18:11,740 [6 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 114.5687ms 304 application/javascript INFO 2019-01-08 13:18:11,990 [4 ] NetCore.StaticFiles.StaticFileMiddleware - Sending file. Request path: '/swagger-ui.css'. Physical path: 'N/A' INFO 2019-01-08 13:18:12,016 [4 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 415.0952ms 200 text/css INFO 2019-01-08 13:18:13,244 [4 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET http://localhost:5000/swagger/v1/swagger.json
    INFO 2019-01-08 13:18:14,053 [6 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 808.6488ms 200 application/json;charset=utf-8

  • User Avatar
    0
    rbreton created

    Checking again I noticed something different on the server. Ask for credentials to authorize....

    Should these credentials be filled out? Which would be?

    Any help would be appreciated.

  • User Avatar
    1
    ryancyq created
    Support Team

    Should these credentials be filled out? Which would be?

    Swagger UI is for you to test out the APIsof your *.Web.Host project. You can use any valid user crendentials in your application.

    Did you run *.Web.Host project via cmd line? Can you try to run it with visual studio instead.

    Your applications should run at the following ports: angular: localhost:4200 web.host: localhost:22742

  • User Avatar
    0
    rbreton created

    According to the instructions in the following link I run solution in two steps: https://docs.aspnetzero.com/documents/zero/latest/Getting-Started-Angular

    1. Run API Host with visual studio
    2. Angular Application via cmd line: npm start

    My default project is *.Web.host

    However, when running the solution use port 5000 instead of port 22742:

  • User Avatar
    1
    ismcagdas created
    Support Team

    Problem solved via remote support. The problem was running host project in release mode. In that case, host app is runned on 5000 port but Angular app tries to connect to 22742 port and fails.

  • User Avatar
    0
    rbreton created

    Yes the problem was solved

    Thank you very much ismcagdas