(SitePrincipal)Context.User
Excuse me,
In Chapter 5,Roles¡¢EditRole¡¢RoleAssignments in admin is error.It is about
(SitePrincipal)Context.User.Moreover£¬what mean about"Put user code to initialize the page
here"in the progam(EditRole.aspx.cs)?
I tried to complete thePhile\Modules\admin\roles.aspx ,but received the following message
from Anthecinus C# Editor:
//--------------------------------------------
1¡¢admin/roles.aspx error£º
Stack Trace:
System.InvalidCastException: Can't convert type. at
thePhile.Modules.Accounts.Web.Roles.Page_Load(Obje ct sender, EventArgs e) in
C:\Inetpub\wwwroot\thePhile\Modules\Users\Admin\Ro les.aspx.cs:line 41 at
System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs
e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain()
//--------------------------------------------
2¡¢admin/Editrole.aspx error£º
Stack Trace:
System.InvalidCastException: Can't convert type. at
thePhile.WebModules.Web.EditRole.Page_Load(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\thePhile\Modules\Users\Admin\Ed itRole.aspx.cs:line 59 at
System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs
e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain()
//--------------------------------------------
3¡¢admin/RoleAssignments.aspx error£º
Stack Trace:
System.IndexOutOfRangeException: Nothing in row 0.at System.Data.DataRowCollection.get_Item(Int32
index) at thePhile.WebModules.Accounts.Data.Role.Retrieve(In t32 roleId) in
C:\Inetpub\wwwroot\thePhile\AccountsData\Role.cs:l ine 64 at
thePhile.WebModules.Accounts.Business.Role..ctor(I nt32 currentRoleId) in
C:\Inetpub\wwwroot\thePhile\AccountsBusiness\Role. cs:line 27 at
thePhile.Modules.Accounts.Web.RoleAssignments.Page _Load(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\thePhile\Modules\Users\Admin\Ro leAssignments.aspx.cs:line 43 at
System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs
e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain()
It's likely to the class SitePrincipal and class SiteIdentity can not work.
What are some possible solutions that I need to check?
Thank you for your help!!
|