You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

技术咨询:完成Identity Server数据库创建后无法定位其存储位置

Finding Your Identity Server User Database in Visual Studio 2017

Hey there! Since you’ve successfully wrapped up the database object creation steps for Identity Server but aren’t sure where the database is stored, here are the most practical ways to track it down:

  • Check your project’s connection string
    Open your project’s appsettings.json (for .NET Core projects) or web.config (for .NET Framework projects) and locate the ConnectionStrings section. This entry will explicitly tell you which database instance and name was used. For example, if you’re using LocalDB (the default for many Identity Server tutorials), the connection string might look like Server=(LocalDB)\\MSSQLLocalDB;Database=YourIdentityDbName;Trusted_Connection=True;. LocalDB files are typically saved in C:\Users\[Your Windows Username]\ with .mdf (data file) and .ldf (log file) extensions.

  • Use Visual Studio’s SQL Server Object Explorer
    Fire up Visual Studio 2017, head to the menu bar and select View > SQL Server Object Explorer. Expand the SQL Server node, then look for instances like (LocalDB)\MSSQLLocalDB or your local SQL Express installation. Expand the instance, then the Databases folder—your Identity Server user database should be listed here (it’ll match the name from your connection string).

  • Review Package Manager Console history
    If you ran database migrations via the Package Manager Console (using commands like Update-Database), scroll back through the console’s output logs. You’ll find details about the database creation process, including the full connection string and sometimes the physical file path if it’s a LocalDB or SQL Express database.

内容的提问来源于stack exchange,提问作者user9447717

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 11:34:05