I am trying to follow the tutorial for Using ADO.NET Implementation of ASP.NET Identity 2 for PostgreSQLhttps://www.devart.com/dotconnect/postg ... orial.html but i am having some problems getting it to work.
I got a number of compilation errors when following the steps in the tutorial. I was able to fix a couple of them but i am now stuck
i replaced with the following
Code: Select all
Dim manager = New ApplicationUserManager(New PgSqlUserStore())
code from tutorial gave error, extension methiods can only be defined in modules. I converted the c# code and got the following
Code: Select all
Imports System.Security.Claims Imports System.Threading.Tasks Imports Microsoft.AspNet.Identity Imports Devart.Common.Web.Identity Imports Devart.Data.PostgreSql.Web.Identity Imports ApplicationUser = Devart.Common.Web.Identity.IdentityUser Namespace AspNet_Identity_Application.Models Public Module ApplicationUserExtensions <System.Runtime.CompilerServices.Extension> _ Public Async Function GenerateUserIdentityAsync(ByVal user As ApplicationUser, ByVal manager As UserManager(Of ApplicationUser)) As Task(Of ClaimsIdentity) ' Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType Dim userIdentity = Await manager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie) ' Add custom user claims here Return userIdentity End Function End Module End Namespace
'GenerateUserIdentityAsync' is not a member of 'Devart.Common.Web.Identity.IdentityUser'. IdentityConfig.vb 90
'GenerateUserIdentityAsync' is not a member of 'Devart.Common.Web.Identity.IdentityUser'. Startup.Auth.vb 29
I will attach the sample project which shows as far as i got.
please could the tutorial be updated to work properly.
I am using visual studio 2013 update 4 and obviously visual basic as opposed to c#