got a error.
xxxx> abp add-package Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX
ABP CLI 8.2.2
Installing 'Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX' package to the project 'XTC.License.Web'...
正在确定要还原的项目…
Writing xxxxxxxx\tmpfvyqbq.tmp
info : X.509 certificate chain validation will use the default trust store selected by .NET for code signing.
info : X.509 certificate chain validation will use the default trust store selected by .NET for timestamping.
info : 正在将包“Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX”的 PackageReference 添加到项目“xxxx\XTC.License.Web\XTC.License.Web.csproj”。
info : 正在还原 xxxx\vs2022\src\XTC.License.Web\XTC.License.Web.csproj 的包...
info : GET https://api.nuget.org/v3-flatcontainer/volo.abp.aspnetcore.mvc.ui.theme.leptonx/index.json
info : NotFound https://api.nuget.org/v3-flatcontainer/volo.abp.aspnetcore.mvc.ui.theme.leptonx/index.json 274 毫秒
error: NU1101: 找不到包 Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX。源 C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Packages, nuget.org 中不存在具有此 ID 的包
info : GET https://api.nuget.org/v3/vulnerabilities/index.json
info : OK https://api.nuget.org/v3/vulnerabilities/index.json 176 毫秒
info : GET https://api.nuget.org/v3/vulnerabilities/vulnerability.base.json
info : GET https://api.nuget.org/v3/vulnerabilities/vulnerability.update.json
info : OK https://api.nuget.org/v3/vulnerabilities/vulnerability.base.json 258 毫秒
info : OK https://api.nuget.org/v3/vulnerabilities/vulnerability.update.json 350 毫秒
error: 包“Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX”与项目“E:\github\BaaSo\BaaSo-BusinessUnit-License\vs2022\src\XTC.License.Web\XTC.License.Web.csproj”中的“all”框架不兼容。
Successfully installed.
I logined with my account.
I resolved it, Thanks!
I added your codes, got a exception:
[11:23:24 FTL] Host terminated unexpectedly!
Volo.Abp.AbpInitializationException: An error occurred during the initialize Volo.Abp.Modularity.OnPreApplicationInitializationModuleLifecycleContributor phase of the module XTC.License.LicenseAuthServerModule, XTC.License.AuthServer, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null: An exception was thrown while activating XTC.License.EntityFrameworkCore.AuthServerDbContext.. See the inner exception for details.
---> Autofac.Core.DependencyResolutionException: An exception was thrown while activating XTC.License.EntityFrameworkCore.AuthServerDbContext.
---> Autofac.Core.DependencyResolutionException: None of the constructors found on type 'XTC.License.EntityFrameworkCore.AuthServerDbContext' can be invoked with the available services and parameters:
Cannot resolve parameter 'Microsoft.EntityFrameworkCore.DbContextOptions`1[XTC.License.EntityFrameworkCore.AuthServerDbContext] options' of constructor 'Void .ctor(Microsoft.EntityFrameworkCore.DbContextOptions`1[XTC.License.EntityFrameworkCore.AuthServerDbContext])'.
See https://autofac.rtfd.io/help/no-constructors-bindable for more info.
at Autofac.Core.Activators.Reflection.ReflectionActivator.<>c__DisplayClass14_0.<UseSingleConstructorActivation>b__0(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Middleware.DelegateMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext context)
at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext context)
at Autofac.Builder.RegistrationBuilder`3.<>c__DisplayClass41_0.<PropertiesAutowired>b__0(ResolveRequestContext context, Action`1 next)
So i modify the code to var dbContext = factory.CreateDbContext(null);
, like this:
public async override Task OnPreApplicationInitializationAsync(ApplicationInitializationContext context)
{
using var uow = context.ServiceProvider.GetRequiredService<IUnitOfWorkManager>().Begin();
{
var factory = new AuthServerDbContextFactory();
var dbContext = factory.CreateDbContext(null);
//var dbContext = await context.ServiceProvider.GetRequiredService<IDbContextProvider<AuthServerDbContext>>().GetDbContextAsync();
if ((await dbContext.Database.GetPendingMigrationsAsync()).Any())
{
await dbContext.Database.MigrateAsync();
}
await uow.CompleteAsync();
}
}
now everything is ok, is my modify right?
I try to update them to Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX, but nothing found at nuget, only found LeptonXLite.
How to replace them ?
Yes, I need this, Thank you ~~
OK,
I want to modify this url, replace some parameters and sign it.
Hi,
My web will redirect to the login page if not authenticated.
Web/Pages/Index.html
public class IndexModel : AbpPageModel
{
public ActionResult OnGet()
{
if (Request.Query["ex"] == "yes")
{
throw new DivideByZeroException("This is a test exception!");
}
if (!CurrentUser.IsAuthenticated)
{
return Redirect("~/Account/Login");
}
else
{
return Page();
}
}
}
and it open this url
http://auth.mydomain.com/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%3Fclient_id%3DWeb%26redirect_uri%3Dhttp%253A%252F%252Fconsole.mydomain.com%252Fsignin-oidc%26response_type%3Dcode%2520id_token%26scope%3Dopenid%2520profile%2520roles%2520email%2520phone%2520AccountService%2520IdentityService%2520AdministrationService%2520SaasService%2520CmsService%2520BusinessUnit%26response_mode%3Dform_post%26nonce%3D638332667736323954........mJlMThjN2EyYWE0%26state%3DCfDJ8Eld3tn4Rn1GjnZqhM-ZUBhwOYwgPtXiFM1D3kL1WtTfijdvGsvbYNVPJtv6A0gw4zpSJDK-IVFZgg6EzByFk_PNFmgyv3oJ.......P7AmgWMDl3GtjG_c1V_06gxU06E_%26x-client-SKU%3DID_NET6_0%26x-client-ver%3D6.15.1.0
Can I construct this url myself?
By the way, I use the microservice-pro template.
Hi,
My web will redirect to the login page if not authenticated.
Web/Pages/Index.html
public class IndexModel : AbpPageModel
{
public ActionResult OnGet()
{
if (Request.Query["ex"] == "yes")
{
throw new DivideByZeroException("This is a test exception!");
}
if (!CurrentUser.IsAuthenticated)
{
return Redirect("~/Account/Login");
}
else
{
return Page();
}
}
}
and it open this url
http://auth.mydomain.com/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%3Fclient_id%3DWeb%26redirect_uri%3Dhttp%253A%252F%252Fconsole.mydomain.com%252Fsignin-oidc%26response_type%3Dcode%2520id_token%26scope%3Dopenid%2520profile%2520roles%2520email%2520phone%2520AccountService%2520IdentityService%2520AdministrationService%2520SaasService%2520CmsService%2520BusinessUnit%26response_mode%3Dform_post%26nonce%3D638332667736323954........mJlMThjN2EyYWE0%26state%3DCfDJ8Eld3tn4Rn1GjnZqhM-ZUBhwOYwgPtXiFM1D3kL1WtTfijdvGsvbYNVPJtv6A0gw4zpSJDK-IVFZgg6EzByFk_PNFmgyv3oJ.......P7AmgWMDl3GtjG_c1V_06gxU06E_%26x-client-SKU%3DID_NET6_0%26x-client-ver%3D6.15.1.0
Can I construct this url myself?
By the way, I use the microservice-pro template.
Hi,
My web will redirect to the login page if not authenticated.
Web/Pages/Index.html
public class IndexModel : AbpPageModel
{
public ActionResult OnGet()
{
if (Request.Query["ex"] == "yes")
{
throw new DivideByZeroException("This is a test exception!");
}
if (!CurrentUser.IsAuthenticated)
{
return Redirect("~/Account/Login");
}
else
{
return Page();
}
}
}
and it open this url
http://auth.mydomain.com/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%3Fclient_id%3DWeb%26redirect_uri%3Dhttp%253A%252F%252Fconsole.mydomain.com%252Fsignin-oidc%26response_type%3Dcode%2520id_token%26scope%3Dopenid%2520profile%2520roles%2520email%2520phone%2520AccountService%2520IdentityService%2520AdministrationService%2520SaasService%2520CmsService%2520BusinessUnit%26response_mode%3Dform_post%26nonce%3D638332667736323954........mJlMThjN2EyYWE0%26state%3DCfDJ8Eld3tn4Rn1GjnZqhM-ZUBhwOYwgPtXiFM1D3kL1WtTfijdvGsvbYNVPJtv6A0gw4zpSJDK-IVFZgg6EzByFk_PNFmgyv3oJ.......P7AmgWMDl3GtjG_c1V_06gxU06E_%26x-client-SKU%3DID_NET6_0%26x-client-ver%3D6.15.1.0
Can I construct this url myself?
By the way, I use the microservice-pro template.
Haa, I found it.
https://github.com/abpframework/eShopOnAbp/blob/main/etc/docker/docker-compose.yml
I try it now.