The type String cannot be constructed. You must configure the container to supply this value.
利用 Enterprise Library 5.0
Microsoft.Practices.EnterpriseLibrary.Common
Microsoft.Practices.EnterpriseLibrary.Data
Microsoft.Practices.ServiceLocation
引用都添加了
EnterpriseLibraryContainer.Current.GetInstance<SqlDatabase>("SQLConnString"); 运行到此处一直报错
The type String cannot be constructed. You must configure the container to supply this value.
后发现问题 出现在此:
<add name="SQLConnString" connectionString="server=127.0.0.1;database=ddbb;uid=dd;pwd=11;" />
再加上 providerName="System.Data.SqlClient"
<add name="SQLConnString" connectionString="server=172.20.20.13;database=ProjectDB;uid=sa;pwd=11;" providerName="System.Data.SqlClient" />
都正常了
The type String cannot be constructed. You must configure the container to supply this value.的更多相关文章
- swift2.0 Cannot assign a value of type '[CFString]' to a value of type '[String]'
Cannot assign a value of type '[CFString]' to a value of type '[String]' 代码示例如下: picker.mediaTypes = ...
- go语言byte类型报错cannot use "c" (type string) as type byte in assignment
练习Go修改字符串的时候遇到这个问题:cannot use "c" (type string) as type byte in assignment,代码如下: package m ...
- 解决 'Could not convert variant of type (NULL) into type (String)
写存储过程中有不允许为空的字段,在客户端转化取数时显示 Could not convert variant of type (NULL) into type (String) 可以在存储过程中使用is ...
- 无法将类型“System.Collections.Generic.List<anonymous type:string ClassID,string ClsssName>”隐式转换为“System.Collections.Generic.List<Ecology.Model.EnergyFlowGraph>”
无法将类型“System.Collections.Generic.List<anonymous type:string ClassID,string ClsssName>”隐式转换为“Sy ...
- mongolass 中报 ($.content: "say Hi ~") ✖ (type: String)
第二次报这个错了, 一直以为MongoDB的模型用的type 是 String, 一直报错, 找不到原因. // 留言模型1 exports.Comment = mongolass.model('Co ...
- (type interface {}) to type string
go 语言开发中,经常会在函数中碰到使用 insterface{} 作为接收任意参数,但是我们接收的数据经常是需要做类型转换,由于是初学者,因此,初次转换我是直接就 func New(paramete ...
- 报错The "chunk" argument must be one of type string or Buffer. Received type object
报错内容: TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be one of type string or ...
- The method format(String, Object[]) in the type String is not applicable for the arguments
今天,我弟遇到一个有意思的错误~ 程序: package com.mq.ceshi1; public class StringFormat { public static void main(Stri ...
- 记录一个EF连接查询的异常:the entity or complex type 'x' cannot be constructed in a linq to entities query
问题解决连接:https://stackoverflow.com/questions/5325797/the-entity-cannot-be-constructed-in-a-linq-to-ent ...
随机推荐
- div css 自适应
怎样实现响应式布局? 对于这个问题,我们可以通过CSS3中的Media Query来实现,即媒介查询.媒体查询让CSS可以更精确作用于不同的媒体类型和同一媒体的不同条件.媒体查询的大部分媒体特性都接受 ...
- android HAL 教程(含实例)
http://www.cnblogs.com/armlinux/archive/2012/01/14/2396768.html Android Hal 分析 ...
- HQL查询——关联和连接
HQL查询--关联和连接 为了便于理解有关的使用关联和连接进行HQL查询,首先提供两个具有关联关系的持久化类:Person类和MyEvent类 Person类: import javax.persis ...
- Unity手撸2048小游戏——自动生成4*4棋盘
1.新建文件夹,命prefabs,将刚刚做成的Chessman拖入该文件下,做成预制体 2.删除panel下的Chessman 3.在panel下,新建一个空对象,命名为Chessboard,大小设置 ...
- linux安装配置apk打包程序gradle+jdk+Android_sdk+python自动化编译脚本
安装gradle: 1.下载gradle包 去这里下载需要的tar.gz包:https://services.gradle.org/distributions/ 2.解压 tar zxvf gradl ...
- 1006. Sign In and Sign Out (25)
At the beginning of every day, the first person who signs in the computer room will unlock the door, ...
- CSUOJ_1002
/* * Title : A+B(III) * Data : 2016/11/09 * Author : Andrew */ #include <iostream> #include &l ...
- 16个基本颜色关键字 Basic color keywords
16个基本颜色关键字 Basic color keywords Color Color Name HEX RGB black #000000 0,0,0 silver #C0C0C0 192, ...
- Windows_RTM_RC
1.https://zhidao.baidu.com/question/172764638.html RTM(Release to Manufacturing)版 软件在正式在零售商店上架前,需要一段 ...
- java Collections.sort()实现List排序自定义方法
方法一: package testSimple; import java.util.ArrayList; import java.util.Collections; import java.util. ...