This project is read-only.

Membership.Provider.GetAllUsers Invalid Cast error

Topics: ASP.NET 2.0, Business Logic Layer
Aug 25, 2011 at 4:37 AM

I tried searching for this error in the forums and couldn't find anything, so my apologies if this is a repeat discussion.  I just recently installed BlogEngine 2.5 and then switched it over to use Membership Roles in SQL Server instead of XML. After I did that, I started getting an error on line 39 'Membership.Provider.GetAllUsers(0, 999, out uCount);' in the file '\App_Code\Helpers\DashboardHelper.cshtml.' The error I receive is 'Specified cast is not valid.'

Any ideas or suggestions would be really helpful? I've been banging my head for a couple of hours and have probably completely over-thought this now.

Aug 25, 2011 at 11:53 AM

When doing this search, here are a couple of results ... not sure if they contain the answer.

If you are still stuck, as a last resort, you could try commenting out that line 39 as it's not that important.  Not sure if you are seeing any similar errors on the Users tab.