R
Ravi
We have an application which dynamically loads an assembly and creates
instances of classes. For this we have written a factory class which
reflects the assembly and creates the classes and returns the created
objects as plain objects. The caller method casts the object returned
by the object factory into appropriate class object and uses it.
All this works fine when exe is invoked directly. But when the
application is deployed on the IIS for no touch deployment, the casting
of the object returned by the object factory is throwing an invalid
cast exception. Strange thing is that the statement that is causing
exception during run time works fine if executed in the Immediate
window of the VS.Net IDE.
How do I fix it?
instances of classes. For this we have written a factory class which
reflects the assembly and creates the classes and returns the created
objects as plain objects. The caller method casts the object returned
by the object factory into appropriate class object and uses it.
All this works fine when exe is invoked directly. But when the
application is deployed on the IIS for no touch deployment, the casting
of the object returned by the object factory is throwing an invalid
cast exception. Strange thing is that the statement that is causing
exception during run time works fine if executed in the Immediate
window of the VS.Net IDE.
How do I fix it?