大家帮我看看这个源码为什么连不上数据库 http://down2.51aspx.com/jingmeiSchool.rar总是提示“实例失败”。有可能是源码自身的问题,之前贴出了一些连接代码,也问了许多人都没能解决,所以还是请有心人下载一下看看能不能连上,我知道没有这么帮人的,但也是出于无奈,很喜欢这个源码,谢谢了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这是web.config的代码,至于你说的连接字符串是写在一个类里的而不在web.config里<?xml version="1.0"?><configuration> <appSettings/> <connectionStrings/> <system.web> <!-- 设置 compilation debug="true" 可将调试符号插入 已编译的页面中。但由于这会 影响性能,因此只在开发过程中将此值 设置为 true。 --> <compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></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> --> <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/></system.web></configuration> SQLHelper.cs文件private static readonly string strConnection = @"server=.\sqlexpress;database=school;Persist Security Info=True;uid=sa;pwd=sa"; 改成 server=.;database=school;Security Integrated Security=True; 然后整个解决方案重新编译下在启动 如果你school附加在express的数据库上 server=.\sqlexpress 一个JS 的问题,急。。。帮帮忙 求助 在使用AjaxPro 架构时,由于他直接在HTML公开方法(API),带来隐性攻击问题,大家如何解决? 请问一下,如下访问错误,是怎么回事,谢谢 今天去面试了,一些面试题,大家讨论一下 老问题:权限,希望大家踊跃,来者有分 如何理解用webservice进行分布式计算,请执教! sql问题???? 怎样才能取得 treeview 中的 checkbox 的 id 值? 一个修改记录上传图片的问题?欢迎大家来指点, 求高手指点 RadioButtonList问题
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<!--
设置 compilation debug="true" 可将调试符号插入
已编译的页面中。但由于这会
影响性能,因此只在开发过程中将此值
设置为 true。
-->
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></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>
-->
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/></system.web>
</configuration>