1.1 Windows Forms Control embedded in ASP.NET 1.1 web page

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a 1.1 windows forms control embedded in a web page via the <object>
tag. I have an installer which users run to configure security settings for
my site to full trust to allow the control to run. Everything was working
fine until yesterday when my company pushed out updates to the users
machines, including mine. Suddenly my embedded control will not appear in the
web page. Nothing else changed in my program. Since I am not sure what has
changed on my client, I was hoping to find guidance on the correct way to
embed a .NET windows control in a web page.

My control downloads files to the users hard drive to a location they
select, so it needs a lot of privileges, obviously. I am currently running IE
version 6.0.2900.2180.xpsp_sp2_gdr.050301-1519 .

Your help is greatly appreciated. This is a production app and this embedded
utility is used very often. I hope a fix can be found quickly. Thanks!
 
A few more notes:
In addition to setting the .Net Security Zone in my .NET 1.1 configuration,
I have added my site to the trusted sites list.
I have strongly signed the assembly / windows forms control.
I have added the AllowPartiallyTrustedCallers() attribute to the assembly.
Using javascript, I am checking the object's readyState property after the
page loads... it is returning 4 = 'Object is completely initialized.'
I have confirmed that the .dll is transferring from the website to the
client... it is not being blocked by any firewall, etc.
I have loaded the usercontrol in a windows forms test harness application to
verify there is no exceptions occurring in the onload event of the control.
I've also tried a different control with no code, just a windows forms
control with a label, and that will not render either.
The result I see in IE is an empty square with the red square/green circle/
blue triangle icon in the upper left-hand corner.
 
Mike, I have had several issues with adding windows forms controls to
web pages. Thus, I don't have a specific solution to your problem, but
rather a tip to help you troubleshoot.

If you look in:
C:\Documents and Settings\<username>\Local Settings\Temporary Internet
Files

for a file or files beginning with ?FusionBind. Depending on the
problem, I often have found these IEHOST error log files to be useful
in tracking issues where my windows control would not load at all
(usually when some dependent dll is not found, or when there is some
security issue).

Also:
It helps if you clear the temporary internet file before loading your
page. Then the error logs are easier to find.
You may not be able to open them directly from that folder - copy them
somewhere else (they will be automatically renamed when you copy them)
 
mmc - THANKS! I have never heard of those files before. I did find the one
with details about my problems. I can't say I fully understand them, but it
definitely appears to be security related as I expected. I have setup my
website as a trusted site, I also setup both 1.1 and 2.0 configuration code
groups to allow my site to have full trust to the system. For some reason it
looks like the security is not being calculated correctly. I have also
updated my .DLL to 2.0 hoping that would help. Here is the details of my
?Fusion file... thanks again!!!
URL: http://localhost/gdswebdotnet/GDSControls.dll
Zone: 2
Assembly Name: GDSControls.dll
Type Name: MultiDownload



----- Thrown Exception -----


System.IO.FileLoadException: Could not load file or assembly
'http://localhost/gdswebdotnet/GDSControls.dll' or one of its dependencies.
The located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)
File name: 'http://localhost/gdswebdotnet/GDSControls.dll'
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&
stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection)
at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile,
Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm
hashAlgorithm, Boolean forIntrospection, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence
securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
at System.Activator.CreateComInstanceFrom(String assemblyName, String
typeName, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
at System.AppDomain.CreateComInstanceFrom(String assemblyFile, String
typeName, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
at System.AppDomain.CreateComInstanceFrom(String assemblyFile, String
typeName, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
at Microsoft.IE.SecureFactory.CreateInstanceWithSecurity(Int32 dwFlag,
Int32 dwZone, String pURL, String uniqueIdString, String link, String
licenses)
 
Back
Top