Yip, same problem. I have posted some info on your support question.
Yes, I have the same issue. I cannot deploy anymore.
I don't know what's causing the issue? Is it an entity naming issue? I have some entities ending in 01, 02, 03, 04 which caused problems with swagger and generated .js code.
My app is too big to create a new version, and move the code from the current app to a new one with the same name.
I did this once before, more than a year ago, which allowed me to co continue. I have copied all my entities to .\aspnet-core.suite\entities and creating the basic CRUDS and Pages to test deploys.
This may be a futile exercise, but may point to the problem.
I have already run into a AppUser navigations problem. I can't link Employees to an AppUser system account.
Good luck, all the best.
3...
private void ConfigureNavigationServices()
{
Configure<AbpNavigationOptions>(options =>
{
options.MenuContributors.Add(new ITXMenuContributor());
});
Configure<AbpToolbarOptions>(options =>
{
options.Contributors.Add(new ITXToolbarContributor());
});
}
private void ConfigureAutoApiControllers()
{
Configure<AbpAspNetCoreMvcOptions>(options =>
{
options.ConventionalControllers.Create(typeof(ITXApplicationModule).Assembly);
});
}
private void ConfigureSwaggerServices(IServiceCollection services)
{
services.AddSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new OpenApiInfo { Title = "ITX API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
//options.DocumentFilter<HideOrganizationUnitsFilter>();
}
);
}
private void ConfigureExternalProviders(ServiceConfigurationContext context)
{
context.Services.AddAuthentication()
.AddGoogle(GoogleDefaults.AuthenticationScheme, _ => { })
.WithDynamicOptions<GoogleOptions, GoogleHandler>(
GoogleDefaults.AuthenticationScheme,
options =>
{
options.WithProperty(x => x.ClientId);
options.WithProperty(x => x.ClientSecret, isSecret: true);
}
)
.AddMicrosoftAccount(MicrosoftAccountDefaults.AuthenticationScheme, options =>
{
//Personal Microsoft accounts as an example.
options.AuthorizationEndpoint = "https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize";
options.TokenEndpoint = "https://login.microsoftonline.com/consumers/oauth2/v2.0/token";
})
.WithDynamicOptions<MicrosoftAccountOptions, MicrosoftAccountHandler>(
MicrosoftAccountDefaults.AuthenticationScheme,
options =>
{
options.WithProperty(x => x.ClientId);
options.WithProperty(x => x.ClientSecret, isSecret: true);
}
)
.AddTwitter(TwitterDefaults.AuthenticationScheme, options => options.RetrieveUserDetails = true)
.WithDynamicOptions<TwitterOptions, TwitterHandler>(
TwitterDefaults.AuthenticationScheme,
options =>
{
options.WithProperty(x => x.ConsumerKey);
options.WithProperty(x => x.ConsumerSecret, isSecret: true);
}
);
}
private void ConfigureCors(ServiceConfigurationContext context, IConfiguration configuration)
{
context.Services.AddCors(options =>
{
options.AddPolicy(DefaultCorsPolicyName, builder =>
{
builder
.WithOrigins(
configuration["App:CorsOrigins"]
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.RemovePostFix("/"))
.ToArray()
)
.WithAbpExposedHeaders()
.SetIsOriginAllowed(origin => true)
.SetIsOriginAllowedToAllowWildcardSubdomains()
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials()
.Build();
});
});
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseAbpRequestLocalization();
if (!env.IsDevelopment())
{
app.UseErrorPage();
app.UseHsts();
//app.UseBrowserLink();
}
app.UseHttpsRedirection();
app.UseCorrelationId();
app.UseStaticFiles();
app.UseAuthentication();
app.UseCors(DefaultCorsPolicyName);
app.UseRouting();
app.UseJwtTokenMiddleware();
if (MultiTenancyConsts.IsEnabled)
{
app.UseMultiTenancy();
}
app.UseUnitOfWork();
app.UseIdentityServer();
app.UseAuthorization();
app.UseSwagger();
app.UseAbpSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "ITX API");
});
app.UseAuditing();
app.UseAbpSerilogEnrichers();
app.UseConfiguredEndpoints();
}
}
}
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