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 ...
随机推荐
- Oracle数据库基础
Oracle基础知识 Oracle的主要特点 1.支持多用户.大事务量的事务处理 2.在保持数据安全性和完整性方面性能的优越 3.支持分布式数据处理.将分布在不同物理位置的数据库用通信网络连接起来,在 ...
- 使用 Laravel 前的准备工作
是的,使用 Laravel 前需要准备开发环境,准备工作做完后,就可以一门心思的投入到学习 Laravel 知识的战斗中去了. Larvavel 是一个 PHP 框架,API 非常语义化.它激进,使用 ...
- windows页面打印div(弹出新页面)
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http ...
- C#序列化及反序列化Json对象通用类JsonHelper
当今的程序界Json大行其道.因为Json对象具有简短高效等优势,广受广大C#码农喜爱.这里发一个序列化及反序列化Json对象通用类库,希望对大家有用. public class JsonHelper ...
- 头一次试验angularjs
<!DOCTYPE html> <head> <meta charset="utf-8" /> <title>angular< ...
- 关于url中的#-----hash
前言:不知道你们对url地址中的#一开始是怎么理解的,反正我以前一直都是默认那就是本页面中该id的位置.今天看了篇文章,才把这个真正透彻理解. 1,#涵义 #代表网页中的一个位置.其右面的字符,就是该 ...
- jsonp的使用
假设我们已经了解什么是同源策略,以及什么是浏览器的同源策略的限制. 现在我们需要在a.demo.com下的某个页面one.html 里加载不同域b.demo.com下的json数据. 我们都知道用&l ...
- bootstrap-table填坑之旅<二>事件
接着研究bootstrap-table... ... 这一篇研究bootstrap-table的事件及回调函数 先上一个demo HTML <div class="alert aler ...
- 整合TabBarController与NavigationController
一.项目结构 一开始创建一个空的项目
- javascript实现登录验证码
1.js var code="" ; //在全局 定义验证码 function createCode(){ code = ""; ;//验证码的长度 var c ...