I guess you had selected the Oracle as db.
The format is User Id=<USER ID>;Password=<PASSWORD>;Data Source=<DATA SOURCE>;
https://github.com/oracle/dotnet-db-samples/blob/master/samples/ef-core/get-started/create-model-save-query-scaffold-efc6.cs#L17 https://github.com/oracle/dotnet-db-samples/blob/master/samples/ef-core/dependency-injection/appsettings.json#L3
Can I check it remotely?
https://us05web.zoom.us/j/87621986964?pwd=v9hRNWdaGIIqJrbNpM0IdC6lz1qPmb.1
hi
I think the problem is about the format of connecting strings.
Are you using the Devart.Data.Oracle.EFCore or Oracle.EntityFrameworkCore
hi
Can you share the my sample app?
hi
Can you share your connecting string or the appsettings.json file?
How can I reproduce it on my local comptuer?
liming.ma@volosoft.com
hi
No such host is known.
This is like a problem of connecting strings.
The target machine actively refused it.'
Can you check the target machine logs?
You can also test your connection string in the plain EF Core app.
I can test the connecting string in my docker environment. Can you share more info? liming.ma@volosoft.com
https://github.com/abpframework/abp/pull/17872
hi
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Razor.Language;
using Microsoft.CodeAnalysis;
using Microsoft.Extensions.Options;
using Nito.AsyncEx;
using Volo.Abp;
using Volo.Abp.DependencyInjection;
using Volo.Abp.TextTemplating;
using Volo.Abp.TextTemplating.Razor;
namespace Acme.BookStore;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IAbpCompiledViewProvider))]
public class MyAbpCompiledViewProvider : IAbpCompiledViewProvider, ITransientDependency
{
private static readonly ConcurrentDictionary<string, Assembly> CachedAssembles = new ConcurrentDictionary<string, Assembly>();
private static readonly SemaphoreSlim _semaphore = new SemaphoreSlim(1, 1);
private readonly AbpCompiledViewProviderOptions _options;
private readonly AbpRazorTemplateCSharpCompiler _razorTemplateCSharpCompiler;
private readonly IAbpRazorProjectEngineFactory _razorProjectEngineFactory;
private readonly ITemplateContentProvider _templateContentProvider;
public MyAbpCompiledViewProvider(
IOptions<AbpCompiledViewProviderOptions> options,
IAbpRazorProjectEngineFactory razorProjectEngineFactory,
AbpRazorTemplateCSharpCompiler razorTemplateCSharpCompiler,
ITemplateContentProvider templateContentProvider)
{
_options = options.Value;
_razorProjectEngineFactory = razorProjectEngineFactory;
_razorTemplateCSharpCompiler = razorTemplateCSharpCompiler;
_templateContentProvider = templateContentProvider;
}
public virtual async Task<Assembly> GetAssemblyAsync(TemplateDefinition templateDefinition)
{
async Task<Assembly> CreateAssembly(string content)
{
using (var assemblyStream = await GetAssemblyStreamAsync(templateDefinition, content))
{
return Assembly.Load(await assemblyStream.GetAllBytesAsync());
}
}
var templateContent = await _templateContentProvider.GetContentOrNullAsync(templateDefinition);
if (templateContent == null)
{
throw new AbpException($"Razor template content of {templateDefinition.Name} is null!");
}
using (await _semaphore.LockAsync())
{
var cacheKey = (templateDefinition.Name + templateContent).ToMd5();
if (CachedAssembles.TryGetValue(cacheKey, out var assemble))
{
return assemble;
}
var newAssemble = await CreateAssembly(templateContent);
CachedAssembles.TryAdd(cacheKey, newAssemble);
return newAssemble;
}
}
protected virtual async Task<Stream> GetAssemblyStreamAsync(TemplateDefinition templateDefinition, string templateContent)
{
var razorProjectEngine = await _razorProjectEngineFactory.CreateAsync(builder =>
{
builder.SetNamespace(AbpRazorTemplateConsts.DefaultNameSpace);
builder.ConfigureClass((document, node) =>
{
node.ClassName = AbpRazorTemplateConsts.DefaultClassName;
});
});
var codeDocument = razorProjectEngine.Process(
RazorSourceDocument.Create(templateContent, templateDefinition.Name), null,
new List<RazorSourceDocument>(), new List<TagHelperDescriptor>());
var cSharpDocument = codeDocument.GetCSharpDocument();
var templateReferences = _options.TemplateReferences
.GetOrDefault(templateDefinition.Name)
?.Select(x => x)
.Cast<MetadataReference>()
.ToList();
return _razorTemplateCSharpCompiler.CreateAssembly(cSharpDocument.GeneratedCode, templateDefinition.Name, templateReferences);
}
}
Thanks. I will check it asap.
hi
Please share your test app, Thanks
liming.ma@volosoft.com
hi
We enabled the DynamicXXXStoreEnabled in the ms project by default.
Can you check your template code?
Configure<PermissionManagementOptions>(options =>
{
options.IsDynamicPermissionStoreEnabled = true;
});
Configure<FeatureManagementOptions>(options =>
{
options.IsDynamicFeatureStoreEnabled = true;
});
Configure<TextTemplateManagementOptions>(options =>
{
options.IsDynamicTemplateStoreEnabled = true;
});
Configure<SettingManagementOptions>(options =>
{
options.IsDynamicSettingStoreEnabled = true;
});