Closed Trapulo closed 9 years ago
This is not much info to go on.
What kind of info can I add? I call http://localhost:61581/idm/ Then I'm redirect to: http://localhost:61581/idm/authorize?state=11902375240026318&client_id=idmgr&response_type=token and the page response is a 404 The resource cannot be found. (maybe a fake 404 created by a runtime error, I don't know).
my setup: app.Map("/idm", Sub(idm)
Dim factory = New IdentityManager.Configuration.IdentityManagerServiceFactory
factory.IdentityManagerService = New Registration(Of IIdentityManagerService)(Function(resolver)
Dim userManager = New UserManager(Of Microsoft.AspNet.Identity.EntityFramework.IdentityUser)(New UserStore(Of Microsoft.AspNet.Identity.EntityFramework.IdentityUser))
Dim roleManager = New RoleManager(Of IdentityRole)(New RoleStore(Of IdentityRole)())
Return New AspNetIdentityManagerService(Of IdentityUser, String, IdentityRole, String)(userManager, roleManager)
End Function)
Factory.Register(New Registration(Of ApplicationUserManager)())
idm.UseIdentityManager(New IdentityManagerOptions() With {.Factory = factory, .DisableUserInterface = False})
End Sub
)
Also tried cloning the online sample (that, "as is", works well):
<Assembly: OwinStartupAttribute(GetType(Startup))>
Partial Public Class Startup Public Sub Configuration(app As IAppBuilder) ConfigureAuth(app)
Logger.SetLogWriter(New LogWriterFactory().Create())
app.Map("/idm", Sub(idm)
Dim factory = New IdentityManagerServiceFactory()
factory.IdentityManagerService = New Registration(Of IIdentityManagerService, ApplicationIdentityManagerService)()
factory.Register(New Registration(Of ApplicationUserManager)())
factory.Register(New Registration(Of ApplicationUserStore)())
factory.Register(New Registration(Of ApplicationRoleManager)())
factory.Register(New Registration(Of ApplicationRoleStore)())
'factory.Register(new Registration<ApplicationDbContext>(resolver => new ApplicationDbContext("foo")));
factory.Register(New Registration(Of ApplicationDbContext)())
idm.UseIdentityManager(New IdentityManagerOptions() With {.Factory = factory})
End Sub)
End Sub
End Class
Public Class ApplicationUserStore Inherits UserStore(Of ApplicationUser) Public Sub New(ctx As ApplicationDbContext) MyBase.New(ctx) End Sub End Class
Public Class ApplicationRoleStore Inherits RoleStore(Of IdentityRole) Public Sub New(ctx As ApplicationDbContext) MyBase.New(ctx) End Sub End Class
Public Class ApplicationRoleManager Inherits RoleManager(Of IdentityRole) Public Sub New(roleStore As ApplicationRoleStore) MyBase.New(roleStore) End Sub End Class
Public Class ApplicationIdentityManagerService Inherits AspNetIdentityManagerService(Of ApplicationUser, String, IdentityRole, String) Public Sub New(userMgr As ApplicationUserManager, roleMgr As ApplicationRoleManager) MyBase.New(userMgr, roleMgr) End Sub End Class
BTW without Logger.SetLogWriter(New LogWriterFactory().Create()) I've a runtime error
Do you have RAMMAR enabled?
What? :)
You can also read more of the docs here: https://github.com/IdentityManager/IdentityManager/wiki/Installing-and-Hosting
sure I've runAllManagedModulesForAllRequests on...
Are you running over HTTPS? If not, then you need to configure IdentityManagerOptions.RequireSsl
got it! it was the HTTP (not S)... I suggest to clear this in the wiki :) Now the GUI starts. It doesn't work (operations will fail), but I think this will be some trouble with asp.net identity integration option..
Ok, good to hear that you're making progress :)
That took me a while, cheers @Trapulo !
Calling /idm I get an 404 error, and url has been changed to
http://localhost:61581/idm/authorize?state=29981995698981714&client_id=idmgr&response_type=token