相关疑难解决方法(0)

在web.config中放置连接字符串的位置

我的web.config看起来像这样:

<configuration>

  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <appSettings>
    <add key="webpages:Version" value="3.0.0.0" />
    <add key="webpages:Enabled" value="false" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.5.1" />
    <httpRuntime targetFramework="4.5.1" />
  </system.web>
  <runtime>
Run Code Online (Sandbox Code Playgroud)

当我在下面添加我的连接字符串时,<configuration>我得到一个错误,说只<configSections>允许一个元素.我应该把我的连接字符串放在哪里?

c# asp.net-mvc connection-string

8
推荐指数
1
解决办法
6755
查看次数

标签 统计

asp.net-mvc ×1

c# ×1

connection-string ×1