Code First can’t enable migrations

Mã lỗi:

Checking if the context targets an existing database… System.TypeInitializationException: The type initializer for ‘System.Data.Entity.Migrations.DbMigrationsConfiguration`1’ threw an exception. —> System.TypeInitializationException: The type initializer for ‘System.Data.Entity.Internal.AppConfig’ threw an exception. —> System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize —> System.Configuration.ConfigurationErrorsException: The ‘name’ attribute must be specified on the ‘section’ tag.

Nguyên nhân:

Bạn đặt ** **ở phía trên đầu Web.config phía sau ****

Khắc phục:

Di chuyển ** **xuống phía dưới nằm bên trên ****

Published by Andy

Hi! I'm Andy. I'm a Software Engineer. I like technology and travelling. "Life is not fair - get used to it !"

Leave a comment

Your email address will not be published. Required fields are marked *