Hi All
Here iam getting this Error "Specified cast is not valid."
My Project has Onc solution diffrent class libarary In that solution DALfactory solution iam getting this error
I was calling this function in DALFactory class library(this library generate the DAL.dll)
Another class library has this function
public SecurityInfo Login(string username, string password)
{
IUserSetting us = SCS.SR.DALFacto ry.UserSetting. Create(); (When i was catch the Quick watch "SCS.SR.DALFact ory.UserSetting .Create()" this that time iam getting this error "System.SystemE xception {"Specified cast is not valid."} System.SystemEx ception ")
SecurityInfo getIsusreValid = us.IsUserValid( username,passwo rd);
return getIsusreValid;
}
public static SCS.SR.IDAL.IUs erSetting Create()
{
string path = System.Configur ation.Configura tionSettings.Ap pSettings["WebDAL"];
string className = path + ".UserSetti ng";
return (SCS.SR.IDAL.IU serSetting) Assembly.Load(p ath).CreateInst ance(className) ; (Here Iam getting this error) (this is going to return the securityInfo function)
}
A first chance exception of type 'System.Invalid CastException' occurred in scs.sr.dal.dll
Additional information: Specified cast is not valid.
Regards,
Karunakara Rao.