相关疑难解决方法(0)

在ASP.NET MVC中实现自定义配置文件提供程序

我尝试了很多在ASP.NET MVC中实现自定义配置文件提供程序.我已经阅读了很多很多教程,但我无法找到问题所在.它与ASP.NET MVC中的实现配置文件提供程序非常相似.

但是我想创建自己的Profile Provider,所以我编写了以下继承自的类ProfileProvider:

public class UserProfileProvider : ProfileProvider
{
    #region Variables
    public override string ApplicationName { get; set; }
    public string ConnectionString { get; set; }
    public string UpdateProcedure { get; set; }
    public string GetProcedure { get; set; }
    #endregion

    #region Methods
    public UserProfileProvider()
    {  }

    internal static string GetConnectionString(string specifiedConnectionString)
    {
        if (String.IsNullOrEmpty(specifiedConnectionString))
            return null;

        // Check <connectionStrings> config section for this connection string
        ConnectionStringSettings connObj = ConfigurationManager.ConnectionStrings[specifiedConnectionString];
        if (connObj != null) …
Run Code Online (Sandbox Code Playgroud)

asp.net-mvc profile-provider

6
推荐指数
1
解决办法
1万
查看次数

标签 统计

asp.net-mvc ×1

profile-provider ×1