Base solution for your next web application

Activities of "varunab"

Hi ismcagdas,

thank you very much! this solved the issue. This documentation is very useful, maybe you can add it to https://docs.aspnetzero.com/en/common/latest

Regards

Hi, I'm using ASP.Net zero MVC and JQuvery version 11.4. My production environment consists of 2 Windows Server 2019 and I have deployed the solution on IIS on each server. Running the app through the VMs individually works well, but when running through load balancer, i get error Current User did not login and I see signalR errors when I open the developers tool.

I'm trying to implement persistence to resolve the issue. I have extended my DbContext and added IDataProtectionKeyContext public class cmsDbContext : AbpZeroDbContext<Tenant, Role, User, cmsDbContext>, IAbpPersistedGrantDbContext, IDataProtectionKeyContext. and public DbSet<DataProtectionKey> DataProtectionKeys { get; set; }

I now need to add the following line of code: services.AddDataProtection().PersistKeysToDbContext<cmsDbContext>();

When adding it in ConfigureServices in Startup.cs of the MVC project, i get the following error:

ERROR 2023-08-14 13:32:10,890 [13 ] AspNetCore.Server.IIS.Core.IISHttpServer - Connection ID "18158513719837982721", Request ID "40000002-0005-fc00-b63f-84710c7967bb": An unhandled exception was thrown by the application. System.Security.Cryptography.CryptographicException: An error occurred while trying to encrypt the provided data. Refer to the inner exception for more information. For more information go to http://aka.ms/dataprotectionwarning ---> Castle.MicroKernel.Handlers.HandlerException: Can't create component 'judiciary.cms.EntityFrameworkCore.cmsDbContext' as it has dependencies to be satisfied.

'judiciary.cms.EntityFrameworkCore.cmsDbContext' is waiting for the following dependencies:

  • Service 'Microsoft.EntityFrameworkCore.DbContextOptions`1[[judiciary.cms.EntityFrameworkCore.cmsDbContext, judiciary.cms.EntityFrameworkCore, Version=11.4.0.0, Culture=neutral, PublicKeyToken=null]]' which was not registered.

    at Castle.MicroKernel.Handlers.DefaultHandler.AssertNotWaitingForDependency() at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden) at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired) at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, Arguments additionalArguments, IReleasePolicy policy, Boolean ignoreParentContext) at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, Arguments arguments, IReleasePolicy policy, Boolean ignoreParentContext) at Castle.MicroKernel.DefaultKernel.Resolve(Type service, Arguments arguments) at Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.GetServiceInternal(Type serviceType, Boolean isOptional) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider) at Microsoft.AspNetCore.DataProtection.EntityFrameworkCore.EntityFrameworkCoreXmlRepository1.&lt;GetAllElements&gt;g__GetAllElementsCore|3_0()+MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Microsoft.AspNetCore.DataProtection.EntityFrameworkCore.EntityFrameworkCoreXmlRepository1.GetAllElements() at Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.GetAllKeys() at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.CreateCacheableKeyRingCore(DateTimeOffset now, IKey keyJustAdded) at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.ICacheableKeyRingProvider.GetCacheableKeyRing(DateTimeOffset now) at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.GetCurrentKeyRingCore(DateTime utcNow, Boolean forceRefresh) at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.GetCurrentKeyRing() at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Protect(Byte[] plaintext) --- End of inner exception stack trace --- at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Protect(Byte[] plaintext) at Microsoft.AspNetCore.Session.CookieProtection.Protect(IDataProtector protector, String data) at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context) at Abp.AspNetCore.Mvc.Caching.GetScriptsResponsePerUserCacheMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context) at Microsoft.WebTools.BrowserLink.Net.BrowserLinkMiddleware.ExecuteWithFilterAsync(IHttpSocketAdapter injectScriptSocket, String requestId, HttpContext httpContext) at Microsoft.AspNetCore.Watch.BrowserRefresh.BrowserRefreshMiddleware.InvokeAsync(HttpContext context) at Microsoft.AspNetCore.Server.IIS.Core.IISHttpContextOfT1.ProcessRequestAsync()

Any idea on how to resolve this?

Thanks

Hello, will IdentityServer4 be maintained in Asp.net zero or will it be replaced by another framework? If it will be replaced, then in which version will the new framework be available?

Hi,

it worked.

Thank you

Hi, I'm getting the attached error when using the Power tool. I'm using ASP.NET CORE MVC & jQuery v11.4.0. I see the razor pages, js file, app service etc has been created though. I only had to add migration manually.

Please assist.

thank you

  • What is your product version? 8.1.0
  • What is your product type (Angular or MVC)? MVC
  • What is product framework type (.net framework or .net core)? .Net Core

Hello.

what are the allowed values/special characters for the “username” field?

I entered "k!%^)<>?"{}2" and got an error message saying "User name k!%^)<>?"{}2 is invalid, can only contain letters or digits". But I have been able to create usernames containing @, ' and _

Showing 1 to 7 of 7 entries