K
Kristopher Wragg
Hi,
I have controls that will hold a custom PictureBox I've been working
on, the picture box stores an array of a class I've made which contains
an Image a few integers and a string...
the controls seem to work if loaded up in Visual Studio, but when
hosted in Internet Explorer I get the following in my IEHost log and it
doesn't load the control:
Microsoft.IE.SecureFactory: Trying to create instance of type
http://testserver/dlls/DefaultCompany.PictureTest.DLL#DefaultCompany.PictureTest
Microsoft.IE.SecureFactory:
System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. ---> System.IO.FileNotFoundException:
Could not load file or assembly 'CustomPictureBox, Version=1.0.0.5,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. The
system cannot find the file specified.
File name: 'CustomPictureBox, Version=1.0.0.5, Culture=neutral,
PublicKeyToken=null'
at System.RuntimeTypeHandle._GetTypeByName(String name, Boolean
throwOnError, Boolean ignoreCase, Boolean reflectionOnly,
StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean
throwOnError, Boolean ignoreCase, Boolean reflectionOnly,
StackCrawlMark& stackMark)
at System.RuntimeType.PrivateGetType(String typeName, Boolean
throwOnError, Boolean ignoreCase, Boolean reflectionOnly,
StackCrawlMark& stackMark)
at System.Type.GetType(String typeName, Boolean throwOnError)
at System.Resources.ResourceReader.FindType(Int32 typeIndex)
at System.Resources.ResourceReader.DeserializeObject(Int32
typeIndex)
at System.Resources.ResourceReader.LoadObjectV2(Int32 pos,
ResourceTypeCode& typeCode)
at System.Resources.ResourceReader.LoadObject(Int32 pos,
ResourceTypeCode& typeCode)
at System.Resources.RuntimeResourceSet.GetObject(String key, Boolean
ignoreCase, Boolean isString)
at System.Resources.RuntimeResourceSet.GetObject(String key, Boolean
ignoreCase)
at System.Resources.ResourceManager.GetObject(String name,
CultureInfo culture, Boolean wrapUnmanagedMemStream)
at System.Resources.ResourceManager.GetObject(String name)
at DefaultCompany.PictureTest.InitializeComponent()
at DefaultCompany.PictureTest..ctor()
The only thing I can think of is that its trying to deserialize the
array property before the assembly is loaded and so it can't
deserialize due to the fact it doesn't know the type of the class or
its structure...
is this a fair assumption? any ideas on a fix to the problem?
thanks
Kris Wragg
Ps. currently its DynamicImage[] thats the property thats a problem,
I'm currently trying to get write a DynamicImageCollection that based
on CollectionBase, but that doesn't seem to save its items in the
Designer
and I think this same problem will crop up anyway when
deserializing...
I have controls that will hold a custom PictureBox I've been working
on, the picture box stores an array of a class I've made which contains
an Image a few integers and a string...
the controls seem to work if loaded up in Visual Studio, but when
hosted in Internet Explorer I get the following in my IEHost log and it
doesn't load the control:
Microsoft.IE.SecureFactory: Trying to create instance of type
http://testserver/dlls/DefaultCompany.PictureTest.DLL#DefaultCompany.PictureTest
Microsoft.IE.SecureFactory:
System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. ---> System.IO.FileNotFoundException:
Could not load file or assembly 'CustomPictureBox, Version=1.0.0.5,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. The
system cannot find the file specified.
File name: 'CustomPictureBox, Version=1.0.0.5, Culture=neutral,
PublicKeyToken=null'
at System.RuntimeTypeHandle._GetTypeByName(String name, Boolean
throwOnError, Boolean ignoreCase, Boolean reflectionOnly,
StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean
throwOnError, Boolean ignoreCase, Boolean reflectionOnly,
StackCrawlMark& stackMark)
at System.RuntimeType.PrivateGetType(String typeName, Boolean
throwOnError, Boolean ignoreCase, Boolean reflectionOnly,
StackCrawlMark& stackMark)
at System.Type.GetType(String typeName, Boolean throwOnError)
at System.Resources.ResourceReader.FindType(Int32 typeIndex)
at System.Resources.ResourceReader.DeserializeObject(Int32
typeIndex)
at System.Resources.ResourceReader.LoadObjectV2(Int32 pos,
ResourceTypeCode& typeCode)
at System.Resources.ResourceReader.LoadObject(Int32 pos,
ResourceTypeCode& typeCode)
at System.Resources.RuntimeResourceSet.GetObject(String key, Boolean
ignoreCase, Boolean isString)
at System.Resources.RuntimeResourceSet.GetObject(String key, Boolean
ignoreCase)
at System.Resources.ResourceManager.GetObject(String name,
CultureInfo culture, Boolean wrapUnmanagedMemStream)
at System.Resources.ResourceManager.GetObject(String name)
at DefaultCompany.PictureTest.InitializeComponent()
at DefaultCompany.PictureTest..ctor()
The only thing I can think of is that its trying to deserialize the
array property before the assembly is loaded and so it can't
deserialize due to the fact it doesn't know the type of the class or
its structure...
is this a fair assumption? any ideas on a fix to the problem?
thanks
Kris Wragg
Ps. currently its DynamicImage[] thats the property thats a problem,
I'm currently trying to get write a DynamicImageCollection that based
on CollectionBase, but that doesn't seem to save its items in the
Designer

deserializing...