账号通
    

账号  

密码  

1781

查看

2

回复
主题:[求帮助]NET3.0.0810地区设置管理,增加删除地区报错 [收藏主题]  
ruohong_sx 当前离线

57

主题

7

广播

0

粉丝
添加关注
级别:学前班

用户积分:448 分
登录次数:71 次
注册时间:2007/10/11
最后登录:2019/7/19
ruohong_sx 发表于:2015/10/23 12:49:32   | 只看该作者 查看该作者主题 楼主 
科汛在线网校系统
NET3.0.0810地区设置管理,删除地区报错:

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

已添加项。字典中的关键字:“id”所添加的关键字:“id”
  说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.ArgumentException: 已添加项。字典中的关键字:“id”所添加的关键字:“id”

源错误:


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

堆栈跟踪:



[ArgumentException: 已添加项。字典中的关键字:“id”所添加的关键字:“id”]
   System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) +11118506
   System.Collections.Hashtable.Add(Object key, Object value) +10
   Kesion.NET.WebSite.Admin_System_Area.gEQsE0WUHv(Int32 ) +936
   Kesion.NET.WebSite.Admin_System_Area.AreaList_RowCommand(Object sender, GridViewCommandEventArgs e) +813
   System.Web.UI.WebControls.GridView.OnRowCommand(GridViewCommandEventArgs e) +111
   System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +73
   System.Web.UI.WebControls.GridView.OnBubbleEvent(Object source, EventArgs e) +89
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.GridViewRow.OnBubbleEvent(Object source, EventArgs e) +88
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +121
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +156
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9664706
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724

  


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.34209




增加地区时报错:

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

当 IDENTITY_INSERT 设置为 OFF 时,不能为表 'KS_Area' 中的标识列插入显式值。
  说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.Data.SqlClient.SqlException: 当 IDENTITY_INSERT 设置为 OFF 时,不能为表 'KS_Area' 中的标识列插入显式值。

源错误:


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

堆栈跟踪:



[SqlException (0x80131904): 当 IDENTITY_INSERT 设置为 OFF 时,不能为表 'KS_Area' 中的标识列插入显式值。]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +1787814
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +5341674
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +546
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +1693
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +275
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) +1421
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) +177
   System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite) +208
   System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +163
   Kesion.DataBase.DBHelper.ExecuteNonQuery(DbConnection connection, CommandType commandType, String commandText, DbParameter[] commandParameters) +70
   Kesion.DataBase.DBHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, DbParameter[] commandParameters) +83
   Kesion.DataBase.DBHelper.ExecuteNonQuery(CommandType commandType, String commandText, DbParameter[] commandParameters) +27
   Kesion.SqlDAL.CommonData.Insert(String tablename, Hashtable sqlparam, String condition) +1347
   Kesion.SqlDAL.CommonData.Insert(String tablename, Hashtable sqlparam) +62
   Kesion.BLL.CommonData.Insert(String tablename, Hashtable param) +59
   Kesion.NET.WebSite.Admin_System_Area.Foot2_Submit(Object sender, EventArgs e) +1397
   Kesion.Controls.Foot.OnSubmit(EventArgs e) +159
   Kesion.Controls.Foot.Ak0voxrVC(Object , EventArgs ) +46
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9628114
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +103
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724

  


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.34209
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
zxp601942721 当前离线

34

主题

8

广播

1

粉丝
添加关注
级别:学前班

用户积分:77 分
登录次数:53 次
注册时间:2015/2/7
最后登录:2016/2/18
zxp601942721 发表于:2015/10/23 13:34:19   | 只看该作者 查看该作者主题 沙发 
科汛在线网校系统
删除地区需要从三级删除 才能删除2级
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
ruohong_sx 当前离线

57

主题

7

广播

0

粉丝
添加关注
级别:学前班

用户积分:448 分
登录次数:71 次
注册时间:2007/10/11
最后登录:2019/7/19
ruohong_sx 发表于:2015/10/23 16:07:11   | 只看该作者 查看该作者主题 藤椅 

从三级地区是能删除了,还是不能添加呀,手动执行

SET IDENTITY_INSERT语句设置还是不行,这是怎么回事儿,官方出来给个答案呀


 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行0.13916秒 powered by KesionCMS 9.0