Code First can’t enable migrations

0
327

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 ****

LEAVE A REPLY

Please enter your comment!
Please enter your name here