H
hazz
"Value cannot be null.\r\nParameter name: type" is the exception thrown
after the CreateInstance method below.
Type t = Type.GetType(GetConfigValue("PasswordProvider"));
IPasswordProvider ppdr= (IPasswordProvider)Activator.CreateInstance(t);
GetConfigValue DOES return the correct value from the config file -
"namespace.DBPassword, namespace"
It appears that Type.GetType is NOT finding the assembly whose name is the
same as the namespace above (DBPassword is the name of the class contained
within that assembly/dll.
In the remarks section for Type.GetType I read the following;
If the assembly has not been saved to disk when GetType is called, the
method returns a null reference . GetType does not understand transient
dynamic assemblies; therefore, calling GetType to retrieve a type in a
transient dynamic assembly returns a null reference (Nothing).
I can see that the dll DOES exist in the /bin/debug directory with a recent
timestamp. I would assume it has already been saved to disk when the search
is made for it.
Any ideas on how to troubleshoot this?
Thank you,
Greg
after the CreateInstance method below.
Type t = Type.GetType(GetConfigValue("PasswordProvider"));
IPasswordProvider ppdr= (IPasswordProvider)Activator.CreateInstance(t);
GetConfigValue DOES return the correct value from the config file -
"namespace.DBPassword, namespace"
It appears that Type.GetType is NOT finding the assembly whose name is the
same as the namespace above (DBPassword is the name of the class contained
within that assembly/dll.
In the remarks section for Type.GetType I read the following;
If the assembly has not been saved to disk when GetType is called, the
method returns a null reference . GetType does not understand transient
dynamic assemblies; therefore, calling GetType to retrieve a type in a
transient dynamic assembly returns a null reference (Nothing).
I can see that the dll DOES exist in the /bin/debug directory with a recent
timestamp. I would assume it has already been saved to disk when the search
is made for it.
Any ideas on how to troubleshoot this?
Thank you,
Greg