【问题标题】:Error While opening a page in My Website在我的网站中打开页面时出错
【发布时间】:2014-09-22 13:50:57
【问题描述】:

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

不支持关键字:'userid'。

说明:在执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。

异常详情: System.ArgumentException:不支持关键字:'userid'。

来源错误:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

堆栈跟踪:

[ArgumentException: Keyword not supported: 'userid'.]
   System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey) +6363422
   System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules) +122
   System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) +113
   System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) +35
   System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +221
   System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value) +64
   System.Web.UI.WebControls.SqlDataSource.CreateConnection(String connectionString) +44
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +150
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +27
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +261
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
   System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +95
   System.Web.UI.Control.EnsureChildControls() +146
   System.Web.UI.Control.PreRenderRecursiveInternal() +61
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394

版本信息: Microsoft .NET Framework 版本:2.0.50727.8009; ASP.NET 版本:2.0.50727.8010

【问题讨论】:

    标签: c# asp.net visual-studio


    【解决方案1】:

    您连接到数据库的连接字符串有问题。它包含userid,而它应该是user id(之间有空格)。

    有关示例,请参阅 connectionstrings.com。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-16
      • 1970-01-01
      • 1970-01-01
      • 2015-09-19
      • 2012-01-20
      • 2015-02-25
      相关资源
      最近更新 更多