tugberkugurlu / AspNet.Identity.RavenDB

Fully asynchronous, new and sweet ASP.NET Identity implementation for RavenDB
MIT License
42 stars 28 forks source link

Upgrade to RavenDB3 and PRE6 Issue #41

Open p10tyr opened 9 years ago

p10tyr commented 9 years ago

After updating to PRE6 I am getting this error now. I was using RavenDB build 3.3528 with PRE1 I think it was OK but I had issues with getting roles for a user.

Something that the ApplicationUser could not be cast to Models.Person (my own model) Not even sure why it was saying that. But I read that RavenDB 2 to 3 had some breaking changes and it was likley to that. (Even though I was already on RavenDB 3)

I upgraded Identity to PRE6 and raven to 3.3690 (When I run the sample from tag PRE6 I get the same issues (I thought I did but it worked fine in the end) + optimistic concurrency is not set on AutoFac too, on the sample!)

I get this error now.

Method not found: 'System.Threading.Tasks.Task1<!!0> Raven.Client.IAsyncDocumentSession.LoadAsync(System.String).

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.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<!!0> Raven.Client.IAsyncDocumentSession.LoadAsync(System.String)'.

Source Error: 

Line 49:             if (ModelState.IsValid)
Line 50:             {
Line 51:                 var user = await UserManager.FindAsync(model.UserName, model.Password);
Line 52:                 if (user != null)
Line 53:                 {
p10tyr commented 9 years ago

I figured this one out. Its not about the version of the Server for RavenDB its a bout the Client in the application. I was using the latest 3 something. Comparing to the sample which is using 2.5.2750.

I downgraded my solution to use RavenDB.Client 2.5.2750 (Server still 3690) and it worked. (Then then tried the latest stable 2.5.2956 and that also works. )

I also had to remove RavenDB dependencies from web.config to RaveDB.LightwieghtClient and RavenDB.Abstractions


Still- It is an issue with version 3 of the Raven Client that is not documented neither is there a test in the Identity.RavenDB to atleast throw an exception. ie, like for UseOptimisticConcurrency exception.