473,507 Members | 2,388 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Windows Forms UserControl Hosted in IE now loads in 2.0 framework instead of 1.1 on dev box

Please help.

I've been developing a windows forms user control to be hosted in
IE/ASP.NET. The control is developed in .NET v1.1, and for now I'll need to
keep it in that version. Recently I installed .NET 2.0. Now the control
loads into .NET 2.0 instead of 1.1 (per System.Environment.Runtime) on my
development box. I'm using an app.config file that I'm pulling into the aspx
page using a <link> element. In that config file I'm specifiying v1.1, like
so, but it has no effect:

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

How can I force IE to load the control using .NET 1.1 instead of 2.0? Thanks
for your help.

Keith
Nov 20 '05 #1
5 1736
IE is unable to determine which version of the Framework your control was
written against. It will therefor always run against the latest version
installed on your machine. In this case, 2.0.

The channel 9 video details it:

http://channel9.msdn.com/Showpost.aspx?postid=73151

Might find some info here:

http://msdn.microsoft.com/netframewo...etfxcompat.asp
--

Andrew Robinson
www.binaryocean.com
www.bellinghamdotnet.org
"Keith" <an******@hotmail.com> wrote in message
news:eL**************@tk2msftngp13.phx.gbl...
Please help.

I've been developing a windows forms user control to be hosted in
IE/ASP.NET. The control is developed in .NET v1.1, and for now I'll need
to keep it in that version. Recently I installed .NET 2.0. Now the control
loads into .NET 2.0 instead of 1.1 (per System.Environment.Runtime) on my
development box. I'm using an app.config file that I'm pulling into the
aspx page using a <link> element. In that config file I'm specifiying
v1.1, like so, but it has no effect:

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

How can I force IE to load the control using .NET 1.1 instead of 2.0?
Thanks for your help.

Keith

Nov 20 '05 #2
Thanks Andrew.

That doc you cited says on a box with both 1.1 and 2.0 Internet Explorer
"Loads with 2.0 unless the process is configured to run against 1.1". Do
you know how to configure the process to run against 1.1? It makes
testing much less convenient. Thanks again.

Keith

*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #3
Here's Andrew's post. For some reason it's only showing up on
developersdex.com.
-------------------------

IE is unable to determine which version of the Framework your control was
written against. It will therefor always run against the latest version
installed on your machine. In this case, 2.0.

The channel 9 video details it:

http://channel9.msdn.com/Showpost.aspx?postid=73151

Might find some info here:

http://msdn.microsoft.com/netframewo...ry/en-us/dnnet
dep/html/netfxcompat.asp
Nov 21 '05 #4
Keith,

I haven't watched the video in a while, but they talk about 3 or 4 different
cases:

1. Asp.net and windows forms. Pretty standard stuff and you can configure
which version of the framework you run against.

2. Hosted CLR within SQL. I got the idea that Microsoft is reserving the
right to say that your code will always run against the version of the
framework that it was built against. Build it against 2.0 and only have 3.0
installed on your machine (at some later date), your code will not run?

3. I believe they talked specifically about the case of controls running
within IE (or another hosted app) and how your controls will always run
against the latest version of the framework that is installed on your
machine. I believe you are in this category. You cannot configure the
version that you run against and will get 2.0 assuming you have installed
the 2.0 version of the dotnetfx.

Hope this helps.

--

Andrew Robinson
www.binaryocean.com
www.bellinghamdotnet.org
"Keith A" <an******@hotmail.com> wrote in message
news:OR****************@TK2MSFTNGP12.phx.gbl...
Thanks Andrew.

That doc you cited says on a box with both 1.1 and 2.0 Internet Explorer
"Loads with 2.0 unless the process is configured to run against 1.1". Do
you know how to configure the process to run against 1.1? It makes
testing much less convenient. Thanks again.

Keith

*** Sent via Developersdex http://www.developersdex.com ***

Nov 21 '05 #5
Buzzby
1 New Member
To configure IE to use a particular version of the CLR you need a config file in the same directory as IExplore.exe. The directory is usually C:\Program Files\Internet Explorer

The file contents you already seem to know:


<?xml version="1.0"?>
<configuration>
<!-- This ensures that Internet explorer hosts the correct version of the runtime -->
<startup>
<supportedRuntime version="v2.0.50727" />
<!-- <supportedRuntime version="v1.1.4322" /> -->
</startup>

</configuration>

Make sure that you have the correct version un commented. I don't know what happens if both are uncommented - though I assume it's not good.

This is because IE is Hosting the CLR.

Buzzby.
I hope this helps.

Thanks Andrew.

That doc you cited says on a box with both 1.1 and 2.0 Internet Explorer
"Loads with 2.0 unless the process is configured to run against 1.1". Do
you know how to configure the process to run against 1.1? It makes
testing much less convenient. Thanks again.

Keith



*** Sent via Developersdex http://www.developersdex.com ***
Apr 28 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2172
by: BestNews | last post by:
OS: XP ..Net= framework = 1.0.3705 VS.Net IDE = 7.0.9466 1. I used an ActiveX control in C# client Application. After executing Aximp of ActiveX control. I derived a class from the AxHost.
1
1347
by: Magnus Gran-Jansen | last post by:
Hi, I am trying to make my C# application of windows forms (hosted in IE by using UserControl) to connect to a port on the machine the "applet" is downloaded from. It would be useful if I could...
0
988
by: tony | last post by:
I have a Windows Forms UserControl that runs in a thick client. I am now deploying it within an IE web page. Everything works fine, including events, except for one feature. As the mouse is moved...
2
3008
by: tony | last post by:
I initally posted this July 29, 05 and did not get any replies: I have a Windows Forms UserControl that runs in a thick client. I am now deploying it within an IE web page. Everything works fine,...
11
5261
by: Crirus | last post by:
I need to derive the Windows.Forms.Control 2 times so I design a class like this Public Class BMControl Inherits System.Windows.Forms.UserControl Public Class MapControl Inherits BMControl
0
1950
by: Filippo Bettinaglio | last post by:
VS2005, C# I have developed a UserControl embedded in a HTML web page. And I can access to the DOM with the following code: HTML page: …….. <BODY onload=loadDoc()> …….
0
1555
by: Mark | last post by:
I am converting a VB6/COM application to VB.NET and must remove all COM objects. VB6/COM App Architecture: Windows Form hosts WebBrowser which loads HTML snippets from local disk. Some of the...
2
2928
by: Franky | last post by:
Threre is a Form containing a usercontrol In the form's Load event it references a usercontrol property, say, zz The first showdialog(formx) causes 1 usercontrol_load event 2 form_load event...
3
1851
by: rGenius | last post by:
hi all, im planning to create a lookup usercontrol where i need to specify a custom property (a form) to be loaded up once a button is pressed. usercontrol contains: textbox button now...
0
7111
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7031
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5042
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1542
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
760
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.