Closed qq1176914912 closed 8 months ago
Hello,
By default, SimpleIdServer supports two databases: SQLSERVER
and POSTGRESQL
. For more information, you can refer to the documentation: https://simpleidserver.com/docs/iam/storage
Of course, it is possible to support other database providers. You can find a list here: https://learn.microsoft.com/en-us/ef/core/providers/?tabs=dotnet-core-cli
To support your preferred database, please follow these steps:
IdServer
with the SimpleIdServer.IdServer
Package.dotnet new idserver -n IdServer --storageConnectionString "Data Source=.;Initial Catalog=IdServer;Integrated Security=True;TrustServerCertificate=True" --distributedCacheConnectionString "Data Source=.;Initial Catalog=IdServer;Integrated Security=True;TrustServerCertificate=True"
IdServer
and install the appropriate Nuget package for example Microsoft.EntityFrameworkCore.Sqlite
for SQLite.dotnet add package Microsoft.EntityFrameworkCore.Sqlite
Program.cs
file in your preferred text editor.ConfigureStorage
method and configure SQLITE :b.UseSqlite("CONNECTIONSTRING", o =>
{
o.MigrationsAssembly("IdServer");
o.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery);
});
ConfigureDistributedCache
method and configure your distributed caching storage. Please refer to the official documentation here: https://learn.microsoft.com/en-us/aspnet/core/performance/caching/distributed?view=aspnetcore-7.0. If you want to use the InMemory implementation, you can comment out the content.The documentation will be updated in future releases to explain in more detail how to configure your storage. If you need support with your configuration, don't hesitate to contact us.
KR,
SID
Hello,
By default, SimpleIdServer supports two databases:
SQLSERVER
andPOSTGRESQL
. For more information, you can refer to the documentation: https://simpleidserver.com/docs/iam/storageOf course, it is possible to support other database providers. You can find a list here: https://learn.microsoft.com/en-us/ef/core/providers/?tabs=dotnet-core-cli
To support your preferred database, please follow these steps:
- Create project named
IdServer
with theSimpleIdServer.IdServer
Package.dotnet new idserver -n IdServer --storageConnectionString "Data Source=.;Initial Catalog=IdServer;Integrated Security=True;TrustServerCertificate=True" --distributedCacheConnectionString "Data Source=.;Initial Catalog=IdServer;Integrated Security=True;TrustServerCertificate=True"
- Navigate to the directory
IdServer
and install the appropriate Nuget package for exampleMicrosoft.EntityFrameworkCore.Sqlite
for SQLite.dotnet add package Microsoft.EntityFrameworkCore.Sqlite
- Open the
Program.cs
file in your preferred text editor.- Edit the
ConfigureStorage
method and configure SQLITE :b.UseSqlite("CONNECTIONSTRING", o => { o.MigrationsAssembly("IdServer"); o.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); });
- Edit the
ConfigureDistributedCache
method and configure your distributed caching storage. Please refer to the official documentation here: https://learn.microsoft.com/en-us/aspnet/core/performance/caching/distributed?view=aspnetcore-7.0. If you want to use the InMemory implementation, you can comment out the content.- Run the following command line to create the migrations scripts
- Run the project
The documentation will be updated in future releases to explain in more detail how to configure your storage. If you need support with your configuration, don't hesitate to contact us.
KR,
SID
Okay, I understand. Thank you for your reply.
Hello,
By default, SimpleIdServer supports two databases:
SQLSERVER
andPOSTGRESQL
. For more information, you can refer to the documentation: https://simpleidserver.com/docs/iam/storageOf course, it is possible to support other database providers. You can find a list here: https://learn.microsoft.com/en-us/ef/core/providers/?tabs=dotnet-core-cli
To support your preferred database, please follow these steps:
- Create project named
IdServer
with theSimpleIdServer.IdServer
Package.dotnet new idserver -n IdServer --storageConnectionString "Data Source=.;Initial Catalog=IdServer;Integrated Security=True;TrustServerCertificate=True" --distributedCacheConnectionString "Data Source=.;Initial Catalog=IdServer;Integrated Security=True;TrustServerCertificate=True"
- Navigate to the directory
IdServer
and install the appropriate Nuget package for exampleMicrosoft.EntityFrameworkCore.Sqlite
for SQLite.dotnet add package Microsoft.EntityFrameworkCore.Sqlite
- Open the
Program.cs
file in your preferred text editor.- Edit the
ConfigureStorage
method and configure SQLITE :b.UseSqlite("CONNECTIONSTRING", o => { o.MigrationsAssembly("IdServer"); o.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); });
- Edit the
ConfigureDistributedCache
method and configure your distributed caching storage. Please refer to the official documentation here: https://learn.microsoft.com/en-us/aspnet/core/performance/caching/distributed?view=aspnetcore-7.0. If you want to use the InMemory implementation, you can comment out the content.- Run the following command line to create the migrations scripts
- Run the project
The documentation will be updated in future releases to explain in more detail how to configure your storage. If you need support with your configuration, don't hesitate to contact us.
KR,
SID
I want to use POSTGRESQL in the project 'SimpleIdServer. IdServer. Startup', and I have changed the Type of 'appsettings. json' as follows:
After the result is started, an error is reported as follows:
This issue seems to be due to the fact that 'DistributedCacheConfiguration' does not support postgreSQL. In your document‘ https://simpleidserver.com/docs/iam/configuration ’When it comes to postgreSQL, the value is actually SQLSERVER
Does the database support other databases besides SqlServer? How to change the database type used by the program if supported?