ASP .Net MVC 4, Invalid value for key 'attachdbfilename'

后端 未结 1 545
春和景丽
春和景丽 2021-01-13 12:26

I\'m new to asp.net mvc 4

Below is my connection string



        
1条回答
  •  执笔经年
    2021-01-13 12:55

    Try changing your connection string to:

    
    

    Change Data Source to : Data Source=.; or Data Source=.\SQLEXPRESS;

    After that, you need to configure access right to App_Data. For Win7, On Security tab in properties Add user network Service with full right.

    Found similar question:

    asp.net mvc Invalid value for key 'attachdbfilename'

    Or in my opinion, it might be just a typo in your connection string. Because you don't have escape character for (LocalDB)\v11.

    Try writing Data Source=(LocalDB)\\v11;

    0 讨论(0)
提交回复
热议问题