when i try to login i get this error please help me in fixing the problem anyone.
Specified cast is not valid.
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.InvalidCastException: Specified cast is not valid.
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:
[InvalidCastException: Specified cast is not valid.]
PCNAdmin.WebForm1.ValidateUser(String userName, String passWord) +380
PCNAdmin.WebForm1.cmdLogin_ServerClick(Object sender, EventArgs e) +67
System.Web.UI.HtmlControls.HtmlInputButton.OnServerClick(EventArgs e) +108
System.Web.UI.HtmlControls.HtmlInputButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292
|
Mahesh ChandPosted Aug 26, 2010, 10:17 PM
Do you know how to implement try..catch error handling? If not, I suggest you learn error handling. Search this site and place a try...catch in your code to get exact error message.
Cheers!
MATT McPosted Aug 26, 2010, 6:45 PM
Mahesh ChandPosted Aug 26, 2010, 5:47 PM
Try to put your code in a try..catch statement to get the exact error message. OR post some code that is getting this error.