Activities of "learnabp"

The template which is being downloaded for the Basic-Theme has a lot of issues which need resolving after it has been added to the solution

The Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj file show contacing the following packages

<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.4.0" />
<PackageReference Include="Volo.Abp.Autofac" Version="4.4.0" />
<PackageReference Include="Volo.Abp.AspNetCore.TestBase" Version="4.4.0" />
<PackageReference Include="NSubstitute" Version="4.2.2" />
<PackageReference Include="Shouldly" Version="4.0.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.extensibility.execution" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkPackageVersion)" />

especially the following

<PackageReference Include="Volo.Abp.AspNetCore.Tests" Version="4.4.0" />

should be replaced with

<PackageReference Include="Volo.Abp.AspNetCore.TestBase" Version="4.4.0" />

the following lines also need to be added to AbpAspNetCoreMvcUiBootstrapDemoTestBase.cs file of Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj project

public abstract class AbpAspNetCoreMvcUiBootstrapDemoTestBase : AbpAspNetCoreTestBase<TestStartup>

to

public abstract class AbpAspNetCoreMvcUiBootstrapDemoTestBase : AbpAspNetCoreIntegratedTestBase<TestStartup>

the following lines also need to be added to AbpAspNetCoreMvcUiBootstrapDemoTestBase.cs file of Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj project

    protected virtual async Task&lt;string&gt; GetResponseAsStringAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK)
    {
        using (var response = await GetResponseAsync(url, expectedStatusCode))
        {
            return await response.Content.ReadAsStringAsync();
        }
    }

    protected virtual async Task&lt;HttpResponseMessage&gt; GetResponseAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK)
    {
        using (var requestMessage = new HttpRequestMessage(HttpMethod.Get, url))
        {
            requestMessage.Headers.Add("Accept-Language", CultureInfo.CurrentUICulture.Name);
            var response = await Client.SendAsync(requestMessage);
            response.StatusCode.ShouldBe(expectedStatusCode);
            return response;
        }
    }

the file AbpAspNetCoreMvcUiBootstrapDemoTestBase.cs should be as follows

using System;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Shouldly;
using Volo.Abp.AspNetCore.TestBase;

namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo
{
    public abstract class AbpAspNetCoreMvcUiBootstrapDemoTestBase : AbpAspNetCoreIntegratedTestBase<TestStartup>
    {
        protected override IHostBuilder CreateHostBuilder()
        {
            return base.CreateHostBuilder()
                .UseContentRoot(CalculateContentRootPath());
        }

        private static string CalculateContentRootPath()
        {
            return CalculateContentRootPath(
                "Volo.Abp.sln",
                $"test{Path.DirectorySeparatorChar}Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo"
            );
        }

        private static string CalculateContentRootPath(
            string testFileNameInTheRootFolder,
            string relativeContentPath)
        {
            var currentDirectory = Directory.GetCurrentDirectory();
            while (!ContainsFile(currentDirectory, testFileNameInTheRootFolder))
            {
                currentDirectory = new DirectoryInfo(currentDirectory).Parent.FullName;
            }

            if (!relativeContentPath.IsNullOrWhiteSpace())
            {
                currentDirectory = Path.Combine(currentDirectory, relativeContentPath);
            }

            return currentDirectory;
        }

        private static bool ContainsFile(string currentDirectory, string projectFileName)
        {
            return Directory
                .GetFiles(currentDirectory, "*.*", SearchOption.TopDirectoryOnly)
                .Any(f => Path.GetFileName(f) == projectFileName);
        }

        protected virtual async Task<string> GetResponseAsStringAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK)
        {
            using (var response = await GetResponseAsync(url, expectedStatusCode))
            {
                return await response.Content.ReadAsStringAsync();
            }
        }

        protected virtual async Task<HttpResponseMessage> GetResponseAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK)
        {
            using (var requestMessage = new HttpRequestMessage(HttpMethod.Get, url))
            {
                requestMessage.Headers.Add("Accept-Language", CultureInfo.CurrentUICulture.Name);
                var response = await Client.SendAsync(requestMessage);
                response.StatusCode.ShouldBe(expectedStatusCode);
                return response;
            }
        }

    }
}

Please return my ticket

let me know when you have fixed basic-theme template so I can add it to my solution again and test

  • ABP Framework version: v4.0.0

  • UI type: MVC

  • DB provider: EF Core

  • Tiered (MVC) or Identity Server Separated (Angular): no

  • Exception message and stack trace:

Severity Code Description Project File Line Suppression State Error NU1101 Unable to find package Volo.Abp.AspNetCore.Tests. No packages exist with this id in source(s): ABP Commercial NuGet Source, BlazoriseMyGet, Microsoft Visual Studio Offline Packages, nuget.org Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests C:\LearnAbp\440\Acme.Bookstore\modules\Volo.BasicTheme\test\Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests\Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj 1

  • Steps to reproduce the issue:"

Created new 4.4.0 using app template and then tried to add the basic-theme scourcecode using the following command

C:\LearnAbp\440\Acme.Bookstore>abp add-module Volo.BasicTheme --with-source-code --add-to-solution-file

it seems it can't find Volo.Abp.AspNetCore.Tests nuget package

please help trying to create a preview video to demo new funtionality of 4.4.0

can i please have a response from ABP still can't get the menu system working when Redis is on in the *Public.Web looks like the *.Web doesn't have Redis configuration even after adding Redis to the *.Web project it doesn't work

Can we please have a response from someone from ABP??

We we have to build our own page to create the tenant .... looks like the subscription system you have built is for tenant that are mannually created and why can the tenant specify his own payment gateway shouldn't this be restricted to the Host??

When redis is on it doesn't work ... when redis is off it works

I have redis installed ... and is it right that the *.Web project doesn't use redis and only the *.Public.Web project uses redis??

Hi learnabp

Are you using same Redis for your Web & Web.Public projects?

No ... I am not using Redis on the *.Web Or *Public.Web projects we have commented it out in the COnfigure Method.

In fact the template doesn't have redis on the **.Web project but it is commented out in *.Public.Web project

Cofigure Method of *.Web

Configure Method of *.Public.Web

Dont really understand how ABP has build the Subscription & Payment System!

the documentation is no good in explaining how it is implemented!

How can a tenant be created using subscrition & payment from the Public Site ??

Also why is the Payment Menu shown in a Tenant where they can add payment gateway? shouldn't it only be avalible to the host??

see below i am logged in as a "Test Tenant" and i can see the Payment Menu and can change the Plans as a Tenant admin

  • ABP Framework version: v4.0.0

  • UI type: MVC

  • DB provider: EF Core

  • Tiered (MVC) or Identity Server Separated (Angular): no

  • Steps to reproduce the issue:"

  1. Create a new template from abp suite
  2. Went to Menu created a root menu item
  3. the menu time doesn't appear in the public site

The Cmskit is enabled in the Domain.Shared module

please see below images

OKay what ever you did now workings

can you explain what was wrong?

I am able to download the source now

2021-08-13 22:36:28.000 +10:00 [ERR] Error occured while getting the source code for Volo.Payment v4.4.0 - System.Text.Json.JsonException: '<' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
 ---> System.Text.Json.JsonReaderException: '<' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
   at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
   at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker)
   at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first)
   at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
   at System.Text.Json.Utf8JsonReader.Read()
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   --- End of inner exception stack trace ---
   at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadCore[TValue](Utf8JsonReader& reader, Type returnType, JsonSerializerOptions options)
   at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, Type returnType, JsonSerializerOptions options)
   at Volo.Abp.Json.SystemTextJson.AbpSystemTextJsonSerializerProvider.Deserialize[T](String jsonString, Boolean camelCase) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Json\Volo\Abp\Json\SystemTextJson\AbpSystemTextJsonSerializerProvider.cs:line 34
   at Volo.Abp.Json.AbpHybridJsonSerializer.Deserialize[T](String jsonString, Boolean camelCase) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Json\Volo\Abp\Json\AbpHybridJsonSerializer.cs:line 37
   at Volo.Abp.Cli.ProjectBuilding.RemoteServiceExceptionHandler.GetAbpRemoteServiceErrorAsync(HttpResponseMessage responseMessage) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\RemoteServiceExceptionHandler.cs:line 52
   at Volo.Abp.Cli.ProjectBuilding.RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(HttpResponseMessage responseMessage) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\RemoteServiceExceptionHandler.cs:line 38
   at Volo.Abp.Cli.ProjectBuilding.AbpIoSourceCodeStore.DownloadSourceCodeContentAsync(SourceCodeDownloadInputDto input) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\AbpIoSourceCodeStore.cs:line 220
   at Volo.Abp.Cli.ProjectBuilding.AbpIoSourceCodeStore.GetAsync(String name, String type, String version, String templateSource, Boolean includePreReleases) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\AbpIoSourceCodeStore.cs:line 112
   at Volo.Abp.Cli.ProjectBuilding.ModuleProjectBuilder.BuildAsync(ProjectBuildArgs args) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectBuilding\ModuleProjectBuilder.cs:line 48
   at Volo.Abp.Cli.Commands.Services.SourceCodeDownloadService.DownloadModuleAsync(String moduleName, String outputFolder, String version, String gitHubAbpLocalRepositoryPath, String gitHubVoloLocalRepositoryPath, AbpCommandLineOptions options) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\Services\SourceCodeDownloadService.cs:line 40
   at Volo.Abp.Cli.Commands.GetSourceCommand.ExecuteAsync(CommandLineArgs commandLineArgs) in D:\ci\Jenkins\workspace\abp-commercial-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\GetSourceCommand.cs:line 62
   at Volo.Abp.Suite.Controllers.AbpSuiteController.GetSourceAsync(GetSourceInput input)
2021-08-13 22:36:28.038 +10:00 [WRN] ---------- RemoteServiceErrorInfo ----------
{
  "code": null,
  "message": "'<' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.",
  "details": null,
  "data": {},
  "validationErrors": null
}

2021-08-13 22:36:28.039 +10:00 [WRN] '<' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
Volo.Abp.UserFriendlyException: '<' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
   at Volo.Abp.Suite.Controllers.AbpSuiteController.GetSourceAsync(GetSourceInput input)
   at lambda_method2244(Closure , Object )
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
2021-08-13 22:36:28.043 +10:00 [WRN] Code:
2021-08-13 22:36:28.044 +10:00 [WRN] Details:
2021-08-13 22:36:28.049 +10:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Http.RemoteServiceErrorResponse'.
2021-08-13 22:36:28.050 +10:00 [INF] Executed action Volo.Abp.Suite.Controllers.AbpSuiteController.GetSourceAsync (Volo.Abp.Suite) in 2293.3685ms
2021-08-13 22:36:28.050 +10:00 [INF] Executed endpoint 'Volo.Abp.Suite.Controllers.AbpSuiteController.GetSourceAsync (Volo.Abp.Suite)'
2021-08-13 22:36:28.051 +10:00 [INF] Request finished HTTP/1.1 POST http://localhost:3000/api/abpSuite/get-source application/json 84 - 403 - application/json;+charset=utf-8 2296.5217ms

Showing 41 to 50 of 134 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35