Export (0) Print
Expand All

Upgrading Components That Use the com.ms.wfc.html Package

Visual Studio 2005

Visual J# fully supports the com.ms.wfc.html package. However, the parameters of the <OBJECT> tag have been changed to enable classes to be loaded from managed assemblies in a version-aware manner. Therefore, when upgrading Visual J++ 6.0 components that use the com.ms.wfc.html package, the HTML pages that contain the <OBJECT> tag need to be appropriately modified.

The <OBJECT> tag used in Visual J++ 6.0 is as follows:

<OBJECT CLASSID="java:com.ms.wfc.html.DhModule" height=0 width=0 ... VIEWASTEXT>
<PARAM NAME=__CODECLASS VALUE=UserClass>        
<PARAM NAME=CABBASE VALUE=UserCabFile.CAB>
</OBJECT>

The <OBJECT> tag that must be used in Visual J# is as follows:

<OBJECT CLASSID="CLSID:CF83EA5E-0FFD-4476-9BF7-6C15F7F8BDCF" height=0 width=0 ... VIEWASTEXT>
   <PARAM NAME=CODECLASS VALUE=UserAssembly#UserClass>
</OBJECT>

where:

CLASSID

Refers to the control used by Visual J# to host the user-defined class. Developers should not change this value.

CODECLASS

Refers to the user-defined class (that extends DhDocument) and the managed assembly that contains this class. The '#' token separates the assembly name and the class name. The assembly name must be the name of the file and must include the file extension. An attempt will be made to load the assembly from the same location that the HTML page that accesses it is located. It is also possible to specify a relative path for the assembly.

NoteNote

The user-defined class is always hosted on latest version of Visual J# installed on the machine.

NoteNote

In this release of Visual J#, the VJSVERSION parameter tag is no longer supported and will be ignored if included in an <OBJECT> tag.

For example, a typical <OBJECT> tag used in Visual J# might look as shown below:

<OBJECT CLASSID="CLSID:CF83EA5E-0FFD-4476-9BF7-6C15F7F8BDCF" height=0 width=0 ... VIEWASTEXT>
   <PARAM NAME=CODECLASS VALUE=MyAssembly.dll#MyUserClass>
</OBJECT>

Visual J# will load and run a component only if it is fully trusted by the .NET Framework security policy on the client computer. In order to be considered fully trusted by the security policy on the client, one of the following conditions must hold:

  • The component must have been signed with a key pair and the .NET Framework security policy on the client computer modified to grant the FullTrust named permission set to all components or applications signed with this key pair.

  • The component must have been signed with an Authenticode certificate and the .NET Framework security policy on the client computer modified to grant the FullTrust named permission set to all components or applications signed with this certificate.

  • The .NET Framework security policy on the client computer has been modified to grant the FullTrust named permission set to controls downloaded from the Web site where the component is hosted.

A component that is not considered fully trusted by the client computer will not be allowed to run. When a page containing such a component is loaded in Internet Explorer, an error message is displayed in the status bar. Based on the Internet Explorer security setting on the client, loading a page with such a component might cause an ActiveX warning dialog box to be shown every time the page is loaded. The user must click OK on the dialog to proceed with loading the component.

Community Additions

ADD
Show:
© 2014 Microsoft