Reopening issue, please see previous post.
The tenant selection box is showing for both the host and the tenant. If a user navigates to the site using the subdomain the tenant name is automatically populated but still visiable . I did have to change the tenant name to all lowercase to make that work. Setting the isTenantBoxVisible fom the AppModule did not work for me.
I converted the project from v3.0.5 to v3.1.2 and kept the resource owner password authentication.
Hello @mehmet
I was able to get the Angular domain tenant resolver to work in v3.1.2. Is there a way to hide the tenant selection from the login page without recreating the login page?
Created a new project with ABP Suite (Angular, MongoDB, v3.1.2). The CRUD Page Generator will not generate the Angular code if two or more enum properties defined. I tried uninstalling the ABP Suite and reinstalling. Also trried clearing my NuGet cache without success. This was working in v3.0.5.
Any other suggestions?
Hello @mehmet
Thank you for your response. I will wait and test this feature when v3.1 is released.
I am trying to get my Angular UI to set the tenant based on the subdomain. I modified the enviroment.prod.ts file to include a baseUrl.
export const environment = {
//...
application: {
baseUrl: 'https://{0}.mydomain.com/'
},
//...
}
I also tried with and without the following tenant resolver in the Host project:
Configure<AbpTenantResolveOptions>(options =>
{
options.TenantResolvers.Insert(1, new DomainTenantResolveContributor("{0}.mydomain.com"));
});
Abp v3.04/MongoDb/Angular
I am trying to implement this without success. In the HttpApi.Host project I modify ConfigServices to include the domain resolver.
public override void ConfigureServices(ServiceConfigurationContext context)
{
var configuration = context.Services.GetConfiguration();
var hostingEnvironment = context.Services.GetHostingEnvironment();
Configure<AbpTenantResolveOptions>(options =>
{
options.TenantResolvers.Insert(1, new DomainTenantResolveContributor("{0}.localhost"));
});
ConfigureUrls(configuration);
ConfigureConventionalControllers();
ConfigureAuthentication(context, configuration);
ConfigureSwagger(context);
ConfigureLocalization();
ConfigureVirtualFileSystem(context);
ConfigureCors(context, configuration);
}
In my Angular project I update the enviroment.ts file to inlciude a baseUrl.
export const environment = {
production: false,
application: {
baseUrl: 'https://{0}.localhost/',
name: 'Mmg',
},
oAuthConfig: {
issuer: 'https://localhost:44383',
clientId: 'Mmg_App',
dummyClientSecret: '1q2w3e*',
scope: 'Mmg',
showDebugInformation: true,
oidc: false,
requireHttps: true,
},
apis: {
default: {
url: 'https://localhost:44383'
},
},
localization: {
defaultResourceName: 'Mmg',
}
};
http://localhost:4200/ will launch the application successfully. http://demo.localhost:4200/ returns status code 304 with a response of Invalid Host Header. Can you help shed some light on what I missed?
Solved by creating a factory function.
providers: [
{ provide: 'list', useClass: ListService },
{ provide: 'unitMessageList', useClass: ListService },
...]
constructor(
@Inject('list') public readonly list: ListService,
@Inject('unitMessageList') public readonly unitMessageList: ListService,
...
}