Story Details for videos

SecurityGuard - Video for NuGet Package

kahanu
Author:
Version:
Views:
4525
Date Posted:
8/31/2011 8:21:26 PM
Date Updated:
8/31/2011 8:21:26 PM
Rating:
5/4 votes
Running Time:
25:18 minutes
Framework:
ASP.NET MVC 3
Platform:
Windows
Programming Language:
C#
Technologies:
SecurityGuard, MvcInstaller, SQL Server
Tags:
ASP.NET MVC, mvc, securityguard, mvcinstaller, sql server
Demo site:
Home Page:
Share:
Downloads: MP4
SecurityGuard is a NuGet package that quickly installs a complete UI for managing the ASP.NET Membership system on your ASP.NET MVC 3 application.

In this video I'll demonstrate how to install the ASP.NET Membership system using my other NuGet package, MvcInstaller, and then install SecurityGuard to actually manage the membership system.  The entire process takes only a few minutes to install and configure.

Comments

  • john
    Posted By: john
    On: 9/28/2011 9:58:46 PM
    Looks Great! This is the easiest one to get up and going that I've seen. Thanks for the video.
  • johnkesinger@yahoo.com
    Posted By: john
    On: 9/28/2011 9:58:46 PM
    This is Great! Easy to get going and full of functionality. Wow...!
  • info@kingwilder.com
    Posted By: King Wilder
    On: 9/29/2011 11:36:01 AM
    @John, I'm glad you like the video and the SecurityGuard Nuget Package. 
  • asdf@dsf.com
    Posted By: asdf
    On: 12/4/2012 10:35:04 AM
    I cant see the vidoes, why?
  • info@kingwilder.com
    Posted By: King Wilder
    On: 12/4/2012 2:13:04 PM
    @asdf - I've heard that if you inside a firewall you may have problems viewing these videos.  If you can find a computer outside the firewall, then it should work without a problem.  I hope that helps.
  • michael.crandall@i3creations.com
    Posted By: cranshark
    On: 12/14/2012 10:29:27 PM

    Great video!  Looking forward to implementing and glad I don't have to code up yet another membership/roles module for my client!

    Thanks!

  • info@kingwilder.com
    Posted By: King Wilder
    On: 12/15/2012 11:32:30 AM
    @cranshark - I'm glad this is helpful to you.  Good luck with it.
  • krzysztof.okun@hotmail.com
    Posted By: krzysiekok
    On: 12/23/2012 3:34:10 PM

    WhenI click onlogout

    To call this method, the "Membership.Provider" property must be an instance of "ExtendedMembershipProvider".

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidOperationException: To call this method, the "Membership.Provider" property must be an instance of "ExtendedMembershipProvider".
  • info@kingwilder.com
    Posted By: King Wilder
    On: 12/23/2012 7:40:31 PM

    @krzysiekok - hi, this is an easy error to fix.  It's covered in the companion article for SecurityGuard, under the "LoginPartial Updates" heading.

    But in short, the error is due to the fact that the LogOff link is still pointing to "Account/LogOff" when it should be pointing to "SGAccount/LogOff".  But there's more than just changing the link reference, that's why you should look at the article for the complete solution.  The LogOff and other features like this now require the AntiForgeryToken, so a form needs to be used to Log off.

    I hope this helps.

  • krzysztof.okun@hotmail.com
    Posted By: krzysiekok
    On: 12/24/2012 4:53:37 AM

    Ohh,

    @using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" }))

    @using (Html.BeginForm("LogOff", "SGAccount", FormMethod.Post, new { id = "logoutForm" }))

    Thanks!

  • info@kingwilder.com
    Posted By: King Wilder
    On: 12/24/2012 11:14:47 AM
    @krzysiekok - I'm glad that helped.
  • branislavk@gmail.com
    Posted By: banek
    On: 12/30/2012 7:56:26 AM

    Nice work!

    How to add custom fields to user's profile e.g. address, city, .... ?

  • info@kingwilder.com
    Posted By: King Wilder
    On: 12/31/2012 12:03:52 PM
    @banek - sorry I have not built any features into SecurityGuard that enables you to modify the Profiles through a web interface.  So for now, you'll need to modify your Profiles the existing way via the web.config.
  • branislavk@gmail.com
    Posted By: banek
    On: 1/1/2013 8:15:26 AM

    Thanks for quick answer!

    I'am considering to create new class "MembershipsProfiles" which will contain "UserId" from "Memberships" as a relationship. The other attributes will be custom data for user: city, address,...

    Please for your advice about that and if it is possible how to implement UI.

    Also, could I use EF for "MembershipsProfiles"?

    Thanks!


  • info@kingwilder.com
    Posted By: King Wilderr
    On: 1/1/2013 2:01:18 PM

    @banek - to create your own custom Profile class you should probably look at these articles.  They give more information on how to manage profiles within your application.

    Jon Galloway's article

    Scott Hanselman's article

    Once you create the class, then you create a new view and actions to use your new custom profile class.

    I hope this helps.

  • jmartinsmith@gmail.com
    Posted By: jayjay
    On: 1/31/2013 8:24:43 PM

    Hi King, excellent video and brilliant security package!

    Got it all working on my mvc 4 application, i had to disable the search function in the Membership\index.cshtml file though was throwing an error saying 'The call is ambiguous' for the Model.SearchTerm

  • info@kingwilder.com
    Posted By: King Wilder
    On: 1/31/2013 9:33:36 PM

    @jayjay - are you using the latest version of SecurityGuard for Mvc 4?  I've tested it on many applications and I don't get that error, but I'll look into it.

    What was the search process you used?  Filter by: View All, Username, Email?

  • alfredo.pasmino@gmail.com
    Posted By: RV
    On: 2/15/2013 4:46:58 PM

    Thanks for the video

    sorry but i have an error when i run MvcInstaller i have the error Could not find a part of the path 

     'c:\documents and settings\apasmino\mis documentos\visual studio 2010\Projects\test\test\App_Data\Reset\'.

    sorry, i am a new user of .net technology

  • info@kingwilder.com
    Posted By: King Wilder
    On: 2/16/2013 11:27:51 AM

    @RV - to fix this, just create a "Reset" folder inside the App_Data folder and the error will go away.  This folder allows you to add your own SQL scripts to reset any database configurations in the event that the installation fails the first time.  There's more information about how to create your SQL scripts in the article for Mvc 3 applciations. I'll make this clearer in the documentation.

    http://www.mvccentral.net/s/44

    Also, this is the SecurityGuard video story, not the MvcInstaller story.  :^)

  • praveen.konduru@gmail.com
    Posted By: praveen
    On: 4/11/2013 4:37:24 PM

    Hi,

    Really nice video. I have installed securityguard and i am trying to use it. But i am getting error at @user.IsinRole("SecurityGuard")

    It complains as object reference being not set.

    Help on this is appreciated.

     
  • info@kingwilder.com
    Posted By: King Wilder
    On: 4/12/2013 12:50:13 PM
    @praveen - what view are you getting this error? Can you show me the complete code where it is used?  Generally this would be in an "if" statement.  Is that how you are using it?
  • praveen.konduru@gmail.com
    Posted By: praveen
    On: 4/12/2013 1:46:55 PM

    Hi,

    Appreciate your response.

    Actually i have sent another question yesterday with some details and write up. I could see that yesterday, any ways that fine.

    Yes you are right, thats with if statment i guess.

    Another question i had is my membership provider is MongoDB custom provider, what is the best way to take advantage of your security guard with custom provider.

    Thanks.

  • info@kingwilder.com
    Posted By: King Wilder
    On: 4/12/2013 4:49:24 PM

    @praveen - as I mentioned in my other response in the SecurityGuard post, SecurityGuard was not built to be used with MondoDb or any other "no sql" provider.  At the moment it's meant to be used with SQL Server and the ASP.NET Membership system only.

    You could try to have two databases, one as SQL Server with the Membership system, and the other as MongoDB.  You would need two connection strings in your web.config.  You could see if that would work, otherwise I don't have any suggestions.

  • shardie@kindreds.net
    Posted By: kinstephen
    On: 5/28/2013 6:17:01 PM

    Can you use SecurityGuard without it's LogOn screens? I would prefer to implement my own Log on and authentication routines. I'm only interested in the user management aspect of SecurityGuard.

    Also, do you have to use a SecurityGuard role? Can I create my own?

  • info@kingwilder.com
    Posted By: King Wilder
    On: 5/28/2013 6:22:23 PM

    @kinstephen - you have the complete source code, so you can modify it all you want.  The actual source code is also up on github, if you go to the other SecurityGuard for MVC4 article, you'll see the link to the repository.

    The only reason to use the SecurityGuard Role is to be able to differentiate who gets to see that navigation item to the SecurityGuard Dashboard.  You can do anything else that you want, this was just an easy out-of-the-box way of saying, "this Role is the only one that gets to view the SecurityGuard Dashboard."

    I hope that answers your questions.

 

User Name:
(Required)
Email:
(Required)