日期:2014-05-18  浏览次数:20547 次

web.config 配置数据源问题
XML code

<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <configSections>
        <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
                    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                </sectionGroup>
            </sectionGroup>
        </sectionGroup>
    </configSections>
    <appSettings>
        <add key="ConnectionString" value="Data Source=192.168.1.106;Initial Catalog=SafetyData;User ID=class;Password=123456"/>
        <add key="ExtendedString" value="Max Pool Size = 5120;user id=sa;password=123456;data source=.;initial catalog=SafetyData;Provider=SQLOLEDB.1;timeout=90"/>
        <!--<add key="ConnectionString" value="Max Pool Size = 5120;user id=class;password=123456;data source=192.168.1.106;initial catalog=SafetyData;timeout=90"/>
      
    <add key="ExtendedString" value="Max Pool Size = 5120;user id=class;password=123456;data source=192.168.1.106;initial catalog=SafetyData;Provider=SQLOLEDB.1;timeout=90" />-->
    </appSettings>
    <connectionStrings>
        <!--http://10.33.136.231:2008/-->
        <!--<add name="themesCon" connectionString="Max Pool Size = 5120;Data Source=.;Initial Catalog=SafetyData;Persist Security Info=True;User ID=sa;Password=888888" providerName="System.Data.SqlClient"/>-->
        <add name="themesCon" connectionString="Max Pool Size = 5120;Data Source=192.168.1.106;Initial Catalog=SafetyData;P