Dear i am getting error when running code from IIS. When i run from code it runs fine but when i triy it with IIS server i get error:
THis is the error i m getting.
Server Error in '/' Application.
String was not recognized as a valid DateTime.
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: String was not recognized as a valid DateTime.
Source Error:
Line 141: value = Request.Form("datepicker")
Line 142: value2 = Request.Form("datepicker2")
Line 143: moh = valq.caseExp1(value, value2, CompanyId, CName, AID, AName, ASID, ASName, cnn, 1, 3, DropDownList1.SelectedValue)
Line 144:
Line 145: End Sub
Source File:
C:\inetpub\ftproot\WebSiteMohinder_Final_latest\CashierwiseReports.aspx.vb
Line: 143
Stack Trace:
[FormatException: String was not recognized as a valid DateTime.]
System.DateTime.Parse(String s) +6363426
IBillCloudExp.Class1.Expdt2(String cnn, String sp, String para1, String para2, String filename, String comp, String CName, String Area, String AName, String SArea, String SAName, Int32 UserId) in C:\Users\Trucount\Desktop\IBillCloudExp\IBillExp\Class1.vb:579
IBillCloudExp.Class1.caseExp1(String date1, String date2, String comp, String Cname, String Area, String AName, String SubArea, String SAName, String cnn, Int32 repno, Int32 Srepno, Int32 UserID) in C:\Users\Trucount\Desktop\IBillCloudExp\IBillExp\Class1.vb:1013
CashierwiseReports.Button1_Click(Object sender, EventArgs e) in C:\inetpub\ftproot\WebSiteMohinder_Final_latest\CashierwiseReports.aspx.vb:143
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +154
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3707
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1025
Please help me out.
Regards,
Venga