【发布时间】:2018-04-24 15:13:30
【问题描述】:
我有一个清理非活动用户数据库的 Azure 函数。此清理涉及删除 ASPNET Membership 条目,方法是:
System.Web.Security.Membership.DeleteUser(username);
问题在于 ASPNET Membership 框架需要 app.config/connection.config 文件中的连接字符串(请参阅https://msdn.microsoft.com/en-us/library/6e9y4s5t.aspx)。
我已将包含必要信息的 app.config 文件添加到我的 Azure 函数中,但这不起作用。我得到下一个错误:
System.Configuration.Provider.ProviderException: 'The connection name >'LocalSqlServer' was not found in the applications configuration or the>connection string is empty.'
您对如何实现这一点有任何想法吗?
【问题讨论】:
标签: c# azure asp.net-membership azure-functions