Temporary hack to get v3 admin working

Jan 19, 2010 at 11:45 PM
Edited Jan 19, 2010 at 11:47 PM

This is a great learning tool. I deeply wish to thank the authors that shared this !

 

I just downloaded it and followed the read me but i got stuck on Step 5. 

STEPS 1 thru 4 are straightforward and I hydrated the database just fine.

In STEP 5, first of all there is a typo on the line that starts with 'var role='    <ClubStarterKit.Domain.User> should be <ClubStarterKit.Domain.Role> But despite this, VS 2010 still throws the error that there is no definition for first. I haven't had time to look thru the code and solve the issue (too busy cooking right now.. LOL) but i have a temporary hack that should help newbies like myself:

So, go thru the registration process and create a user and populates the User table in the database like it says in STEP 5.

Then open up tables 'UserInRole' and 'Role' using Server Explorer and right clicking to 'show table data' and then modify the following 2 tables:

Role table - Type in Admin for the RoleName column 

UserInRole table - Type in 1 for the User_id column.  Type in 1 for the Role_id column

(the first column in each table is an identity field so it will be auto-populated by the database)

So, fire up the app, create another user and open the other user in another instance of the app on another browser and check out the differences between admin user and non-admin user.

DISCLAIMER: This is a temporary fix that I created 10 mintues after downloading that app, I'm not sure if the code listed in the read me was supposed to hydrate other tables or add more stuff to the database, but I just wanted to share this info so that other users who were stuck can get the admin part working. 

DISCLAIMER Number B: If any typos are found, or if the whole message makes no sense blah blah blah ... sowwy ... it's been a long day ! :))

Coordinator
Jan 20, 2010 at 12:39 AM

Or you could just add the following line to the top of your code.... using System.Linq;

 

Sorry about this... I was usually careful to save that using declarative because I KNEW some people were going to ask about it :)

Jan 20, 2010 at 6:23 AM

LOL at myself. One line of code could have saved me some typing huh.. lol

It was nice to have a quick reply... quite unexpected actually. :)

I'm anxiously awaiting the documentation that accompanies this project... any idea of when it will be made available? I realize you're busy with other stuff, but i was just curious.

 

Thanks & keep up the great work !

 

Coordinator
Jan 20, 2010 at 12:57 PM

I'm definitely not in the documentation phase quite yet... it's stll sort of a play at your own risk kind of deal. I haven't received a lot of feedback... which is troubling considering the number of downloads. I sure hope people are actually playing with CSK. 

 

Another thing I was hoping would happen, but not guaranteed (of course), is that some people wouldn't mind contributing to the docs. Writing those things can be quite boring :)

 

And about the quick reply... if you send your questions by email I can get to them quicker. I have an RSS feed for the discussions and it seems to have not been working for me. If you have some sort of huge problem like that, an email will get you a quick solution :)

 

Zack Owens