Adding the [Authorize] attribute on the home controller eliminates the need to manually navigate to the login page. Since the Swagger UI cannot be used without logging in, you might as well add Authorize.
Ok. That works, but it is not obvious. Why not implement the Security Definition and Security Requirements for Swagger in the default template?
Here is the list of packages from my Application project. Keep in mind, we are not using MongoDb.
<ItemGroup>
<PackageReference Include="Volo.Abp.Account.Pro.Shared.Application" Version="3.3.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="3.3.1" />
<PackageReference Include="Volo.Abp.FeatureManagement.Application" Version="3.3.1" />
<PackageReference Include="Volo.Saas.Host.Application" Version="3.3.1" />
<PackageReference Include="Volo.Abp.AuditLogging.Application" Version="3.3.1" />
<PackageReference Include="Volo.Abp.Identity.Pro.Application" Version="3.3.1" />
<PackageReference Include="Volo.Abp.IdentityServer.Application" Version="3.3.1" />
<PackageReference Include="Volo.Abp.Account.Pro.Public.Application" Version="3.3.1" />
<PackageReference Include="Volo.Abp.Account.Pro.Admin.Application" Version="3.3.1" />
<PackageReference Include="Volo.Abp.LanguageManagement.Application" Version="3.3.1" />
<PackageReference Include="Volo.Abp.TextTemplateManagement.Application" Version="3.3.1" />
<PackageReference Include="Volo.Abp.LeptonTheme.Management.Application" Version="3.3.1" />
</ItemGroup>
I commented out all tests and then started adding tests 1 at a time. The process works for 2 tests (any two), but the process starts showing errors when adding a 3rd test (any item). With 3 tests, it works sometimes and fails others. Very inconsistent, but it fails more than it succeeds. Adding a 4th test caused it to fail every time.
An example test case is shown below
public class ClassificationSubcategoryAppServiceTests : SynergyzApplicationTestBase
{
private readonly IClassificationSubcategoryAppService _classificationSubcategoryAppService;
private readonly IRepository<ClassificationSubcategory, int> _classificationSubcategoryRepository;
public ClassificationSubcategoryAppServiceTests()
{
_classificationSubcategoryAppService = GetRequiredService<IClassificationSubcategoryAppService>();
_classificationSubcategoryRepository = GetRequiredService<IRepository<ClassificationSubcategory, int>>();
}
[Fact]
public async Task GetListAsync()
{
// Act
var result = await _classificationSubcategoryAppService.GetListAsync(new GetClassificationSubcategoriesInput());
// Assert
result.TotalCount.ShouldBe(2);
result.Items.Count.ShouldBe(2);
result.Items.Any(x => x.Id == 2069964284).ShouldBe(true);
result.Items.Any(x => x.Id == 268848218).ShouldBe(true);
}
[Fact]
public async Task GetAsync()
{
// Act
var result = await _classificationSubcategoryAppService.GetAsync(2069964284);
// Assert
result.ShouldNotBeNull();
result.Id.ShouldBe(2069964284);
}
[Fact]
public async Task CreateAsync()
{
// Arrange
var input = new ClassificationSubcategoryCreateDto
{
Name = "b8aa10058749413fae20f5b21834f142e59c87e73ce8405d84ba798226f9eaed1a01fc330d1a4d91be561a465f9a47416045dfe08b7244ecbab46087feebdee2b5736e43a58846d78e1562a9ea5184caa69534d8d5174b0cb9ec4aede460d6f02d7f18040bd14bf8b69c8d2a6c8a68d575b65716869c4a0aa7e3a1683595dbd",
Definition = "989",
CedsFlag = true
};
// Act
var serviceResult = await _classificationSubcategoryAppService.CreateAsync(input);
// Assert
var result = await _classificationSubcategoryRepository.FindAsync(c => c.Id == serviceResult.Id);
result.ShouldNotBe(null);
result.Name.ShouldBe("b8aa10058749413fae20f5b21834f142e59c87e73ce8405d84ba798226f9eaed1a01fc330d1a4d91be561a465f9a47416045dfe08b7244ecbab46087feebdee2b5736e43a58846d78e1562a9ea5184caa69534d8d5174b0cb9ec4aede460d6f02d7f18040bd14bf8b69c8d2a6c8a68d575b65716869c4a0aa7e3a1683595dbd");
result.Definition.ShouldBe("989");
result.CedsFlag.ShouldBe(true);
}
[Fact]
public async Task UpdateAsync()
{
// Arrange
var input = new ClassificationSubcategoryUpdateDto()
{
Name = "9eb166489eb44c869edebebd65472cabd7abbdb868f44c22b6e2f236b6297a49366cab5647944c9a93bb7c892580f81310d6952b0a0d4b99a085f3e528eda76974d6586f55724aa6ac7545b0629885be4c5aeac1d89d46d190ae3e5ebf40d5b5ce5316e81da3466c931807bac703a899c9021cc6e867497191522bd8e0355d1",
Definition = "58f",
CedsFlag = true
};
// Act
var serviceResult = await _classificationSubcategoryAppService.UpdateAsync(2069964284, input);
// Assert
var result = await _classificationSubcategoryRepository.FindAsync(c => c.Id == serviceResult.Id);
result.ShouldNotBe(null);
result.Name.ShouldBe("9eb166489eb44c869edebebd65472cabd7abbdb868f44c22b6e2f236b6297a49366cab5647944c9a93bb7c892580f81310d6952b0a0d4b99a085f3e528eda76974d6586f55724aa6ac7545b0629885be4c5aeac1d89d46d190ae3e5ebf40d5b5ce5316e81da3466c931807bac703a899c9021cc6e867497191522bd8e0355d1");
result.Definition.ShouldBe("58f");
result.CedsFlag.ShouldBe(true);
}
[Fact]
public async Task DeleteAsync()
{
// Act
await _classificationSubcategoryAppService.DeleteAsync(2069964284);
// Assert
var result = await _classificationSubcategoryRepository.FindAsync(c => c.Id == 2069964284);
result.ShouldBeNull();
}
}
The project was created using ABP Suite version 3.1 and then upgraded to 3.3.1. Creating a sample project using the 3.3 framework does not seem to reproduce the problem.
I have not seen an answer about account linking. Is the Account linking UI available in the Angular solution? If not, when is it projected to be delivered?
After upgrading to 3.3, the account linking is not showing up. Neither do I see the option if I create a new angular based solution with 3.3. The API endpoints exist, but no UI. This leads me to think the UI is not available yet for Angular, or there is a missing setup step needed.
After upgrading to 3.3, I was expecting to see the Linked User account managment option. However, I do not see any linked user components in the UI. We are not using social logins, just in case that is a related issue.
Account Management screen https://www.screencast.com/t/HSnTFbmENbAV
User Profile screen https://www.screencast.com/t/3Zi2parvX
Exception when attempting to run all Application Tests
Note, they run when executed one application service at a time, but fail if I try to run all the tests. I did a little searching on the support forums but did not see anything I thought was relevant. This project was created on 3.0 and then upgraded to 3.1.
Volo.Abp.AbpInitializationException : An error occurred during PostConfigureServices phase of the module Volo.Saas.Host.SaasHostApplicationContractsModule, Volo.Saas.Host.Application.Contracts, Version=3.1.2.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details. ---- System.InvalidOperationException : Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.
Stack Trace:
AbpApplicationBase.ConfigureServices()
AbpApplicationBase.ctor(Type startupModuleType, IServiceCollection services, Action1 optionsAction) AbpApplicationWithExternalServiceProvider.ctor(Type startupModuleType, IServiceCollection services, Action
1 optionsAction)
AbpApplicationFactory.Create(Type startupModuleType, IServiceCollection services, Action1 optionsAction) AbpApplicationFactory.Create[TStartupModule](IServiceCollection services, Action
1 optionsAction)
ServiceCollectionApplicationExtensions.AddApplication[TStartupModule](IServiceCollection services, Action1 optionsAction) AbpIntegratedTest
1.ctor()
SynergyzTestBase1.ctor() SynergyzApplicationTestBase.ctor() ClassificationCategoryAppServiceTests.ctor() line 14 ----- Inner Stack Trace ----- Dictionary
2.FindEntry(TKey key)
Dictionary2.TryGetValue(TKey key, TValue& value) AbpDictionaryExtensions.GetOrAdd[TKey,TValue](IDictionary
2 dictionary, TKey key, Func2 factory) AbpDictionaryExtensions.GetOrAdd[TKey,TValue](IDictionary
2 dictionary, TKey key, Func1 factory) ObjectExtensionInfo.AddOrUpdateProperty(Type propertyType, String propertyName, Action
1 configureAction)
<>c__DisplayClass3_0.<AddOrUpdateProperty>b__0(ObjectExtensionInfo options)
ObjectExtensionManager.AddOrUpdate(Type type, Action1 configureAction) ObjectExtensionManagerExtensions.AddOrUpdateProperty(ObjectExtensionManager objectExtensionManager, Type objectType, Type propertyType, String propertyName, Action
1 configureAction)
ObjectExtensionManagerExtensions.AddOrUpdateProperty(ObjectExtensionManager objectExtensionManager, Type[] objectTypes, Type propertyType, String propertyName, Action`1 configureAction)
ModuleExtensionConfigurationHelper.ApplyPropertyConfigurationToTypes(ExtensionPropertyConfiguration propertyConfig, Type[] types)
ModuleExtensionConfigurationHelper.ApplyEntityConfigurationToApi(String moduleName, String objectName, Type[] getApiTypes, Type[] createApiTypes, Type[] updateApiTypes)
SaasHostApplicationContractsModule.PostConfigureServices(ServiceConfigurationContext context)
AbpApplicationBase.ConfigureServices()
I have two additional notes on this issue.
It looks like the footer is not a replaceable component. We would have to replace the entire layout to change the footer. This adds a lot of unnecessary work from my perspective. Please consider making the footer a replaceable component.
The copyright information is showing the application name. However, copyright notices need to show the company name instead of the application name. The name of the company which would show here needs to be a localized string from the resource file of the project.
Thank you! With the additional information, the page works as expected.
Following those instructions does not address the issues. Take a look at the screenshot of what I see after following the provided instructions.
None of these items are in the login page. I am guessing they are in the layout page.
Following the instructions does not yield the desired result.