下面我把这个问题的详情记录下来,这个bug也胸闷了半天,一直拖了几天,做客服工作的MM也找了我很多次谈话,一开口就是“哎呀!又有用户反映不能注册啊……”。为什么我不早些用google能,早些搜索,也就不至于一个人郁闷了。虽然没有找到直接答案,也通过累似的问题,加上自己的不断测试,断定了这是由于数据的长度不符合才造成的,感谢google.感谢自己的不懈努力,终于测试出问题所在了。
解决办法当然有多种,一是修改数据库字段大小; 二是加强数据强壮性,严格的输入判断。
目前是采用修改数据的方法:alter table1 alter column caller varchar(50)
程序还不够强壮啊,继续锻炼!
Server Error in '/Rainbow' Application.
--------------------------------------------------------------------------------
将截断字符串或二进制数据。语句已终止。
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: 将截断字符串或二进制数据。语句已终止。
Source Error:
Line 488: myInputs.Add("InputParams" , InputParams);
Line 489: myInputs.Add("RealModuleID" , ModuleID);
Line 490: workflow.DoAction(wid, actionId, myInputs);
Line 491: #region
Line 492: #region
Source File: C:\Inetpub\wwwroot\Rainbow\DesktopModules\TaokeCatalogs\Actions\Do.ascx.cs Line: 490
Stack Trace:
[SqlException: 将截断字符串或二进制数据。
语句已终止。]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +721
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +196
NHibernate.Impl.NonBatchingBatcher.AddToBatch(Int32 expectedRowCount) +43
NHibernate.Persister.EntityPersister.Update(Object id, Object[] fields, Boolean[] includeProperty, Object oldVersion, Object obj, SqlString sqlUpdateString, ISessionImplementor session) +709
NHibernate.Persister.EntityPersister.Update(Object id, Object[] fields, Int32[] dirtyFields, Object[] oldFields, Object oldVersion, Object obj, ISessionImplementor session) +111
NHibernate.Impl.ScheduledUpdate.Execute() +134
NHibernate.Impl.SessionImpl.ExecuteAll(IList list) +128
NHibernate.Impl.SessionImpl.Execute() +103
[ADOException: could not synchronize database state with session]
NHibernate.Impl.SessionImpl.Execute() +184
NHibernate.Impl.SessionImpl.Flush() +27
NHibernate.Transaction.AdoTransaction.Commit() +101
DotNetTools.Workflow.Spi.Hibernate.HibernateWorkflowStore.MarkFinished(IStep step, Int32 actionId, DateTime finishDate, String status, String caller) in D:\Working\Workflow\Workflow-Old\src\DotNetTools.Workflow\Spi\Hibernate\HibernateWorkflowStore.cs:309
[StoreException: Saving current step with action 102]
DotNetTools.Workflow.AbstractWorkflow.DoAction(Int64 id, Int32 actionId, IDictionary inputs) in D:\Working\Workflow\Workflow-Old\src\DotNetTools.Workflow\AbstractWorkflow.cs:721
Rainbow.DesktopModules.TaokeCatalogs.Actions.Do.DirectDoWorkflowAction(String sWid, Int32 actionId, User user) in C:\Inetpub\wwwroot\Rainbow\DesktopModules\TaokeCatalogs\Actions\Do.ascx.cs:490
Rainbow.DesktopModules.TaokeCatalogs.Actions.Do.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\Rainbow\DesktopModules\TaokeCatalogs\Actions\Do.ascx.cs:79
System.Web.UI.Control.OnLoad(EventArgs e) +67
Rainbow.UI.WebControls.PortalModuleControl.OnLoad(EventArgs e) in C:\Inetpub\wwwroot\Rainbow\app_code\Rainbow\UI\WebControls\PortalModuleControl.cs:710
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Control.AddedControl(Control control, Int32 index) +307
System.Web.UI.ControlCollection.Add(Control child) +153
System.Web.UI.WebControls.RowControlCollection.Add(Control child) +33
DUEMETRI.UI.WebControls.DesktopPanes.CreateControlHierarchy() +1129
DUEMETRI.UI.WebControls.DesktopPanes.CreateChildControls() +27
Rainbow.UI.WebControls.DesktopPanes.CreateChildControls() in C:\Inetpub\wwwroot\Rainbow\app_code\Rainbow\UI\WebControls\DesktopPanes.cs:138
System.Web.UI.Control.EnsureChildControls() +100
System.Web.UI.Control.PreRenderRecursiveInternal() +38
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Page.ProcessRequestMain() +1489
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573