Error Identityconfig

Asked

Viewed 166 times

0

I am trying to implement Identity in my project but my Identityconfig is giving several errors. I just started messing with Identity and I’m hitting myself a little.

Primeiro erro Segundo erroTerceiro erroQuarto erro

Packages.config

<package id="Antlr" version="3.4.1.9004" targetFramework="net45" /> 
<package id="bootstrap" version="3.0.0" targetFramework="net45" />
<package id="EntityFramework" version="6.1.0" targetFramework="net45" /> 
<package id="jQuery" version="1.10.2" targetFramework="net45" /> 
<package id="jQuery.Validation" version="1.11.1" targetFramework="net45" /> 
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net45" /> 
<package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.1" targetFramework="net45" /> 
<package id="Microsoft.AspNet.Identity.Owin" version="1.0.0" targetFramework="net45" /> 
<package id="Microsoft.AspNet.Mvc" version="5.0.0" targetFramework="net45" /> 
<package id="Microsoft.AspNet.Razor" version="3.0.0" targetFramework="net45" /> 
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.1" targetFramework="net45" /> 
<package id="Microsoft.AspNet.WebPages" version="3.0.0" targetFramework="net45" />
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.0.0" targetFramework="net45" /> 
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net45" /> 
<package id="Microsoft.Owin.Host.SystemWeb" version="2.0.0" targetFramework="net45" />
<package id="Microsoft.Owin.Security" version="2.0.0" targetFramework="net45" /> 
<package id="Microsoft.Owin.Security.Cookies" version="2.0.0" targetFramework="net45" /> 
<package id="Microsoft.Owin.Security.Facebook" version="2.0.0" targetFramework="net45" /> 
<package id="Microsoft.Owin.Security.Google" version="2.0.0" targetFramework="net45" /> 
<package id="Microsoft.Owin.Security.MicrosoftAccount" version="2.0.0" targetFramework="net45" /> 
<package id="Microsoft.Owin.Security.OAuth" version="2.0.0" targetFramework="net45" /> 
<package id="Microsoft.Owin.Security.Twitter" version="2.0.0" targetFramework="net45" /> 
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" /> 
<package id="Modernizr" version="2.6.2" targetFramework="net45" /> 
<package id="Newtonsoft.Json" version="5.0.6" targetFramework="net45" /> 
<package id="Owin" version="1.0" targetFramework="net45" /> 
<package id="Respond" version="1.2.0" targetFramework="net45" /> 
<package id="WebGrease" version="1.5.2" targetFramework="net45" />
  • 1

    And what are the mistakes?

  • The errors are similar : The type or namespace name ' ' could not be found (are you Missing a using Directive or an Assembly Reference?)

  • Yes, but we’re not looking at your screen. Can you please edit your question and put every mistake in it?

  • Another question @Ciganomorrisonmendez saw some comments that the right one would use 2 Context when working with Identity, this is correct ?

  • It is only correct if you use separate bases: one for your system, one for the user scheme and permissions. I need you now to edit your question with the contents of the file packages.config. Try not to use prints screen, which make it difficult to view.

1 answer

1


Packages are right, but outdated. Open the Package Manager Console (View > Other Windows > Package Manager Console) and type the following:

PM> Update-Package
  • Now it worked, stopped those bugs after I updated, but other errors occurred. ;(

  • Possibly your project is well disfigured. Re-edit your question (this time without deleting what was put before) by putting these new errors.

  • It is certainly very disfigured, at first I think it should be normal this. Now gave this error : The navigation Property 'Roles' declared on type 'Microsoft.AspNet.Identity.EntityFramework.Identityuser`4[System.String,Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin,Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole,Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim]' has been configured with conflicting multiplicities.

  • Now it is no longer configuration error. It is some code that you changed and that is wrong. It would be better to open another question detailing how your file is IdentityModels.cs.

  • 1

    A blz then. I will see if I can identify here and any doubt I open another question. Thanks for the help.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.