将 UmbracoIdentity 数据存储在 SQL 服务器中
Store UmbracoIdentity data in SQL Server
我已经使用 UmbracoIdentity 实现了 Umbraco 的成员身份,在我将我的解决方案部署到 Azure Web 应用程序之前,一切都很顺利。在 azure 上,我收到权限错误,因为 UmbracoIdentity 正在使用存储在 App_Data
文件夹中的 SQL Server CE 数据库。
作为参考,我得到的错误是:
Exception type: SqlCeException
There is a file sharing violation. A different process might be using the file. [ ...\wwwroot\App_Data\UmbracoIdentity.sdf ]
我的 Umbraco 数据存储在 SQL 数据库中,我也想在这里存储我的 UmbracoIdentity 会员数据。对于如何将 SQL 服务器设置为会员数据的用户存储,我将不胜感激。
您需要实施 IExternalLoginStore.cs interface and then configure the application to use it. It should be fairly simple to implement as you can use the SQL Server CE implementation as an example. I've done one for Azure Table Storage - you can check the Readme at https://github.com/alindgren/UmbracoIdentity.AzureLoginStore 以了解如何配置应用程序以使用自定义外部登录存储(对我来说这是最不明显的部分)。
我已经使用 UmbracoIdentity 实现了 Umbraco 的成员身份,在我将我的解决方案部署到 Azure Web 应用程序之前,一切都很顺利。在 azure 上,我收到权限错误,因为 UmbracoIdentity 正在使用存储在 App_Data
文件夹中的 SQL Server CE 数据库。
作为参考,我得到的错误是:
Exception type: SqlCeException
There is a file sharing violation. A different process might be using the file. [ ...\wwwroot\App_Data\UmbracoIdentity.sdf ]
我的 Umbraco 数据存储在 SQL 数据库中,我也想在这里存储我的 UmbracoIdentity 会员数据。对于如何将 SQL 服务器设置为会员数据的用户存储,我将不胜感激。
您需要实施 IExternalLoginStore.cs interface and then configure the application to use it. It should be fairly simple to implement as you can use the SQL Server CE implementation as an example. I've done one for Azure Table Storage - you can check the Readme at https://github.com/alindgren/UmbracoIdentity.AzureLoginStore 以了解如何配置应用程序以使用自定义外部登录存储(对我来说这是最不明显的部分)。