2...
private void ConfigurePages(IConfiguration configuration)
{
Configure<RazorPagesOptions>(options =>
{
options.Conventions.AuthorizePage("/HostDashboard", ITXPermissions.Dashboard.Host);
options.Conventions.AuthorizePage("/TenantDashboard", ITXPermissions.Dashboard.Tenant);
options.Conventions.AuthorizePage("/TravelDashboard", ITXPermissions.Dashboard.Travel);
options.Conventions.AuthorizePage("/MyDashboard", ITXPermissions.Dashboard.MyDashboard);
options.Conventions.AuthorizePage("/GeoNames/Index", ITXPermissions.GeoNames.Default);
options.Conventions.AuthorizePage("/Workflows/Index", ITXPermissions.Workflows.Default);
options.Conventions.AuthorizePage("/TableKeys/Index", ITXPermissions.TableKeys.Default);
options.Conventions.AuthorizePage("/SegmentCategories/Index", ITXPermissions.SegmentCategories.Default);
options.Conventions.AuthorizePage("/DueDateMethods/Index", ITXPermissions.DueDateMethods.Default);
options.Conventions.AuthorizePage("/Currencies/Index", ITXPermissions.Currencies.Default);
options.Conventions.AuthorizePage("/Companies/Index", ITXPermissions.Companies.Default);
options.Conventions.AuthorizePage("/CategoryTypes/Index", ITXPermissions.CategoryTypes.Default);
options.Conventions.AuthorizePage("/BookingInfos/Index", ITXPermissions.BookingInfos.Default);
options.Conventions.AuthorizePage("/Assistants/Index", ITXPermissions.Assistants.Default);
options.Conventions.AuthorizePage("/Proxies/Index", ITXPermissions.Proxies.Default);
options.Conventions.AuthorizePage("/Segment01s/Index", ITXPermissions.Segment01s.Default);
options.Conventions.AuthorizePage("/Segment02s/Index", ITXPermissions.Segment02s.Default);
options.Conventions.AuthorizePage("/Segment03s/Index", ITXPermissions.Segment03s.Default);
options.Conventions.AuthorizePage("/Segment04s/Index", ITXPermissions.Segment04s.Default);
options.Conventions.AuthorizePage("/Segment05s/Index", ITXPermissions.Segment05s.Default);
options.Conventions.AuthorizePage("/Segment06s/Index", ITXPermissions.Segment06s.Default);
options.Conventions.AuthorizePage("/Segment07s/Index", ITXPermissions.Segment07s.Default);
options.Conventions.AuthorizePage("/Segment08s/Index", ITXPermissions.Segment08s.Default);
options.Conventions.AuthorizePage("/Segment09s/Index", ITXPermissions.Segment09s.Default);
options.Conventions.AuthorizePage("/AccountSegments/Index", ITXPermissions.AccountSegments.Default);
options.Conventions.AuthorizePage("/Employees/Index", ITXPermissions.Employees.Default);
options.Conventions.AuthorizePage("/TaxTypes/Index", ITXPermissions.TaxTypes.Default);
options.Conventions.AuthorizePage("/TravelRequests/Index", ITXPermissions.TravelRequests.Default);
options.Conventions.AuthorizePage("/TravelTaxes/Index", ITXPermissions.TravelTaxes.Default);
options.Conventions.AuthorizePage("/TravelCosts/Index", ITXPermissions.TravelCosts.Default);
options.Conventions.AuthorizePage("/CostAllocations/Index", ITXPermissions.CostAllocations.Default);
options.Conventions.AuthorizePage("/TravelApprovals/Index", ITXPermissions.TravelApprovals.Default);
options.Conventions.AuthorizePage("/ResvoyageSettingss/Index", ITXPermissions.ResvoyageSettingss.Default);
options.Conventions.AuthorizePage("/Travellers/Index", ITXPermissions.Travellers.Default);
options.Conventions.AuthorizePage("/TravelBookings/Index", ITXPermissions.TravelBookings.Default);
options.Conventions.AuthorizePage("/Categories/Index", ITXPermissions.Categories.Default);
options.Conventions.AuthorizePage("/ReportGroups/Index", ITXPermissions.ReportGroups.Default);
options.Conventions.AuthorizePage("/ExchangeRates/Index", ITXPermissions.ExchangeRates.Default);
options.Conventions.AuthorizePage("/Items/Index", ITXPermissions.Items.Default);
options.Conventions.AuthorizePage("/Customers/Index", ITXPermissions.Customers.Default);
options.Conventions.AuthorizePage("/Suppliers/Index", ITXPermissions.Suppliers.Default);
options.Conventions.AuthorizePage("/Trips/Index", ITXPermissions.Trips.Default);
options.Conventions.AuthorizePage("/RequestSegments/Index", ITXPermissions.RequestSegments.Default);
options.Conventions.AuthorizePage("/Accounts/Index", ITXPermissions.Accounts.Default);
options.Conventions.AuthorizePage("/Requests/Index", ITXPermissions.Requests.Default);
options.Conventions.AuthorizePage("/TrAuditTrails/Index", ITXPermissions.TrAuditTrails.Default);
options.Conventions.AuthorizePage("/AirportCodes/Index", ITXPermissions.AirportCodes.Default);
options.Conventions.AuthorizePage("/FlightSegments/Index", ITXPermissions.FlightSegments.Default);
options.Conventions.AuthorizePage("/HotelSegments/Index", ITXPermissions.HotelSegments.Default);
options.Conventions.AuthorizePage("/CarSegments/Index", ITXPermissions.CarSegments.Default);
options.Conventions.AuthorizePage("/Countries/Index", ITXPermissions.Countries.Default);
options.Conventions.AuthorizePage("/ApprovalRules/Index", ITXPermissions.ApprovalRules.Default);
options.Conventions.AuthorizePage("/CostAllocationDefaults/Index", ITXPermissions.CostAllocationDefaults.Default);
options.Conventions.AuthorizePage("/BookingRequests/Index", ITXPermissions.BookingRequests.Default);
options.Conventions.AuthorizePage("/Associates/Index", ITXPermissions.Associates.Default);
options.Conventions.AuthorizePage("/SegmentAccounts/Index", ITXPermissions.SegmentAccounts.Default);
options.Conventions.AuthorizePage("/TravellerProfiles/Index", ITXPermissions.TravellerProfiles.Default);
options.Conventions.AuthorizePage("/ExpenseTypes/Index", ITXPermissions.ExpenseTypes.Default);
options.Conventions.AuthorizePage("/PaymentTypes/Index", ITXPermissions.PaymentTypes.Default);
options.Conventions.AuthorizePage("/TravelExpenses/Index", ITXPermissions.TravelExpenses.Default);
options.Conventions.AuthorizePage("/ExpenseItems/Index", ITXPermissions.ExpenseItems.Default);
options.Conventions.AuthorizePage("/Notes/Index", ITXPermissions.Notes.Default);
options.Conventions.AuthorizePage("/Attachments/Index", ITXPermissions.Attachments.Default);
options.Conventions.AuthorizePage("/TravelDataWarehouses/Index", ITXPermissions.TravelDataWarehouses.Default);
options.Conventions.AuthorizePage("/AccountingPeriods/Index", ITXPermissions.AccountingPeriods.Default);
options.Conventions.AuthorizePage("/Notifications/Index", ITXPermissions.Notifications.Default);
options.Conventions.AuthorizePage("/TenantsAssociations/Index", ITXPermissions.TenantsAssociations.Default);
options.Conventions.AuthorizePage("/MarketPlaces/Index", ITXPermissions.MarketPlaces.Default);
});
}
private void ConfigureUrls(IConfiguration configuration)
{
Configure<AppUrlOptions>(options =>
{
options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
});
}
private void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration)
{
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear();
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Add("sub", ClaimTypes.NameIdentifier);
context.Services.AddAuthentication()
.AddJwtBearer(options =>
{
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]);
options.Audience = "ITX";
})
.AddOpenIdConnect("AzureOpenId", "Microsoft", options =>
{
options.Authority = "https://login.microsoftonline.com/" + configuration["AzureAd:TenantId"] + "/v2.0/";
options.ClientId = configuration["AzureAd:ClientId"];
options.ResponseType = OpenIdConnectResponseType.CodeIdToken;
options.CallbackPath = configuration["AzureAd:CallbackPath"];
options.ClientSecret = configuration["AzureAd:ClientSecret"];
options.RequireHttpsMetadata = false;
options.SaveTokens = true;
options.GetClaimsFromUserInfoEndpoint = true;
options.Scope.Add("email");
options.ClaimActions.MapJsonKey(ClaimTypes.NameIdentifier, "sub");
});
}
private void ConfigureAutoMapper()
{
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<ITXWebModule>();
});
}
private void ConfigureVirtualFileSystem(IWebHostEnvironment hostingEnvironment)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<ITXWebModule>();
if (hostingEnvironment.IsDevelopment())
{
options.FileSets.ReplaceEmbeddedByPhysical<ITXDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}ITX.Domain.Shared", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<ITXDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}ITX.Domain", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<ITXApplicationContractsModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}ITX.Application.Contracts", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<ITXApplicationModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}ITX.Application", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<ITXHttpApiModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}ITX.HttpApi", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<ITXWebModule>(hostingEnvironment.ContentRootPath);
}
});
}
Hi
Thanks
The page won't submit with the file contents. content too long.
Will add a few posts
1...
using System.IO;
using Microsoft.AspNetCore.Authentication.Google;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using ITX.EntityFrameworkCore;
using ITX.Localization;
using ITX.MultiTenancy;
using ITX.Permissions;
using ITX.Web.Menus;
using Microsoft.OpenApi.Models;
using Volo.Abp;
using Volo.Abp.Account.Admin.Web;
using Volo.Abp.Account.Public.Web;
using Volo.Abp.Account.Public.Web.ExternalProviders;
using Volo.Abp.Account.Web;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.AspNetCore.Mvc.UI;
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Commercial;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.AuditLogging.Web;
using Volo.Abp.Autofac;
using Volo.Abp.AutoMapper;
using Volo.Abp.Identity.Web;
using Volo.Abp.IdentityServer.Web;
using Volo.Abp.LanguageManagement;
using Volo.Abp.LeptonTheme.Management;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.Web;
using Volo.Abp.TextTemplateManagement.Web;
using Volo.Abp.UI.Navigation.Urls;
using Volo.Abp.UI;
using Volo.Abp.UI.Navigation;
using Volo.Abp.VirtualFileSystem;
using Volo.Saas.Host;
using System;
using Microsoft.AspNetCore.Authentication.MicrosoftAccount;
using Microsoft.AspNetCore.Authentication.Twitter;
using ITX.Web.HealthChecks;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars;
using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.Swashbuckle;
using Volo.CmsKit.Pro.Admin.Web;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling;
using ITX.Web.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook;
using ITX.Web.Components.SyncfusionJs;
using ITX.Web.Components.CustomJS;
using Volo.Abp.Auditing;
using Volo.Chat;
using Volo.Chat.Web;
using Bidvest.Web;
using Thomalex.Web;
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
using Microsoft.IdentityModel.Protocols.OpenIdConnect;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Microsoft.AspNetCore.Authentication;
using System.Linq;
using Microsoft.AspNetCore.Cors;
using ITX.Web.Pages.Shared.Components.Notification;
//using Volo.Abp.TextTemplating;
namespace ITX.Web
{
[DependsOn(
typeof(ITXHttpApiModule),
typeof(ITXApplicationModule),
typeof(ITXEntityFrameworkCoreDbMigrationsModule),
typeof(AbpAutofacModule),
typeof(AbpIdentityWebModule),
typeof(AbpAccountPublicWebIdentityServerModule),
typeof(AbpAuditLoggingWebModule),
typeof(LeptonThemeManagementWebModule),
typeof(SaasHostWebModule),
typeof(AbpAccountAdminWebModule),
typeof(AbpIdentityServerWebModule),
typeof(LanguageManagementWebModule),
typeof(AbpAspNetCoreMvcUiLeptonThemeModule),
typeof(TextTemplateManagementWebModule),
typeof(CmsKitProAdminWebModule),
typeof(AbpSwashbuckleModule),
typeof(AbpAspNetCoreSerilogModule)
)]
[DependsOn(typeof(ChatSignalRModule))]
[DependsOn(typeof(ChatWebModule))]
[DependsOn(typeof(AbpAccountPublicWebModule))]
[DependsOn(typeof(BidvestWebModule))]
[DependsOn(typeof(ThomalexWebModule))]
//[DependsOn(typeof(AbpTextTemplatingModule))]
public class ITXWebModule : AbpModule
{
private const string DefaultCorsPolicyName = "Default";
public override void PreConfigureServices(ServiceConfigurationContext context)
{
context.Services.PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options =>
{
options.AddAssemblyResource(
typeof(ITXResource),
typeof(ITXDomainModule).Assembly,
typeof(ITXDomainSharedModule).Assembly,
typeof(ITXApplicationModule).Assembly,
typeof(ITXApplicationContractsModule).Assembly,
typeof(ITXWebModule).Assembly
);
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
ConfigureBundles();
ConfigureUrls(configuration);
ConfigurePages(configuration);
ConfigureAuthentication(context, configuration);
ConfigureAutoMapper();
ConfigureVirtualFileSystem(hostingEnvironment);
ConfigureNavigationServices();
ConfigureAutoApiControllers();
ConfigureCors(context, configuration);
ConfigureSwaggerServices(context.Services);
ConfigureExternalProviders(context);
ConfigureHealthChecks(context);
Configure<AbpBundlingOptions>(options =>
{
options
.StyleBundles
.Get(StandardBundles.Styles.Global)
.AddContributors(typeof(SyncfusionStyleContributor))
.AddContributors(typeof(CustomStyleContributor));
});
Configure<AbpLayoutHookOptions>(options =>
{
options.Add(
LayoutHooks.Head.Last,
typeof(SyncfusionJsViewComponent)
);
options.Add(
LayoutHooks.Head.Last,
typeof(CustomJsViewComponent)
);
});
Configure<AbpAuditingOptions>(options =>
{
options.IsEnabled = true; //Disables the auditing system = false
});
}
private void ConfigureHealthChecks(ServiceConfigurationContext context)
{
context.Services.AddITXHealthChecks();
}
private void ConfigureBundles()
{
Configure<AbpBundlingOptions>(options =>
{
options.StyleBundles.Configure(
LeptonThemeBundles.Styles.Global,
bundle =>
{
bundle.AddFiles("/global-styles.css");
}
);
});
}
Hi
Please cee code below
Thanks.
split into 3 posts
Thanks, This is working again
All the best Tony
The same problem with the account module
When upgrading to version 6.3 - the code has an Error CS0534 namespace Volo.Abp.Account.Public.Web.Ldap; 'LdapExternalLoginProvider' does not implement inherited abstract member 'ExternalLoginProviderBase.IsEnabledAsync()' Volo.Abp.Account.Pro.Public.Web ...\modules\Volo.Account.Pro\src\Volo.Abp.Account.Pro.Public.Web\Ldap\LdapExternalLoginProvider.cs 19 Active
I can't download the Account Module source code to see what has changed.
CLI abp add-module Volo.Account.Pro reports all ok, but only created modules in a new project
Thanks, I wont use shared data tables.
I will look at Distributed Event again.
I don't see yet how this will work with SignalR to send multiple notifications to multiple UI elements.
My goal was to centralize all chats, chat bots and in app notifications to the user.
Regards Tony
So many breaking changes, all over the place.
I have been dreading updating to .net core 6 and ABP.IO version 5.x This is the third attempt. It took 4 days to move to .net core 5 and AMB.IO version 4.x Going to take a week to fix all the modal functionality that no longer works.
**PLEASE **fix my access to the source code : The user "anthony.albutt@gmail.com" has no active ABP Commercial license!
Have a good one. Regards Tony
I found the Volo Account and Lepton modules in new location
After replacing all files for account and implementing my changes, and replacing all Version="$(MicrosoftPackageVersion)" with correct version, I how get the application to run and the web browser to display the Lepton theme errors to display the bootstrap5 errors.
Next step is to move lepton module file and re-implement my custom theme.
Working again Custom themes are a bust. Will have to re-create them