網頁登入錯誤“Server Error in '/PROV' Application.”
請教各位以下錯誤是什麼情況?是服務器沒調試好嗎?謝謝!Server Error in '/PROV' Application.
--------------------------------------------------------------------------------
Input string was not in a correct format.
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.FormatException: Input string was not in a correct format.
Source Error:
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.
Stack Trace:
[FormatException: Input string was not in a correct format.]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +7471479
System.Number.ParseDecimal(String value, NumberStyles options, NumberFormatInfo numfmt) +146
System.Convert.ToDecimal(String value, IFormatProvider provider) +67
System.String.System.IConvertible.ToDecimal(IFormatProvider provider) +10
System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) +7601592
System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType) +4872946
[FormatException: Failed to convert parameter value from a String to a Decimal.]
System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType) +4872143
System.Data.SqlClient.SqlParameter.GetCoercedValue() +32
System.Data.SqlClient.SqlParameter.Validate(Int32 index, Boolean isCommandProc) +100
System.Data.SqlClient.SqlCommand.BuildParamList(TdsParser parser, SqlParameterCollection parameters) +203
System.Data.SqlClient.SqlCommand.BuildExecuteSql(CommandBehavior behavior, String commandText, SqlParameterCollection parameters, _SqlRPC& rpc) +237
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +141
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +70
SubSonic.SqlDataProvider.GetReader(QueryCommand qry) in C:\Documents and Settings\NEX001\My Documents\SubSonic_2[1].1_Final_Source\src\SubSonic\DataProviders\SqlDataProvider.cs:371
SubSonic.DataService.GetReader(QueryCommand cmd) in C:\Documents and Settings\NEX001\My Documents\SubSonic_2[1].1_Final_Source\src\SubSonic\DataProviders\DataService.cs:493
SubSonic.SqlQuery.ExecuteReader() in C:\Documents and Settings\NEX001\My Documents\SubSonic_2[1].1_Final_Source\src\SubSonic\SqlQuery\SqlQuery.cs:1262
[SqlQueryException: Failed to convert parameter value from a String to a Decimal.]
SubSonic.SqlQuery.ExecuteReader() in C:\Documents and Settings\NEX001\My Documents\SubSonic_2[1].1_Final_Source\src\SubSonic\SqlQuery\SqlQuery.cs:1267
SubSonic.SqlQuery.ExecuteSingle() in C:\Documents and Settings\NEX001\My Documents\SubSonic_2[1].1_Final_Source\src\SubSonic\SqlQuery\SqlQuery.cs:1558
Cortefiel.CustomMembership.ValidateUser(String username, String password) +208
System.Web.UI.WebControls.Login.AuthenticateUsingMembershipProvider(AuthenticateEventArgs e) +60
System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +119
System.Web.UI.WebControls.Login.AttemptLogin() +115
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +101
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +166
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) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618 server .net --------------------编程问答-------------------- System.FormatException: Input string was not in a correct format
输入的格式不对,自己查代码调试吧 --------------------编程问答-------------------- Failed to convert parameter value from a String to a Decimal.
======================================
很明显是你DataReader时,把一个string类型转Decimal类型时出错了,估计string可能是null或者是非数字的串 --------------------编程问答-------------------- 非数字的字符串要转成数字。
补充:.NET技术 , Web Services