Asp.net mvc 3 在自定义配置文件提供程序中未调用GetPropertyValue
我正在尝试为我的MVC3应用程序实现我的第一个自定义配置文件提供程序 我的个人资料模型是-Asp.net mvc 3 在自定义配置文件提供程序中未调用GetPropertyValue,asp.net-mvc-3,asp.net-membership,Asp.net Mvc 3,Asp.net Membership,我正在尝试为我的MVC3应用程序实现我的第一个自定义配置文件提供程序 我的个人资料模型是- Public Class Profile Inherits ProfileBase Public Overridable Property FirstName As String Public Overridable Property LastName As String Public Overridable Property COUNTY_NUM As Int
Public Class Profile
Inherits ProfileBase
Public Overridable Property FirstName As String
Public Overridable Property LastName As String
Public Overridable Property COUNTY_NUM As Integer
Public Overridable Property COUNTY_ONLY_SW As String
Public Overridable Property WORKER_TYPE_IND As String
Public Overridable Property Agency As Decimal
Public Shared Function GetProfile(userName As String) As Profile
Return DirectCast(Create(userName), Profile)
End Function
End Class
我已经基于System.Web.Profile.ProfileProvider实现了一个默认配置文件提供程序,实现了所有方法,并在所有抛出上抛出异常和断点。当我单步执行GetProfile()方法时,它不会调用ProfileProvider中的任何函数。我知道我的配置文件提供程序确实会被调用,因为如果web配置文件没有加载/查找类,我会得到一个错误
我是不是走错了一步