MVC “Add Controller” is “Unable to Retrieve Metadata…Config System Failed to Initialize”

前端 未结 11 1124
天涯浪人
天涯浪人 2021-01-04 18:31

From scratch, I made a new solution with two projects: one was MVC 3 and the other a supporting EF 4.2 project. The whole thing builds successfully. From the MVC project I

11条回答
  •  粉色の甜心
    2021-01-04 18:51

    I face this issue "Unable to retrieve metadata..." while I was dding a Controller. Solution for this is as follows.

    1. In Connection String change provider to "system.data.sqlclient" 2.or Remove the Connection String from the Web.config and Add controller and after adding controller again add the connection String.

    It seems this is a bug in MVC. I hope with this you can go ahead.

提交回复
热议问题