HtmlEditor :  Phorum 5 The fastest message board... ever.

This is the discussion forum for the HtmlEditor. See also the HtmlEditor home page, where you can download the control, and the Documentation Wiki, a collaborative project for documenting the control.

Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
[solved] CLR20r3, FileLoadException, SecurityException, Strong name validation failed.
Posted by: Atara (
Date: Tuesday, 09-Mar-2010, 10:50:29

I hope the following will help someone -

I tried to compile and run HtmlEditor files [2005 with mshtml.dll].
On my development computer all works fine, but when I xcopy the bin folder to another computer the demo app did not work.
The only error I received was -

DemoHtmlApp.exe has stopped working

Stopped working

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: demohtmlapp.exe
Problem Signature 02: 1.0.3708.26933
Problem Signature 03: 4b8673ca
Problem Signature 04: DemoHtmlApp
Problem Signature 05: 1.0.3708.26933
Problem Signature 06: 4b8673ca
Problem Signature 07: 4
Problem Signature 08: dd
Problem Signature 09: System.IO.FileLoadException
OS Version: 6.0.6000.
Locale ID: 1033

so I added Try-Catch in the Main() [DemoHtmlApp, Form1.cs] -

try {
Application.Run(new Form1());
} catch (Exception e) {
Debug.WriteLine("Main exception: " + e.Message);
MessageBox.Show("Main exception: " + e.ToString() );
throw; // empty Throw for Vista WER [Windows Error Reporting]

now I received some more info -
System.IO.FileLoadException: Could not load file or assembly
'Microsoft.mshtml, Version=7.0.3300.0, . . .' or one of its dependencies.
Strong name validation failed. (Exception . . . 0x8013141A)
File name: 'Microsoft.mshtml, ersion=7.0.3300.0, . . .'
. . .
Strong name validation failed. (Exception . . . 0x8013141A)
The Zone of the assembly that failed was:
at onlyconnect.HtmlEditor..ctor()
at . . .

even when verifying that I do use "copy local" for "Microsoft.mshtml.dll"

Googling around, I verified that I do not use "Project Properties | Signing" in both HtmlEditor project and HtmlEditorDemo project.
and also - donot use "Enable ClickOnce Security settings" on the HtmlEditorDemo project - to avoid creating the manifest file with all its permissions handling.
I also learned that I cannot use "Add reference" from just browsing to "Microsoft.mshtml.dll"
so I removed its reference from the HtmlEditorDemo project and re-add it, using the .Net tab.
I had 3 options for the file:
"c:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\Microsoft.mshtml.dll"
"c:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office12\Microsoft.mshtml.dll"
"c:\Program Files\Microsoft.NET\Primary Interop Assemblies\Microsoft.mshtml.dll"
Fortunately, I chose to take the PIA file, it also happens to be "File Version 7.0.3300.1" and not "7.0.3300.0" as the Office files
(Though the inner File Version is also 7.0.3300.0)
[Some sites claims that the Office files are "delay signed" or "partially signed" but the PIA file (installed with the VS installation) is a fully signed copy.]

xcopy the bin folder to the testing computer and now all works well!

Development OS: XP + IE6 + VS 2003 + VS 2008 + Office
Testing OS: Vista + IE8,
(the working solution was also tested on XP + IE6 without VS\Office installed)

If anyone have any hint to the "Access is denied" error when running the demo of the last HtmlEditor version (without the mshtml file) It will help a lot.
["Running scripts in Demo" - []]


Your Name: 
Your Email: 
Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically.
This is a moderated forum. Your message will remain hidden until it has been approved by a moderator or administrator
This forum powered by Phorum.