Saturday, May 22, 2010

How add new Role in Asp.net 2.0 using C#?

i have error when iam insert new role.i just click website----%26gt;asp.netconfiguration---%26gt;secu... and manage role.


when iam insert new role i have following error





Cannot insert the value NULL into column 'RoleId', table '4xMoneyBiz.dbo.aspnet_Roles'; column does not allow nulls. INSERT fails. The statement has been terminated





i have already i have 4role such that admin,guest,member,superadmin. But i cant add new role





Can u help me?

How add new Role in Asp.net 2.0 using C#?
In aspnet_Roles table, Add (newid()) as default value in Role_Id column. It will work.





Enjoy your programming.


No comments:

Post a Comment