how do you specify the .NET runtime version for controls embedded in web browsers?

M

Mathew

Hi

How do you specfiy the version of the .net runtime libraries loaded for a
..net controls hosted in Internet Explorer 6? I have a control that's
designed to work with .NET 1.1, but after installing the VS.NET 2005 beta
the web browser embedded control is now running in the .NET 2.0 beta runtime
environment, and crashing.

Is it possible to have different IE hosted controls running side by side in
different versions of the .NET framework? How do you control which version
is used?

Regards
Mathew
 
S

Steven Cheng[MSFT]

Hi Mathew,

Thanks for your posting. As for the specifying .net runtime version for IE
host winform control problem you mentioned, it is a bit difficult to do it
at serverside.
Generally the .net framework provide us the ability to specify the runtime
version via app.config file. However, this approach is for application
based, which means we can't specify a config setting for an assembly.
And as for the IE hosted winform control, the winform controls' host
application is the internet explore( iexplorer.exe) . So currently the only
means for specifying the runtime version hosting the IE hosted control is
providing a application config file for the iexplorer.exe. The file's
named should be
"IEXPLORER.EXE.CONFIG" which contains the following setting:

<configuration>
<startup>
<supportedRuntime version="v1.1.4322"/>
<supportedRuntime version="v1.0.3705"/>
</startup>

</configuration>

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
M

Mathew

Hi Steven

Thank you for the prompt answer, although you'll understand if I don't see
it as good news. One might expect users of IE to use hosted controls from
multiple sources and designed for various version of .NET, is there a way to
ensure they work in the future? Assuming new versions of the .NET framework
continue to contain a small number of breaking changes I don't see how the
system can work reliably without side by side execution of different
versions of the runtime. Have I missed something important? What's your
advice to control writers?

Regards
Mathew
 
S

Steven Cheng[MSFT]

Hi Mathew,

Thanks for your followup. Yes, providing a config file for the iexplorer
does seems a bit senseless since it's hard for a serverside service to
control the clientside enviroment. However, this is actually limited by the
net's configuration mechanism which is application based rather than
assembly based. That means the application which host the assembly
determine which version of assembly(include the clr cor libs) to load.

As mentioned in the following article:

#Side-by-Side Execution of the .NET Framework
http://msdn.microsoft.com/library/en-us/dnnetdep/html/sidexsidenet.asp?frame
=true

unmanaged application such as COM host or IE hosted, we need to provide a
config file for the exe so as to determine the runtime for the assemlies
hosted in them.

In addition, sometimes we can also expose a complete .net exe application
through the http web url and provide a config file for it, thus, when the
clientside download the application , it'll also dowload the associated app
config file which can used to specify the target runtime version.

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top