我现在刚下了个企业库2.0,由于不会配置web.config和dataconfiguration.config,
所以无法使用.
有哪个高人用过?贴出代码与下载的企业库版本(2.0的企业库有二个版本).谢谢.
所以无法使用.
有哪个高人用过?贴出代码与下载的企业库版本(2.0的企业库有二个版本).谢谢.
解决方案 »
- 第一次在csdn上问问题,菜鸟问题,高手帮帮忙
- 大家好~!我想问,在.NET中,哪位仁兄有省份,城市的下拉框选择代码给看看呢,非常感谢~!
- dropdownlist中数据重复问题
- Datagrid的小问题
- 急用,请教:脚本能否调用本地库函数??
- 文字显示问题
- 怎么让TreeView 控件的结点,变成单选框的形式!
- vs2008中 母版页布局的选择
- 送分问题,登录之后如何转到主页面?
- 求个工作日判断函数
- 使用window.Open方法打开了多个窗口,在使用window.close时如何只关闭指定的某个窗口?!
- ===PreviousPage.IsCrossPagePostBack 为什么提示未将对象引用设置到对象的实例??===
在2.0 的企业库中是没有dataconfiguration.config
这个文件,直接通过 web.config 就可以访问数据库了,我给你发个完整的 web.config
<?xml version="1.0" encoding="utf-8"?><configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<configSections>
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"/>
</configSections>
<dataConfiguration defaultDatabase="Connection String"/>
<connectionStrings>
<add name="Connection String" connectionString="database=HTSiteData;Server=.;uid=sa;pwd=sa;" providerName="System.Data.SqlClient"/>
</connectionStrings>
<appSettings>
<add key="FCKeditor:BasePath" value="~/FCKeditor/"/> <add key="FCKeditor:UserFilesPath" value="/FCKPro/Files" />
</appSettings>
<system.web>
<!--
设置 compilation debug="true" 将调试符号插入
已编译的页面中。但由于这会
影响性能,因此只在开发过程中将此值
设置为 true。
-->
<compilation debug="true">
<assemblies>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
</assemblies></compilation>
<!--
通过 <authentication> 节可以配置 ASP.NET 使用的
安全身份验证模式,
以标识传入的用户。
-->
<authentication mode="Windows"/>
<!--
如果在执行请求的过程中出现未处理的错误,
则通过 <customErrors> 节可以配置相应的处理步骤。具体说来,
开发人员通过该节可以配置
要显示的 html 错误页
以代替错误堆栈跟踪。 <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
--> <httpRuntime maxRequestLength="10240" executionTimeout="3600"/>
</system.web>
</configuration>
Microsoft.Practices.EnterpriseLibrary.Data.dll
数据库操作即可正常运行。
在 winform 中
还需要引入一个Microsoft.Practices.ObjectBuilder.dll
负责无法运行