Open Closed

Application created by ABP Suite doesn´t compile if the feature "Public Web Site" is not selected in ABP Suite during the app creation. #3376


User avatar
0
chrisalves created

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v5.3.1
  • UI type: Blazor WebAssembly PWA
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): No / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:
  1. Create a New Solution using ABP Suite as the picture below. The feature "Public Web Site" is not selected. This is causing the application do not run.
  2. ABP Suite creates the new application
  3. Seed the Initial Data
  4. ABP executing the Initial Seed in the created database and builds the application
  5. The application is created with success according to the Popup
  6. Create a simple Entity like "Customer" and add a simple property like "Name" with 50 of max size and required as pictures below: (Entity)

(Property)

7. Hit the buton "Save and generate".

  1. Select the buton "Yes"
  2. The application is being built
  3. You will see an error at the end of this process.
  4. The Database was created with success
  5. Try to build and RUN the HttpApi.Host manually using Visual Studio 2022 (same used for other projects), selecting this project and using CRTL+F5
  6. See the error presented by Visual Studio during the Build process.
  7. Read the Error description after this process

Severity Code Description Project File Line Suppression State Error CS1061 'IServiceCollection' does not contain a definition for 'ForwardIdentityAuthenticationForBearer' and no accessible extension method 'ForwardIdentityAuthenticationForBearer' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?) MyApp.HttpApi.Host D:\Data\visualstudio\MyApp\src\MyApp.HttpApi.Host\MyAppHttpApiHostModule.cs 157 Active

I´ve tried to create this app many times, without success. ABP Suite only works fine if the feature "Public Web Site" is selected in the begining of the process. I have other applications created with sucess if the feature "Public Web Site" is selectec. I´m trying to create a new application withou "Public Web Site" because I do want to avoid to install Redis Cache, required by the Public Web Site.

I believe this is an error injected recently in the ABP Suite.


2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    We fixed that in the next patch version. You can add using Microsoft.AspNetCore.Extensions.DependencyInjection; to MyAppHttpApiHostModule now.

  • User Avatar
    0
    chrisalves created

    using Microsoft.AspNetCore.Extensions.DependencyInjection

    Thanks. I added this "Using" and now it is building correctly.

    Thanks

Made with ❤️ on ABP v9.1.0-preview. Updated on December 05, 2024, 12:19