@inherits LayoutComponentBase
MP.Mon
An unhandled error has occurred.
Reload
🗙
@code{
[Inject]
protected NavigationManager NavMan { get; set; } = null!;
[Inject]
protected IConfiguration config { get; set; } = null!;
protected override void OnInitialized()
{
// controllo URL x riscrivere se non fosse /MP/MON finale...
string baseUrl = config.GetValue("ServerConf:BaseAppPath") ?? "/MP/MON/";
string wrongEnd = baseUrl.Substring(0, baseUrl.Length - 1);
string currUrl = NavMan.Uri;
if(currUrl.EndsWith(wrongEnd))
{
NavMan.NavigateTo(baseUrl, true);
}
// base.OnInitialized();
var currAssembly = typeof(Program).Assembly.GetName();
version = currAssembly.Version != null ? currAssembly.Version : new Version();
}
///
/// Versione applicativo ada passare al controllo footer
///
private Version version = null!;
}