如何在我的Web配置connectionString(不支持关键字)代码中设置通用本地主机?

时间:2019-05-31 01:51:19

标签: c# asp.net-mvc entity-framework web-config localhost

我正在尝试调试代码,但是仅produto视图的索引出现错误:

  

'System.ArgumentException:'不支持的关键字:'.;初始目录'。'

这是Visual Studio 2017在Web.config上的配置

该错误显示在ProdutoController中

<connectionStrings>
    <add name="InstitutoDaveVieiraBD" connectionString=".;Initial Catalog=InstitutoDaveVieira;Integrated Security=True"
      providerName="System.Data.SqlClient" />
  </connectionStrings>

    public ActionResult Index()
            {
                return View(db.Produto.ToList());   
            }

0 个答案:

没有答案