| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 7388 人关注过本帖
标题:新手 求助 ConnectionString 属性尚未初始化。
只看楼主 加入收藏
wengbin22
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2008-11-4
收藏
得分:0 
回复 9# 的帖子
谢谢我去试一下!!!
2008-11-05 10:58
wengbin22
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2008-11-4
收藏
得分:0 
还是这个问题:::

“/”应用程序中的服务器错误。
--------------------------------------------------------------------------------

ConnectionString 属性尚未初始化。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.InvalidOperationException: ConnectionString 属性尚未初始化。

源错误:

执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。  

堆栈跟踪:


[InvalidOperationException: ConnectionString 属性尚未初始化。]
   System.Data.SqlClient.SqlConnection.PermissionDemand() +852243
   System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection) +22
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
   System.Data.SqlClient.SqlConnection.Open() +111
   WanerSoft.Cache.SysLoad.LoadData() +128
   WanerSoft.Cache.Global.Application_Start(Object sender, EventArgs e) +17




--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:2.0.50727.42; 版本:2.0.50727.42
2008-11-05 12:50
wengbin22
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2008-11-4
收藏
得分:0 
这个是配置文件!!

<?xml version="1.0" encoding="gb2312"?>

<configuration>
    <configSections>
        <section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
    </configSections>
    <RewriterConfig>
        <Rules>
            <RewriterRule>
                <LookFor>~BuyBook/B(\d+)\.aspx</LookFor>
                <SendTo>~/BuyBook/Buy.aspx?id=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/N(\d+)\.aspx</LookFor>
                <SendTo>~/NewsType.aspx?id=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/W(\d+)\.aspx</LookFor>
                <SendTo>~/WriterType.aspx?id=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/WB(\d+)\.aspx</LookFor>
                <SendTo>~/WriterType.aspx?bookid=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/GuestBook/B(\d+)\.aspx</LookFor>
                <SendTo>~/GuestBook/Index.aspx?id=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/GuestBook/W(\d+)\.aspx</LookFor>
                <SendTo>~/GuestBook/Writer.aspx?id=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Vip/B(\d+)\.aspx</LookFor>
                <SendTo>~/Vip/BuyOrder.aspx?id=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Vip/V(\d+)\.aspx</LookFor>
                <SendTo>~/Vip/ShowBookOrder.aspx?id=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Book/(\d+)\.aspx</LookFor>
                <SendTo>~/Book/ShowBook.aspx?id=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Book/(\d+)/(\d+)\.aspx</LookFor>
                <SendTo>~/Book/ReadBook.aspx?id=$1&amp;textid=$2</SendTo>
            </RewriterRule>
             <RewriterRule>
                <LookFor>~/Book/List/(\d+)\.aspx</LookFor>
                <SendTo>~/Book/ReadList.aspx?id=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Book/Index/(\d+)\.aspx</LookFor>
                <SendTo>~/Book/ReadIndex.aspx?id=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Book/VLC(\d+)\.aspx</LookFor>
                <SendTo>~/Book/VipShowBookList.aspx?id=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Book/VLN(\d+)\.aspx</LookFor>
                <SendTo>~/Book/VipShowBookList.aspx?nclassid=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Book/LC(\d+)\.aspx</LookFor>
                <SendTo>~/Book/ShowBookList.aspx?id=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Book/LN(\d+)\.aspx</LookFor>
                <SendTo>~/Book/ShowBookList.aspx?nclassid=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Book/D(\d+)\.aspx</LookFor>
                <SendTo>~/Book/ShowBookDown.aspx?id=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Book/B(\d+)N(\d+)\.aspx</LookFor>
                <SendTo>~/Book/ShowBookNclassText.aspx?bookid=$1&amp;nclassid=$2</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Book/C(\d+)\.aspx</LookFor>
                <SendTo>~/Book/ShowBookCom.aspx?id=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Book/J(\d+)\.aspx</LookFor>
                <SendTo>~/Book/ShowBookCom.aspx?id=$1&amp;j=1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Essay/Read/(\d+)\.aspx</LookFor>
                <SendTo>~/Essay/ReadBook.aspx?id=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Essay/W(\d+)\.aspx</LookFor>
                <SendTo>~/Essay/WriterType.aspx?id=$1</SendTo>
            </RewriterRule>    
            <RewriterRule>
                <LookFor>~/Essay/LC(\d+)\.aspx</LookFor>
                <SendTo>~/Essay/Class.aspx?id=$1</SendTo>
            </RewriterRule>   
            <RewriterRule>
                <LookFor>~/Essay/CN(\d+)\.aspx</LookFor>
                <SendTo>~/Essay/Class.aspx?nclassid=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Essay/U(\d+)\.aspx</LookFor>
                <SendTo>~/Essay/U.aspx?id=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Essay/CM(\d+)\.aspx</LookFor>
                <SendTo>~/Essay/Comment.aspx?id=$1</SendTo>
            </RewriterRule>
        </Rules>
      </RewriterConfig>
  <appSettings>
      <add key="ebaistr" value="Server=(local);User id=sa;Pwd=50159132222;Server=(local);User id=sa;Pwd=50159132222;Database=WanerSoft2006"></add>
        <!--定义数据连接,请更改用户名、密码、数据名称-->
      <add key="Foldersclass" value="0"></add>
        <!--定义是否使用虚拟目录或二级目录及以下目录等级,如果不是根目录请设置为1, 0 否,1是-->
      <add key="RootFolder" value="book"></add>
        <!--如果是虚拟目录或二级目录及以下,请填写目录名称!前面和最后不要带/号-->
      <add key="StoryDir" value="Html/Book"></add>
        <!--生成连载Html保存路径,前面和最后不要带/号-->
      <add key="EssayDir" value="Html/Essay"></add>
        <!--生成短篇Html保存路径,前面和最后不要带/号-->
      <add key="XmlDir" value="Xml"></add>
        <!--生成Xml文件保存路径,此目录一般是存放推荐列表或者其他列表用的,前面和最后不要带/号-->
        <add key="DownImgDir" value="DownImg"></add>
        <!--远程抓取图片保存目录,格式为 此目录名/书籍ID/文件名,前面和最后不要带/号-->
      <add key="UpPhotoFiles" value="UploadPhoto"></add>
        <!--上传图片地址,包括封面,前面和最后不要带/号-->
      <add key="BookTextDir" value="BookTextDir/Text/Book/Save"></add>
        <!--连载章节内容war文件保存地址,请自行更改,前面和最后不要带/号-->
      <add key="EssayTextDir" value="BookTextDir/Text/Essay/Save"></add>
        <!--短篇文章内容war文件保存地址,请自行更改,前面和最后不要带/号-->
      <add key="AdsDir" value="Ads"></add>
        <!--站内广告文件存放目录,前面和最后不要带/号-->
      <add key="UpFileExt" value="jpg,gif,bmp,jpeg,png"></add>
        <!--允许上传文件的类型,用,号隔开-->
      <add key="A_login" value="Admin/Error.aspx"></add>
        <!--定义后台验证错误后的转向地址,可修改为其他,掩盖实际登陆页面!前面和最后不要带/号-->
  </appSettings>
  <system.web>
      <compilation defaultLanguage="vb" debug="true" />
        <!--程序正常运行后,请更改debug为false -->
      <customErrors mode="Off" />
        <!--自定义错误信息,"On" 始终显示自定义(友好的)信息。"Off" 始终显示详细的错误信息。"RemoteOnly" 只对不在本地 Web 服务器上运行的用户显示自定义(友好的)信息。\ -->
      <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
      <!--<sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="120" />-->
      <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="120" />
      <!--会话状态设置,Session超时为120分钟,若要禁用 Cookie,请设置 sessionState cookieless="true"。-->
      <globalization fileEncoding="gb2312" requestEncoding="gb2312" responseEncoding="gb2312" culture="zh-CN" />
        <!--全球化设置-->
      <pages buffer="true" enableSessionState="true" validateRequest="false" enableViewState="true" enableViewStateMac="false" smartNavigation="false" />
        <!--如果为.net SDK 1.0及以前版本,请删除validateRequest="false" -->
      <httpRuntime maxRequestLength="409600" executionTimeout="900" appRequestQueueLimit="1000" useFullyQualifiedRedirectUrl="true" />   
        <!--控制用户上传文件最大为4M,最长时间为60秒,最多请求数为1000-->
         <httpModules>
                <add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter" />
             <add name="WebbHttpModule" type="WanerSoft.Sys.Upload.WebbHttpModule, WanerSoft.Sys.Upload" />
      </httpModules>
      <httpHandlers>
            <add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
            <add verb="*" path="progress.ashx" type="WanerSoft.Sys.Upload.WebbUploadStatusHandler, WanerSoft.Sys.Upload" />
      </httpHandlers>
    </system.web>
         <startup>
        <requiredRuntime version="v1.1.4322" />
        <supportedRuntime version="v1.1.4322" />
    </startup>
</configuration>
2008-11-05 12:52
wengbin22
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2008-11-4
收藏
得分:0 
会不会是目录问题!
2008-11-05 12:54
wengbin22
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2008-11-4
收藏
得分:0 
我的系统是server 2003
.net 2.0
sql 2000

这个小说系统的配置要求如下

[系统要求]   
 
  推荐运行环境 win2000推荐环境 本地调试建议 最低运行环境
操作系统 windows2003+sp1 windows2000 + sp4 windowsxp+sp1 Windows2000 + sp2
浏览器 IE6.0 + sp1(自带) IE6.0 + sp1 IE6.0 + sp1 IE5.5
数据库 MS SQL 2000+sp4 MS SQL 2000+sp4 MS SQL 2000+sp4  MS SQL 2000  
.Net SDK 1.1 正式版(自带)+sp1 1.1 正式版+sp1 1.1 正式版+sp1 1.0正式版

要安装运行环境,请按顺序安装以下软件:(2003服务器不需要安装如下软件)

IE6.0 sp1 中文版
下载地址: http://download.

.Net Framework 1.1 可再发行组件包
下载地址:http://www.

.Net SDK 1.1 中文正式版
下载地址:http://www.

.Net Framework 1.1 sp1 for win2000,winxp
下载地址:http://www.

.NET Framework 1.1 Service Pack 1 安全更新 for win2000,winxp
下载地址:http://www.

.Net Framework 1.1 sp1 for win2003
下载地址:http://www.

注:使用.Net SDK 1.0的话请用记事本打开web.config删除 <pages validateRequest="false"/> 这一行
2008-11-05 12:58
快速回复:新手 求助 ConnectionString 属性尚未初始化。
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.042861 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved