EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Type inicialization error

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#10181
Posted: 05/27/2009 11:05:08
by Szymon Piskula (Basic support level)
Joined: 02/05/2009
Posts: 17

Hi,

The problem does not occur on a developer envrinoment, but only on a client machine which has no eldos / blackbox xml components installed
It occurs when i try to load xml doc from file
Code
gToSignPath = plikDoPodpisania;
                txtToSign.Text = gToSignPath;
                try
                {
                    F = new FileStream(gToSignPath, FileMode.Open, FileAccess.Read);
                    FXMLDocument.LoadFromStream(F);
                }
                catch (Exception E)
                {
                    MessageBox.Show("Error: " + E.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }

                if (F != null)
                    F.Close();
                    btnPodpisz.Enabled = true;

This part of code results in a TypeInitializationException saying that type initializator reported exception for type 'SBXML.Charsets.TELXMLCodec'.

i guess it happens inside of
Code
FXMLDocument.LoadFromStream(F);


The program was build with reference to
SecureBlackbox
SecureBlackbox.Charsets
SecureBlackbox.XML

corresponding dlls were deployed on clients machine in directory with executble. During the build they were in the same directory as the otput exe file.

Could you please help me to resolve it? What type/dll is missing? How can i initialize this type on client machine ?

I cant provide any more details as there is no debugger. The exception comes from .net framework asi guess.

best regards,
Szymon
#10183
Posted: 05/27/2009 11:56:49
by Dmytro Bogatskyy (EldoS Corp.)

Quote
This part of code results in a TypeInitializationException saying that type initializator reported exception for type 'SBXML.Charsets.TELXMLCodec'.

Could you provide full stack trace for the exception?
Quote
corresponding dlls were deployed on clients machine in directory with executble. During the build they were in the same directory as the otput exe file.

What SecureBlackbox version and .Net version are you using?
Please, compare those assemblies with the corresponding version of assemblies under "%ProgramFiles%\EldoS\SecureBlackbox.NET\Assemblies\". Are they correct?

Please, post the xml document that client tries to load.
Quote
What type/dll is missing?

For code above, no other assemblies are needed.
Quote
How can i initialize this type on client machine ?

Please, see: http://www.eldos.com/documentation/sb...t_net.html
#10198
Posted: 05/28/2009 02:27:15
by Szymon Piskula (Basic support level)
Joined: 02/05/2009
Posts: 17

xml is in attachemnt / zip file

i understatd that i i must get gacutil for .net 2.0 and install

SecureBlackbox.Charsets.dll
SecureBlackbox.dll
SecureBlackbox.PGP.dll
SecureBlackbox.XML.dll


[ Download ]
#10199
Posted: 05/28/2009 02:48:36
by Szymon Piskula (Basic support level)
Joined: 02/05/2009
Posts: 17

Installing those assemblies helped! It is important to do this with gacutil for .net 2.0 which can be found in SDK
[URL=http://download.microsoft.com/download/c/4/b/c4b15d7d-6f37-4d5a-b9c6-8f07e7d46635/setup.exe]SDK at MS[/URL]
Thanks !

Reply

Statistics

Topic viewed 1230 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!