Base solution for your next web application
Open Closed

Exception - Could not find content root folder #6856


User avatar
0
MellowoodMedical created

Hi,

I have added second DbContext to my aspnetzero project and it works fine on my local but as soon as I deploy it to azure it throws following exception:

System.Exception: Could not find content root folder!   at PatientPortal.Web.WebContentDirectoryFinder.CalculateContentRootFolder() in D:\a\1\s\src\PatientPortal.Core\Web\WebContentFolderHelper.cs:line 27   at PatientPortal.EntityFrameworkCore.PatientPortalConnectionStringResolver.GetNameOrConnectionString(ConnectionStringResolveArgs args) in D:\a\1\s\src\PatientPortal.EntityFrameworkCore\EntityFrameworkCore\PatientPortalConnectionStringResolver.cs:line 19   at Abp.Domain.Uow.UnitOfWorkBase.ResolveConnectionString(ConnectionStringResolveArgs args)   at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.GetOrCreateDbContext[TDbContext](Nullable`1 multiTenancySide, String name)   at Abp.EntityFrameworkCore.Uow.UnitOfWorkExtensions.GetDbContext[TDbContext](IActiveUnitOfWork unitOfWork, Nullable`1 multiTenancySide, String name)   at Abp.EntityFrameworkCore.Uow.UnitOfWorkDbContextProvider`1.GetDbContext(Nullable`1 multiTenancySide)   at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase`3.get_Context()   at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase`3.get_Table()   at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase`3.GetAllIncluding(Expression`1[] propertySelectors)   at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase`3.GetAll()   at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase`3.FirstOrDefaultAsync(TPrimaryKey id)   at Abp.Domain.Repositories.AbpRepositoryBase`2.GetAsync(TPrimaryKey id)   at Abp.Threading.InternalAsyncHelper.AwaitTaskWithPostActionAndFinallyAndGetResult[T](Task`1 actualReturnValue, Func`1 postAction, Action`1 finalAction)   at PatientPortal.Demographic.Service.DemographicService.GetDemograph(Int32 input)   at lambda_method(Closure , Object )   at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()   at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExec...

Please suggest.

Thanks, Gaurav Singh


1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    CalculateContentRootFolder Only for development periods.

    https://github.com/aspnetboilerplate/aspnetboilerplate/issues/4433