K
karunakar
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.DALFactory.UserSetting.Create(); (When i was catch the Quick watch "SCS.SR.DALFactory.UserSetting.Create()" this that time iam getting this error "System.SystemException {"Specified cast is not valid."} System.SystemException ")
SecurityInfo getIsusreValid = us.IsUserValid(username,password);
return getIsusreValid;
}
public static SCS.SR.IDAL.IUserSetting Create()
{
string path = System.Configuration.ConfigurationSettings.AppSettings["WebDAL"];
string className = path + ".UserSetting";
return (SCS.SR.IDAL.IUserSetting) Assembly.Load(path).CreateInstance(className); (Here Iam getting this error) (this is going to return the securityInfo function)
}
A first chance exception of type 'System.InvalidCastException' occurred in scs.sr.dal.dll
Additional information: Specified cast is not valid.
Regards,
Karunakara Rao.
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.DALFactory.UserSetting.Create(); (When i was catch the Quick watch "SCS.SR.DALFactory.UserSetting.Create()" this that time iam getting this error "System.SystemException {"Specified cast is not valid."} System.SystemException ")
SecurityInfo getIsusreValid = us.IsUserValid(username,password);
return getIsusreValid;
}
public static SCS.SR.IDAL.IUserSetting Create()
{
string path = System.Configuration.ConfigurationSettings.AppSettings["WebDAL"];
string className = path + ".UserSetting";
return (SCS.SR.IDAL.IUserSetting) Assembly.Load(path).CreateInstance(className); (Here Iam getting this error) (this is going to return the securityInfo function)
}
A first chance exception of type 'System.InvalidCastException' occurred in scs.sr.dal.dll
Additional information: Specified cast is not valid.
Regards,
Karunakara Rao.