dotnetfunda / aspmvcidentity Goto Github PK
View Code? Open in Web Editor NEWUser interface to create ASP.NET Identity Roles, Users, Claims etc
User interface to create ASP.NET Identity Roles, Users, Claims etc
Please check Web.config, this is set to the authors computer. If there are instructions the user needs to change it? I had not seen it
i puted default db generated by mvc
i can add roles by on registering get error !
Server Error in '/' Application.
Invalid column name 'Discriminator'.
whats this column in db ?
:S
Hi, thanks for this sample, can you tell me how to map a role to an action on the fly, is this possible.
Also is this current with ASP 2.2
launch program, goto roles, create a role if one doesnt exist. assign a role to a user? enter my user id and select a role, click save or apply? crashes RolesController at line 103
`Server Error in '/' Application.
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 101: ApplicationUser user = context.Users.Where(u => u.UserName.Equals(UserName, StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault();
Line 102: var account = new AccountController();
Line 103: account.UserManager.AddToRole(user.Id, RoleName);
Line 104:
Line 105: ViewBag.ResultMessage = "Role created successfully !";`
Not able to add a role, at all. Similar problem found when integrating the code into working project
Hello, I was trying your sample, wish it had both manager user and manage roles... I want to say this is great work Mr Narayan!!
but its giving me exception when visiting roles page... i think the asp identity update broke it from nuget
System.Data.Entity.Core.ProviderIncompatibleException was unhandled by user code
HResult=-2146233087
Source=EntityFramework
StackTrace:
at System.Data.Entity.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection)
at System.Data.Entity.Infrastructure.DefaultManifestTokenResolver.<>c__DisplayClass1.b__0(Tuple3 k) at System.Collections.Concurrent.ConcurrentDictionary
2.GetOrAdd(TKey key, Func2 valueFactory) at System.Data.Entity.Infrastructure.DefaultManifestTokenResolver.ResolveManifestToken(DbConnection connection) at System.Data.Entity.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection connection, DbProviderManifest& providerManifest) at System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection) at System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext) at System.Data.Entity.Internal.RetryLazy
2.GetValue(TInput input)
at System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
at System.Data.Entity.Internal.InternalContext.Initialize()
at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)
at System.Data.Entity.Internal.Linq.InternalSet1.Initialize() at System.Data.Entity.Internal.Linq.InternalSet
1.GetEnumerator()
at System.Data.Entity.Infrastructure.DbQuery1.System.Collections.Generic.IEnumerable<TResult>.GetEnumerator() at System.Collections.Generic.List
1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable
1 source)
at MVCInBuiltFeatures.Controllers.RolesController.Index() in d:\samples\AspMvcIdentity-master\AspMvcIdentity-master\MVCInBuiltFeatures\Controllers\RolesController.cs:line 20
at lambda_method(Closure , ControllerBase , Object[] )
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.