PDA

View Full Version : نحوه debug درگاه ملت



hain2006
دوشنبه 11 خرداد 1394, 09:16 صبح
با سلام و عرض خسته نباشید

من یه درگاه اینترنتی بانک ملت را ه اندازی کردم وقتی که به بانک وصل میشم و پول پرداخت میشه و از حساب کم میشه موقع بازگشت به صفحه خودم خطا میده و حالا من نمیدونم
چطور این قسمت رو دیباگ کنم چون آیپی ولید رو ایراد میگیره راهکارش چیه ؟ ممون

ali_72
دوشنبه 11 خرداد 1394, 09:23 صبح
سلام
از elmah و log4net استفاده کن
log برای تمام عملیلات در اکشن
اونوقت متوجه میشی تو کدوم خط خطا داری
elmah که سیر تا پیاز خطا رو برات شرح میده

در ضمن اگه کد تائید کسر از حساب در برگشت از درگاه در سایت انجام نشه پول به حساب کاربر توسط خود بانک برگشت داده می شه

موفق باشی

hain2006
دوشنبه 11 خرداد 1394, 10:05 صبح
سلام
از elmah و log4net استفاده کن
log برای تمام عملیلات در اکشن
اونوقت متوجه میشی تو کدوم خط خطا داری
elmah که سیر تا پیاز خطا رو برات شرح میده

در ضمن اگه کد تائید کسر از حساب در برگشت از درگاه در سایت انجام نشه پول به حساب کاربر توسط خود بانک برگشت داده می شه

موفق باشی

خیلی ممنون از راهنمایتون

hain2006
دوشنبه 11 خرداد 1394, 21:39 عصر
با سلام
این خطا از چیه واقعاً سر در نمیارم ؟!
131872
System.Data.Entity.Infrastructure.DbUpdateExceptio n: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.Entity.Core.UpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.SqlClient.SqlException: The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMeta Data() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteRead er(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) at System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataRead er(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader(Command Behavior behavior) at System.Data.Entity.Infrastructure.Interception.DbC ommandDispatcher.b__c(DbCommand t, DbCommandInterceptionContext`1 c) at System.Data.Entity.Infrastructure.Interception.Int ernalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed) at System.Data.Entity.Infrastructure.Interception.DbC ommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext) at System.Data.Entity.Internal.InterceptableDbCommand .ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader(Command Behavior behavior) at System.Data.Entity.Core.Mapping.Update.Internal.Dy namicUpdateCommand.Execute(Dictionary`2 identifierValues, List`1 generatedValues) at System.Data.Entity.Core.Mapping.Update.Internal.Up dateTranslator.Update() --- End of inner exception stack trace --- at System.Data.Entity.Core.Mapping.Update.Internal.Up dateTranslator.Update() at System.Data.Entity.Core.EntityClient.Internal.Enti tyAdapter.b__2(UpdateTranslator ut) at System.Data.Entity.Core.EntityClient.Internal.Enti tyAdapter.Update[T](T noChangesResult, Func`2 updateFunction) at System.Data.Entity.Core.EntityClient.Internal.Enti tyAdapter.Update() at System.Data.Entity.Core.Objects.ObjectContext.b__3 5() at System.Data.Entity.Core.Objects.ObjectContext.Exec uteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) at System.Data.Entity.Core.Objects.ObjectContext.Save ChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() at System.Data.Entity.SqlServer.DefaultSqlExecutionSt rategy.Execute[TResult](Func`1 operation) at System.Data.Entity.Core.Objects.ObjectContext.Save ChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) at System.Data.Entity.Core.Objects.ObjectContext.Save Changes(SaveOptions options) at System.Data.Entity.Internal.InternalContext.SaveCh anges() --- End of inner exception stack trace --- at System.Data.Entity.Internal.InternalContext.SaveCh anges() at System.Data.Entity.Internal.LazyInternalContext.Sa veChanges() at System.Data.Entity.DbContext.SaveChanges() at EshopMVC5.Controllers.PaymentController.CallBack() وضعیت:مشکلی در پرداخت به وجود آمده است ، در صورتیکه وجه پرداختی از حساب بانکی شما کسر شده است آن مبلغ به صورت خودکار برگشت داده خواهد شد

hakim22
سه شنبه 12 خرداد 1394, 11:25 صبح
مشکل در کار با تاریخ است :

یا تاریخ و ساعت را درست ارسال نمیکنید یا مقدار برگشتی تاریخ و ساعت را درست استخراج نمیکنید

The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value