3

Closed

The type specified in the TypeName property of ObjectDataSource 'odsRoles' could not be found.

description

Getting the following issue when using N2CMS from nuget packages:
N2CMS Managment (Standard) 2.6.3.3
N2CMS Library 2.6.3.3
N2CMS MVC Support 2.6.3.3
N2CMS Razor Support 2.6.3.3
[InvalidOperationException: The type specified in the TypeName property of ObjectDataSource 'odsRoles' could not be found.]
   System.Web.UI.WebControls.ObjectDataSourceView.GetType(String typeName) +1683139
   System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1518
   System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +101
   System.Web.UI.WebControls.ListControl.PerformSelect() +34
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +30
   N2.Edit.Membership.Edit.Page_Load(Object sender, EventArgs e) in c:\Work\GitHub\n2cms\src\Mvc\MvcTemplates\N2\Users\Edit.aspx.cs:31
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +92
   System.Web.UI.Control.LoadRecursive() +54
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772
This is probably because of the class N2.Edit.Membership.RolesSource is missing / cannot be resolved.
Closed Nov 30, 2014 at 5:56 AM by bherila
Fixed in the latest Nuget packages.

comments

janpub wrote Sep 29, 2014 at 6:11 PM

It's probably not directly related to the problem, but it's worth a similar issue to be noticed: missing enabled="true" term in Web.config. [0A][0A]RoleManager is by default disabled - see "enabled" property at http://msdn.microsoft.com/en-us/library/vstudio/ms164660(v=vs.100).aspx[0A][0A]Web.config should have role manager enabled, e.g.[0A][0A]<roleManager defaultProvider="ContentRoleProvider" enabled="true" >[0A] <providers>[0A] <add name="ContentRoleProvider" type="N2.Security.ContentRoleProvider, N2.Management"/>[0A] </providers>[0A]</roleManager>[0A]

janpub wrote Sep 29, 2014 at 6:16 PM

It seems Dinamico role manager is disabled in Web.config:[0A]https://github.com/n2cms/n2cms/blob/master/src/Mvc/Dinamico/web.config[0A]

Trysor wrote Sep 29, 2014 at 9:01 PM

I do have that set to enabled. Thanks for the reply, though.

wrote Oct 8, 2014 at 9:03 PM

olofd wrote Oct 8, 2014 at 9:08 PM

I have the same issue on 2.6.3.4
cannot create users.

wrote Nov 1, 2014 at 3:46 PM

skjelbek wrote Nov 3, 2014 at 8:31 PM

After examining the code it's clear that the RolesSource class is in the wrong scope in the current version. It's in N2.Edit.Membership.Edit instead of N2.Edit.Membership. It seems that the bug is fixed in the current source code on github, but it's not yet released as a nuget package.

bherila wrote Nov 3, 2014 at 9:33 PM

Nuget packages are available here: https://github.com/n2cms/n2cms/releases/tag/2.6.3.6

wrote Nov 30, 2014 at 5:56 AM