2010-02-21 54 views
0

读取角色部分在执行这一行:错误尝试从程序Web.Config

Dim roleRedirectSection As LoginRedirectByRoleSection = DirectCast(ConfigurationManager.GetSection("loginRedirectByRole"), LoginRedirectByRoleSection) 

...我收到以下错误:

消息:“出错创建配置节处理程序loginRedirectByRole:未能加载类型 'sitename.LoginRedirectByRoleSection'(W:\站点\ 2010 \ DEV \站点名称\ ASP 4.0 \ web.config中第10行)。”

<configuration> 
    <configSections> 
     <section name="loginRedirectByRole" type="journeyeast.LoginRedirectByRoleSection" allowLocation="true" allowDefinition="Everywhere" /> 
    </configSections> 
    <loginRedirectByRole> 
     <roleRedirects> 
      <add role="Administrator" url="~/Account/Admin/Default.aspx" /> 
      <add role="Employee" url="~/Account/Emp/Default.aspx" /> 
      <add role="Teacher" url="~/Account/Teacher/Default.aspx" /> 
      <add role="Student" url="~/Account/Student/Default.aspx" /> 
      <add role="School" url="~/Account/School/Default.aspx" /> 
     </roleRedirects> 

回答

1

您可能需要指定完整的类型呐我包括journeyeast.LoginRedirectByRoleSection所在的程序集。

type="journeyeast.LoginRedirectByRoleSection, assemblyName" 
相关问题