请高手帮我看下我的连接文件哪里出错了,原来是2005数据库被我导成2000数据库

yeyang888 2010-09-26 09:26:15
以下是web.config 连接代码,是不是哪个代码区分2000跟2005的数据库

<?xml version="1.0"?>
<configuration>
<configSections>
<section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter"/>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/></sectionGroup></sectionGroup></sectionGroup>
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"/>


</configSections>

<appSettings>
<add key="WebDAL" value="JuSNS.SQLServer"/>
</appSettings>

<dataConfiguration defaultDatabase="snsconstr">
<providerMappings>
<add databaseType="Microsoft.Practices.EnterpriseLibrary.Data.GenericDatabase, Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" name="GenericDatabase"/>
<add databaseType="Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase, Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" name="System.Data.SqlClient"/>
</providerMappings>
</dataConfiguration>

<connectionStrings>
<add name="snsconstr" connectionString="server=(local);uid=888;pwd=888888;database=888888;Pooling=true;" providerName="GenericDatabase"/>
</connectionStrings>
<system.data>
<DbProviderFactories>
<add name="my Generic Database" invariant="GenericDatabase" description="An alias for the SqlProvider" type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</DbProviderFactories>
</system.data>
<system.web>

<httpModules>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter"/>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add type="Discuz.Forum.HttpModule, Discuz.Forum" name="HttpModule" />
<add name="HiHttpModule" type="HD.SystemServices.HiHttpModule,HD.SystemServices"/>

</httpModules>
<httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="4096" executionTimeout="60"/>
<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
<compilation debug="false">
<assemblies>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies>
</compilation>
<pages validateRequest="false">
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="hd" namespace="HD.Web.Controls" assembly="HD.Web.Controls"/>

</controls></pages>

<authentication mode="Forms">
<forms name="NewsAuth" loginUrl="/system/login.aspx" defaultUrl="/system/index.aspx" timeout="30000" path="/" cookieless="UseCookies" slidingExpiration="true"></forms>
</authentication>

<customErrors mode="On" defaultRedirect="errors.htm">
<error statusCode="403" redirect="errors.htm"/>
<error statusCode="404" redirect="errors.htm"/>
</customErrors>
<xhtmlConformance mode="Legacy"/>
<httpHandlers>
<add type="Vincent.AutoAuthCode.AuthCode,Vincent.AutoAuthCode, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b633909bc009d6d9" verb="GET" path="AuthCode_Image.ashx" validate="false"/>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpHandlers>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<defaultDocument>
<files>
<clear/>
<add value="index.aspx"/>
<add value="index.html"/>
<add value="index.htm"/>
</files>
</defaultDocument>
<modules runAllManagedModulesForAllRequests="true">
<remove name="ScriptModule"/><add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule"/>
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices"/>
<remove name="ScriptResource"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></handlers></system.webServer>
<rewriter>
<!-- <rewrite url="~/user/u(.+).aspx" to="~/user/index.aspx?r=$1" />
<rewrite url="~/ask/q(.+).aspx" to="~/home/ask/content.aspx?id=$1"/>
<rewrite url="~/blog/b(.+).aspx" to="~/home/blog/article.aspx?r=$1"/>
<rewrite url="~/news/n(.+).aspx" to="~/home/news/content.aspx?nid=$1"/>
<rewrite url="~/default.aspx" to="~/home/ram/net.aspx"/>-->
</rewriter>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/></compiler></compilers></system.codedom>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly></assemblyBinding></runtime></configuration>
...全文
100 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
ai_li7758521 2010-09-27
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 yeyang888 的回复:]
有时会有关系的
[/Quote]不是2000数据库的问题。仔细检查:
Server Error in '/' Application.

Line 104: <rewrite url="~/ask/q(.+).aspx" to="~/home/ask/content.aspx?id=$1"/>
Line 105: <rewrite url="~/blog/b(.+).aspx" to="~/home/blog/article.aspx?r=$1"/>
Line 106: <rewrite url="
yeyang888 2010-09-26
  • 打赏
  • 举报
回复
有时会有关系的
ai_li7758521 2010-09-26
  • 打赏
  • 举报
回复
不理解。导成2000和配置文件没有关系吧?
yeyang888 2010-09-26
  • 打赏
  • 举报
回复
Server Error in '/' Application.
--------------------------------------------------------------------------------

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Unexpected end of file while parsing Comment has occurred. Line 106, position 17.

Source Error:


Line 104: <rewrite url="~/ask/q(.+).aspx" to="~/home/ask/content.aspx?id=$1"/>
Line 105: <rewrite url="~/blog/b(.+).aspx" to="~/home/blog/article.aspx?r=$1"/>
Line 106: <rewrite url="



Source File: d:\vip\yeyang\web\web.config Line: 106


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3614
Rotel-刘志东 2010-09-26
  • 打赏
  • 举报
回复
看的有点晕!
喜-喜 2010-09-26
  • 打赏
  • 举报
回复
原来是2005数据库被你导成2000数据库之后,程序或网站运行之后提示什么错误??

22,209

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 疑难问题
社区管理员
  • 疑难问题社区
  • 尘觉
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧