December 18, 2006 Update: You may find my post on .NET 3.0 compatibility useful.
As a part-time systems engineer, I was very concerned about possible negative effects of installing the .NET Framework 2.0 side-by-side with 1.1 on our Windows Server 2003 boxes that run things like SharePoint Portal Server, Windows SharePoint Services and Exchange 2003. I’ve searched and searched, and it seems like Microsoft is making little effort to document .NET Framework 2.0 compatibility with their server products.
It helps to understand how different types of executable code load the Framework. Unmanaged applications that host the Common Language Runtime (CLR), that is, non-.NET applications that manually load the CLR in order to run .NET code, always load the newest installed version of the .NET Framework by default. This behavior directly impacts SharePoint Portal Server, as one example, in a negative way. Some unmanaged executables in SPS host the CLR, so as soon as you install 2.0 and restart the SPS apps, they will load 2.0, not 1.1 as they were designed and tested against. BAD!
Fortunately, managed applications behave better. A managed application that was built against 1.1 will continue to load 1.1, as long as 1.1 is installed. (On Windows Server 2003 you don’t have a choice, but on other OS’s you can uninstall 1.1.) A managed application that was built against 2.0 will only load 2.0. If you uninstall Framework 1.1, your 1.1 managed app will now load 2.0 instead.
Confused? When Microsoft doesn’t document which unmanaged apps host the CLR, the bottom line is that you need to be careful installing 2.0.
If you identify an unmanaged app that hosts the 1.1 CLR and you want to install Framework 2.0, there is a way to force the unmanaged app to load the old Framework:
- Locate the unmanaged EXE, and in the same directory, create (or edit) a text file called <unmanagedexename>.exe.config. Ex: myapp.exe needs myapp.exe.config.
- Paste this text into the new text file (or merge it into the existing file; you may already have <configuration> and/or <startup> elements):
<?xml version =”1.0″?>
<configuration>
<startup>
<supportedRuntime version=”v1.1.4322″ />
</startup>
</configuration> - Save the config file and start or restart the EXE or service
Installing the 2.0 Framework without adding or updating the config files will affect SharePoint Portal Server and BizTalk Server 2004. BizTalk Server 2006 natively runs on, and requires, .NET Framework 2.0, and runs just fine with .NET Framework 3.0 as well.
To safely install 2.0 on your BizTalk 2004 server:
- Add (or update) a config file for each EXE in your BizTalk 2004 installation folder
- Reboot or restart all BizTalk services
- Review Microsoft’s KB
- After installing Framework 2.0, ensure that all BizTalk Web services remain configured to run under ASP.NET 1.1.
To safely install 2.0 on your SPS servers:
- Add (or update) a config file for each EXE in your SPS installation folder
- I recommend installing WSS 2.0 SP2, which explicitly supports ASP.NET 2.0, and then SPS 2003 SP2. If you are not ready to upgrade, you can still add the config files and safely install 2.0 on SP1 or earlier.
- After installing Framework 2.0, ensure that all SPS portal Web sites remain configured to run under ASP.NET 1.1. SPS SP2 does not support ASP.NET 2.0, even though WSS does.
To safely install 2.0 on your Exchange 2003 servers:
- Exchange Server 2003 doesn’t appear to host the CLR, so it should be safe to install 2.0 on Exchange front-end or back-end servers. I installed it on our front-end server with no issues.
- After installing Framework 2.0, ensure that the OWA Web site remains configured to run under ASP.NET 1.1 (IIS Admin, site properties, ASP.NET tab).
Installing .NET Framework 2.0 installs ASP.NET 2.0. By default, this will not change existing IIS Web sites to 2.0 — they will remain set to 1.1/1.0. You can control this in IIS Admin in the site properties under the new ASP.NET tab. Do not try to mix ASP.NET 1.1 and 2.0 apps within a single AppPool on Windows Server 2003. Create separate AppPools for each version.
Office 2003 is unmanaged but does host the CLR, so it may also be affected by installing Framework 2.0. There are known issues with Office 2003 when loading add-ins, smart tags or smart documents created with .NET Framework 2.0. There is also a related VS2005 update for Visual Studio 2005 developers.
Visual Studio .NET 2003 developers may experience trouble in certain cases after installing Framework 2.0. One such issue is fixed in .NET Framework 1.1 SP2.
The Framework documentation briefly, and poorly, discusses the side-by-side issue here.
I would appreciate comments on this post! Is it helpful? What information can I expand on? Are there other issues that you are concerned about or have experienced?
Thank you! Was looking for exactly this information. Looks like I’ll take a more cautious route to installing 2.0.
just wanted to thank tabraham for this post…very useful. i’m surprised to find so little documentation online regarding running 1.1 and 2.0 side by side. thanks again!
What do you know about:
dotnetfx.exe /C:”install /noaspupgrade”
in relation to installing Framework 2.0 side by side with 1.1
Thanks.
Just these two sentences saved me from hours of wandering lost through the documentation to figure out how to get both ASP.NET 1.1 and 2.0 web services to run on the same Windows 2003 server:
“You can control this in IIS Admin in the site properties under the new ASP.NET tab. Do not try to mix ASP.NET 1.1 and 2.0 apps within a single AppPool on Windows Server 2003. Create separate AppPools for each version.”
Thank you!!!
I have 2.0 running for SPS and WSS and use 2.0 Controls on both types of pages (WSS pages for example Team Sites and Area pages).
Tom says: Thanks for the comment. Yes, WSS 2.0 SP2 has full support for .NET 2.0. However, Microsoft does not support SPS 2003 SP2 with .NET 2.0. You may be lucky enough to have it working in your specific configuration of portal pages and features, but I have not had the same experience. Here’s the official Microsoft statement: http://support.microsoft.com/kb/907763/en-us
I could not find the new ASP.NET tab referred to on the web site property page:
4. On the Properties page, click the ASP.NET tab, and then note the version of ASP.NET that is running on the Web application.
There is no tab in IIS 6.0. What am I missing?
Thanks,
Jim
Jim, you will not have the ASP.NET tab until you have installed .NET Framework 2.0 on the web server.
Hi Thomas,
this is urgent and I need advice we have a dotnetnuke app we bought which is 2.0 compiled and our website run on 1.1 framework. The emailbroadcaster app is a service under the main website. I created a different app pool in IIS to point the emailbroadcaster but when I render the site as http://www.acsi.org/emailbroadcaster it shows me resource not found error. I seem to have hit a block any suggestions?
Sam, it sounds like you have an IIS configuration issue rather than a 1.1 vs. 2.0 issue. Your emailbroadcaster sub-app is looking for a default page called default.aspx (http://www.acsi.org/emailbroadcaster/default.aspx), which does not exist in the emailbroadcaster virtual directory. Please send me an email with your email address through the Email link on the top right side if you still need some help.
Hi Thomas,
I was actually about to uninstall .NET 2.0 and worry about which program crashes later until I saw your solution. Your solution worked like a charm. Thanks dude!
-Lur
It would be nice if MS provided more clarity. I’m suddenly getting corrupt zip files on DL in IIS 6 after upgrading to 2.0, has anyone ever heard of this or think they might be related?
Works for MIIS debugging too.
This article was great and perfectly suited what i was looking for.. Thanks
I’ve have a .NET Framework 1.1 compiled DLL (COM enabled) which is being referenced by a Visual Basic 6.0 application.
What config file do I specify the <supportedRuntime> configuration settings in ?!? Help!
Kay, create <vb6appexename>.exe.config in the folder that holds the VB6 EXE. Use the VB6 EXE name plus .config.
Hey Thomas the imformation which you have provided is gr8. But the problem I am facing is very different. I have my application hosted in 1.1 framework. Now my client wants to change the hosting server which has only 2.0 framework. My questions is will my application run properly in 2.0 framework or not. If not kindly let me know what i need to do to make application run in 2.0 framework. Thanks in advance.
Vamsi, since you mention a hosting server I assume you are talking about an ASP.NET 1.1 application. Microsoft put in extra effort to ensure a smooth migration path. It is possible in many cases to take a .NET 1.1 ASP.NET site and run it on 2.0 with no code changes. ASP.NET 2.0 has a very different Web project structure by default, so I suggest that you look at migrating your 1.1 site to a 2.0 Web Application Project – a project type included in VS 2005 SP1 and otherwise available as a free download from http://www.asp.net. Web Application Projects work just like VS 2003’s web projects, so that is the path of least resistance. I recommend installing VS 2005 SP1 before you upgrade. Beyond that, it depends on how much custom code your site contains. There were some changes to the Framework that were breaking changes, things that will not upgrade, but it is likely that you will not encounter any of them. You may want to review the list here: http://msdn2.microsoft.com/en-us/netframework/aa570326.aspx
Thanks for providing useful Information.
Thanks
Gurjinder Singh Brar
Great article…precise and clear. I am a systems engineer myself and have SPS , WSS – SP2 installed on my production server with .net 2.0. Havent had any issues yet , though SPS is set to use .net 1.1. Dont know if what I am doing is correct from a prodcution standpoint.
I am looking for some kind of automation script or full proof process which could help which could help me in upgrading my couple of 2003 Servers to .net 2.0? Any kind of pointers will be of gr8 help…
Gunjan, I’m not sure exactly what you mean, applications or Framework. At this point I recommend upgrading to .NET 3.0 rather than just 2.0. The 3.0 installer will install 2.0 plus the additional 3.0 DLLs. The 3.0 deployment guide is here: http://msdn2.microsoft.com/en-us/library/aa964979.aspx. If you’re talking about custom applications, you just need to test them on 2.0/3.0 (same effect) and they may work just fine. There is a list of the breaking changes between 1.1 and 2.0 on MSDN here: http://msdn2.microsoft.com/en-us/netframework/aa570326.aspx
Thomas, Are you saying, if I am upgrading from VS2003 to VS2005 use the .Net 3.0 framework instead of the 2.0 framework? Do you know of a good resource that explains what is new feature-wise between 1.1 and 3.0 software?
Thanks!
Hi Olan, yes, that is basically what I’m saying. You are best off installing the 3.0 Framework at this time instead of 2.0. The 3.0 installer will, in fact, install the 2.0 Framework. If you haven’t already, please take a look at my post regarding the 3.0 Framework (http://blogs.digineer.com/blogs/tabraham/archive/2006/12/18/net-framework-1-1-and-2-0-and-3-0-side-by-side-sxs.aspx). The 3.0 Framework *IS* the 2.0 Framework, plus more DLLs. Visual Studio 2005 and any .NET 2.0 application will have no knowledge of or side effects from installation of .NET 3.0 — you will simply gain access to the additional features in 3.0 should you choose to use them (see http://www.netfx3.com).
As far as comparing 1.1 to 3.0, look for articles comparing 1.1 and 2.0 on MSDN, as there are many available. Then reference the 3.0 website I listed above for information on the features added in 3.0. Thanks for reading.
I believe the problem I am having is related to your article, but I am still having problems. I have an asp.net 1.1 app that I am trying to install on a server that has sharepoint 3.0 installed on it. The app is installed under the sharepoint – 80 directory in iis and is set to asp.net 1.1 and is in a different app pool. I also added the configuration line you mentioned in your article to the web.config file of the app. When I try to run the app I get an error. The error is with the web.config file that is in the sharepoint directory. At the bottom of the error page the version of asp.net is 1.1. If clarification is needed I will try my best. Any help would be appreciated.
Gingin, you will NOT want to have the element in the web.config of a .NET 1.0/1.1 website, so first remove that. It is for programs but not for websites. The 2.0 vs 1.1 website runtime is controlled only by the ASP.NET tab in IIS Admin, which it sounds like you have already set correctly. Take care when nesting a non-SharePoint website under a SharePoint website, because SharePoint usually drops a custom web.config in the website root, and it can affect the way your nested site operates. You sometimes have to override the SharePoint config settings in your nested website’s web.config. I hope that helps – unless you have a different error once you remove <supportedRuntime>.
I think I was confusing the framework version with asp.net version when I read your article. But I think you have pointed me in the right direction. I was encountering problems before I added the <supportedruntime>. The way the app is setup now it never hits the web.config file for the app only the web.config file for sharepoint. I will remove the tag though. The reason I have the app installed under sharepoint is because when I removed sharepoint’s web.config file the app worked and I assumed this is where it needed to be. Also, when I installed it in its own website folder in iis I got a page not found error. I was hoping that tag would help though, because obviously breaking sharepoint to fix something else isn’t a good solution. I think my solution lies in finding a way to run the app from outside the sharepoint-80 folder in iis or how to override sharepoint’s web.config file so my app will run without having to break sharepoint. The latter I don’t understand, because if when I load the app it bombs at the sharepoint web.config then that means it never gets to my app so how is adjusting the app’s web.config file will help? Thanks so much for your help, it is really appreciated.
Gingin, maybe you can post the error with the SharePoint web.config. Are you saying that SharePoint itself is not working properly, or just your app gives an error with the SharePoint web.config?
The app only has errors when the sharepoint web.config is in the root sharepoint-80 folder and sharepoint works fine. If I remove the sharepoint web.config file my app works but sharepoint doesn’t.
The error I am getting when I run the app is within the sharepoint web.config file. On the error page, It is a paser error ….something about ‘type’. And below this it says asp.net version 1.1. Unfortuantely I can’t send the info right now, I can though when I return to work tomorrow.
The sharepooint-80 folder in iis is set to asp.net 2.0 and is running in a different app pool from the app that is nested within the folder. The nested app is set to asp.net 1.1 and a different app pool.
Gingin, it is probably SharePoint .NET 2.0 configuration elements and types in the root web.config that are being inherited by your 1.1 application, which means that they are missing in the context of your .NET 1.1 runtime but not to SharePoint under 2.0. Here are a couple of good links that describe this configuration inheritance behavior: http://msdn2.microsoft.com/en-us/library/ms178685(VS.80).aspx and http://msdn2.microsoft.com/en-us/library/dtbwsx8s.aspx. Note that these articles are from the 2.0 documentation — you may even need to look back to the 1.1 version of these articles. By far the easiest way to go is to get your app running under a different site, or set your site to run as 2.0. Have you tried your website under 2.0? In many cases it will work just fine, and even pick up some performance gains.
I tried it under 2.0 and had errors. I will check out those articles. I will also attempt to get the app running under a different site. Thanks for you help. I’ll let you know how it turns out.
I finally got it working. All I had to do was install it as a seperate website from sharepoint and assign it a different port. Thanks again.
Thanks Thomas – you’ve solved my (very frustrating) problem!
I have a vbscript kicking off a .Net component that uses the MS encryption enterprise block. Configuration threw an exception when initializing the FileWatcher type. Now I’ve run the WinDbg against wscript.exe I see that it has loaded some 2.0 dll’s.
Sorted.
Is there anyway to target using a specific assembly? e.g., so instead of using system.xml.dll 2.0 use 1.1?
John, yes there is. I have never tried it on .NET Framework DLLs, only on user-created DLLs, but in theory it should work just the same. You use the configuration/runtime/assemblyBinding/dependentAssembly/assemblyIdentity and bindingRedirect elements in your config file. Please see the example here: http://msdn2.microsoft.com/en-us/library/eftw1fys(VS.80).aspx.
I ran into this blog trying to figure out why Quickbooks 2007 is trying to install .NET 1.1 onto a Vista machine (which of course ships with 3.0) when it is supposedly Vista certified.
It seems to be generating hangs, reboots, all sorts of problems for users but based on the the above, it appears that they should co-exist? Wonder why they did not just run it vs. 3.0 if it was written for Vista….
Soto, yes, .NET 1.1 is definitely OK and supported on Vista. It just means that QuickBooks 2007 has not been upgraded to .NET 2.0/3.0. It might run fine with 2.0/3.0 but they perhaps they have not tested it, or did and found upgrade issues. The specific programming language or runtime used does not have any relation to receiving Vista certification. There is at least one patch for .NET Framework 1.1 SP1 that was specifically issued for Vista: http://www.microsoft.com/downloads/details.aspx?FamilyID=59b18749-74f9-4891-8cb5-b22970b58aa9&DisplayLang=en.
Hi Thomas,
I was wondering if there are any known issues beyond the MS office issues when running side by side frameworks for desktop (client-server) applications? I have software written in vs 2005 and the network admin doesn’t want to install the 2.0 framework because of the potential of the installation breaking other software.
Is there really an issue?
Hi Campbell, the likelihood is that there would be no issues, but there is not a universal answer. Any existing .NET 1.0/1.1 applications will continue to use that Framework as long as it remains installed in addition to 2.0, so no issue there. The only case that can get you is if the PCs have an unmanaged application (see the post) that is not itself written in .NET, but loads the .NET runtime (the CLR) to run .NET code. Those apps will start to pick up .NET 2.0 instead of 1.1 unless you override them with the .config files. The big question is whether any of the apps on your PCs actually ARE 1) unmanaged apps that 2) also load .NET code. On a typical office desktop, there probably isn’t much that would fit that description other than Office, and even then it doesn’t matter unless you are using a .NET Office add-in. You would have to do a test to be absolutely certain, but if you’re talking about a typical office desktop PC, odds are you will have none of the unmanaged apps that I described and you will be just fine with the 2.0 side-by-side installation.
Thanks very much for the solution Thomas.. Even I had a problem with 2.0 and your solution works amazing…
Thanks a lot…
Soto said:
I ran into this blog trying to figure out why Quickbooks 2007 is trying to install .NET 1.1 onto a Vista machine (which of course ships with 3.0) when it is supposedly Vista certified.
It seems to be generating hangs, reboots, all sorts of problems for users but based on the the above, it appears that they should co-exist? Wonder why they did not just run it vs. 3.0 if it was written for Vista….
>>>>>>>> So what is the solution to this quickbooks snafu? I am trying to install quickbooks 2007 on my vista business and it keeps trying to install .net 1.1! Naturally, vista rejects it! And quickbooks does not post a solution!
Jason, Vista supports .NET 1.1. If it is failing during the install, have you tried just installing .NET Framework 1.1 by itself first?
.NET 1.1: http://www.microsoft.com/downloads/details.aspx?FamilyID=262d25e3-f589-4842-8157-034d1e7cf3a3&DisplayLang=en
SP1 for .NET 1.1: http://www.microsoft.com/downloads/details.aspx?FamilyID=a8f5654f-088e-40b2-bbdb-a83353618b38&DisplayLang=en
Hi Tom
Thanks for the quick reply. Won’t installing .net 1.1 overwrite the .net 3.0 on my vista??
Jason, no it won’t. .NET Frameworks 1.1, 2.0 and 3.0 can all exist side-by-side on the same machine. In fact, 2.0 and 3.0 *always* co-exist. Installing 1.1 will not overwrite either of those two.
Hi Tom,
Just tried installing dotnetfx from microsoft, and it went bust. Just said some processes are in error, then rolled everything back. I guess 1.1 and 2.0/3.0 are incompatible?
Hi Jason, I promise that is not the issue, but if the Framework 1.1 install is failing it is hard to diagnose because it could be anything. You might find some error messages in your Event Logs or in an error log on disk somewhere.
Check this out first though, maybe it will help:
http://blogs.msdn.com/astebner/archive/2007/02/04/error-installing-net-framework-1-0-and-1-1-on-windows-vista-caused-by-data-execution-prevention-dep.aspx
Will give it a try! Thanks a lot.
Dear Tom,
Hope you’re still around. Tried Stebner’s way of turning DEP off, and still it didn’t work. It still says the same thing as before when installing .net – ‘application has generated an exception that could not be handled’. Then it just rolls back. Any other ideas, please?
Hi Jason, you may be about to the point where you will have to contact Microsoft tech support. Since this is pretty clearly not your issue, you should not be charged for the call. Intuit’s tech support will be of no use because you’ll get nowhere until the Framework installs, and that is purely Microsoft’s realm.
Here are a couple of other things I found. Note that the icelava post has a couple of embedded links that are formatted with underlines vs normal link formatting. Failing that, I think more Internet searches or Microsoft support are your best approaches. Sorry I could not help further. There is no fundamental incompatibility at work here, just something amiss with the 1.1 installer in your particular configuration. If you do find out the cause please post another comment here. Thanks!
http://icelava.net/forums/thread/1464.aspx
http://blogs.msdn.com/astebner/articles/454956.aspx
We recently loaded .Net Framework on our web server to compliment v1.1. that was already in place and supporting several applications developed in VS2003. However now we have a predicament whereas either version 2.0 applications run fine or version 1.1 versions run fine but never both. It appears that the version selected in the settings for the last Application folder saved is the version that runs while a message saying “Service Unavailable” is presented to users of the non-working versions. Any ideas?
Thanks.
Curt, you must run ASP.NET 1.1 and 2.0 apps in different AppPools. It sounds to me that you have them in the same AppPool.
Hi,
Suppose I have a .net 2 app which references a .net 1.1 dll, what happend then? does the 1.1 dll know it should use the 1.1 framework?
Thanks
Tomer
Hi Tomer, if a .NET 2 app references a .NET 1.1 DLL, the 1.1 DLL will be forced to run under 2.0. You run the same risk of it maybe working, maybe not as you would with an entire 1.1 application running under 2.0. You’ll want to retest any code that lives in the 1.1 DLL in your 2.0 app to make sure it is working as expected. Only one version of the CLR may be running in a single process, so if your application is 2.0 then any other .NET code in that application’s process will also run under 2.0.
Hi Thomas,
We currently have our application in 1.1. This involves a server application. So if i migrate it to 3.0 (which we are preferring over 2.0), would it still work if any client is still using 1.1?
Thanks in advance.
Wonderful ideas man, way to go, helps a lot 🙂
Remote_User, the answer to your question depends on how the clients interact with your server application. Since you mentioned the clients using 1.1, I assume this is not a website but some kind of client/server app. If you were to upgrade the server app to .NET 3.0 while keeping the same client/server communication code, you would have less chance of issues than if you also rewrote the communication code with WCF in .NET 3.0. Again, it really depends how the clients interact with the server.
Hi,
Yes, so maybe we could actually use this WCF right, after all if we are migrating to 3.0.
If the current communication is based on DCOM model, will this be something really big, like needeing a re-architecture for the communication model?
Thanks a lot !
Hey and one more thing, this 3.0 is available for licensed use now?
Thanks.
Remote_User, yes, .NET Framework 3.0 was officially released last November. If you are currently using DCOM and thinking of converting to WCF, it’s likely you would want to revisit the design of your communication model. WCF supports SOAP Web services, MSMQ, Named Pipes for inter-process communication and TCP peer-to-peer for cross-machine communication. No matter which you choose, you design your interface and service virtually the same way, then configure WCF to link your interface and the specific protocol. However, if your clients are expecting DCOM, you will end up changing both your clients and the server.
WCF has some integration points with Enterprise Services, for example with transactions: http://msdn2.microsoft.com/en-us/library/aa751796.aspx. Please see netfx3.com for more information about all of the .NET 3.0 components.
Thanks for reading!
Thanks a lot ! Really appreciate your inputs.
HI Thomas,
I’ve have a .NET Framework 1.1 compiled DLL (COM enabled say MyDll.dll) Which is written in VB,I Use this Dll from a VC (Eg Myapp.exe) even though i supplied (Myapp.exe.config) with the <supportedRuntime> configuration settings i have problems executing Myapp.exe when .NET Framework 2.0 is installed. What should be the format of the config file, Please Help.
Srinivas, is the VC++ application managed or unmanaged C++? The format of the app.exe.config file is exactly that found in my original post above.
Hi,
I have a project (A)which uses dlls from other project (B) , so if i want to step into the code of B while running A, i.e. debug through it i need to copy over the .pdb files of B into A’s Bin directory right? But this is not helping. Doesn’t that work?
Thanks
Hi Remote_User, you might try the other way around. Open project B and tell it to start the debugger using the EXE of A. You can also use Attach to Process if it just refuses to pick it up. It depends a little on how the DLLs are used, but it seems like your original statement should be true too.
Hi Thomas,
We have developed our web application on .Net 1.1/windows 2003. Now, we wanted to migrate the application to .Net 2.0 but we don’t want to keep both 1.1 and 2.0 on the box, hence planning to remove the 1.1 from windows 2003. Is that possible? or If yes, would this setup(having only 2.0) create any issue in the future.
Hi Jack, you could certainly disable or remove .NET 1.1 on Windows Server 2003 using unsupported methods, but what do you hope to gain? You said you are working with an ASP.NET app, so once 2.0 is installed you can simply instruct IIS to run your site using .NET 2.0 in IIS Admin. Other than a bit of disk space wasted, there is no real downside to having 1.1 present if your apps are for 2.0. A 2.0 app cannot run on 1.1, so if your apps are all for 2.0 nothing will ever load the 1.1 Framework.
Removing it would probably be a bad idea if you ever had to call Microsoft Product Support for an issue on your server. Windows Server 2003 R2 now ships with .NET Framework 2.0 preinstalled.
If you have no 1.1 ASP.NET web apps, you can go into Add/Remove Windows Components and uninstall ASP.NET under IIS — that is for 1.1. If you still want to try removing 1.1 entirely, this article may give you some ideas: http://support.microsoft.com/kb/830646/. You could see if this tool will remove it: http://blogs.msdn.com/astebner/archive/2005/04/08/406671.aspx.
Hi Thomas,
I had .NET 1.1 on my system, still do have it and then yesterday i installed IIS. Does this require re-installation of .NET?? 🙁 …
Hi, I’ll assume you are asking because ASP.NET generally doesn’t work when you install in that order. You don’t need to reinstall the .NET Framework to get it working. Run “\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i” to install ASP.NET in IIS. Hope that helps.
Hi Thomas,
Does either of this impact the ASP .NET State Service? Because, after installing IIS and FW 1.1 the service won’t start because the path for the executable “aspnet_state.exe”, is not “\WINDOWS\Microsoft.NET\Framework\v1.1.4322\” but “\WINDOWS\Microsoft.NET\Framework\v2.0.5….\”. I haven’t installed FW 2.0 why could this be happening?
Thanks.
Hi — running the .NET 1.1 version of the aspnet_regiis command should also register the ASP.NET state service. If you’re saying that the registry has a path to the 2.0 Framework folder for the aspnet_state.exe service, then you must have at least had 2.0 installed at some time or another. You can always run the 2.0 version of “aspnet_regiis.exe -u” to uninstall it, and then run the 1.1 version of “aspnet_regiis.exe -i” to install 1.1.
Hi,
Thanks for the suggestions 🙂
I had a question regarding the “Process.PrivateMemorySize” etc under the Process class in System.Diagnostics. I tried several of these for a process (wanted to check the memory usage) which runs currently on my machine and compared that with that being displayed on the Windows Task Manager. None of them matched to what was there in the Task Manager.
Which property in the Process class should i use to get the as far as possible accurate memory usage and which may turn out to be as the one in the task manager?
Thanks.
Hi,
The Mem Usage column in the Task Manager matches that to the WorkingSet property. But the VM size doesn’t match the PrivateMemorySize, or even VirtualMemorySize ! Actually, PrivateMemorySize property gets to the closer value.
I am using .NET 1.1 and am trying to create symbolic link for files. I want to create a new file programmatically using C# and then link it to an existing file much like a soft link/symbolic link in Linux. This feature is not present?
The DataFormats.SymbolicLink seems to be a Read-Only propery.
Thanks!
No, but you can use P/Invoke to call the Win32 API directly — CreateSymbolicLink(). However, this is a new API with Windows Vista and Windows Server 2008. Maybe you could accomplish what you need with a shortcut?
I needed to do that programmatically 🙁 i don’t think i could manage with creating a shortcut from a program.
Hi, Thanks for the info.
I have another. slightly related problem. Say i have a .Net 2.0 dll exposed as a COM dll and i want to use it in vs2003, i know you can force it to run using the config file in .Net 2.0.
I am thinking about DCOM so that it runs as a separate process, in that case you dont need to do a config file? Any idea how to expose the same .Net 2.0 dll as a DCOM exe?
any other ideas?
thanks.
Nothing built for .NET 2.0 can run under .NET 1.1, and configuration cannot change that. You can force a .NET 1.1 app to run under 2.0, and then you’d be able to load your DLL in-proc, otherwise you’re looking at cross-process in one form or another. You have a number of options — expose your new code as a web service (instead of COM) and call the service from the 1.1 app; use the built-in System.EnterpriseServices classes to run as a hosted COM+ object — in the Component Services MMC you can choose to run as a “Server application,” which will automatically provide you a new process; force the 1.1 app to run under 2.0 and see if you run into any issues. I hope that helps!
I’ve got VS 2003 with Framework 1.1 on my dev machine. I’m coding for Microsoft Speech Server R1 which requires that configuration (coded in C# and ASP .NET). Meanwhile, I’d like to tinker with, and beef up my C# skills. As long as I don’t mess with the servers, can I install Framework 2.0 (or 3.0) and maybe VS 2005 side by side on my dev machine, without affecting the code I compile for the VS 2003 1.1 servers?
Hoping this isn’t an obvious issue, but I’m largely self taught on VS .NET.
Thanks,
Mike
Mike, you can install both versions of Visual Studio side-by-side and continue to use 2003 for your current code. There can be a couple of minor side effects, but nothing too bad. Here’s a link regarding side-by-side use: http://msdn2.microsoft.com/en-us/library/ms246609(VS.80).aspx. Another great option, since you just want to learn and play, are the ready-to-run Virtual PC virtual machines for evaluation of 2005 or 2008: http://msdn2.microsoft.com/en-us/aa972637.aspx. That way you can do anything you want to it and not have to worry about your main dev configuration. Thanks for reading.
Hi, Thanks for all the great info. I read every post hoping to find my particular scenario. Unfortunately, I didn’t. I have a windows user control created using .net 1.1 that is displayed in ie using the <OBJECT> tag in an asp page. Recently, .net 2.0 was installed on the client machines. The user control now displays an error that tells me it’s trying to load .net 2.0. I tried the <dll_name>.config, but that didn’t work. Also, IIS is configured to use 1.1. Is it a 2.0 Framework configuration issue? Can I just upgrade the user control to 2.0? Any ideas?
Thanks Mike. Based on what you wrote, I assume this is an ActiveX control? You wrote that it is displayed from IE using an <OBJECT> tag in a non-.NET ASP page, so I assume it must be COM/ActiveX. Since this is a client-side issue, IIS is irrelevant.
IE is hosting the .NET Framework runtime, so it picked up 2.0 when it was installed. iexplore.exe.config on every client machine is where you would have to override it — unrealistic unless you have control over all of your clients. Of course, if you upgrade it to 2.0 then your clients without 2.0 will fail, so the problem will reverse itself.
I haven’t addressed this particular issue before, but I think you would almost have to have two versions and use JavaScript in the page to determine which version to load via the <OBJECT> tag based on the installed .NET Framework version. Or — IE generally embeds the .NET version in the HTTP request, so you might be able to look at that and send back an <OBJECT> tag with the correct version, one that is written for 1.1 or one written for 2.0.
It’s possible that I’m off track since you didn’t post the exact error message, but I hope that gives you something to work from.
Thanks, Tom
Thanks for the quick reply. Yes, it is an ActiveX control. The error is: System.Security.SecurityException: Request for the permission of type ‘System.Data.OracleClient.OraclePermission, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed. After the stack trace is:
The action that failed was:
Demand
The type of the first permission that failed was:
System.Data.OracleClient.OraclePermission
The Zone of the assembly that failed was:
Intranet
Fortunately, this particular control is only used by a few clients (less than 5). Could it be specific to System.Data.OracleClient?
Thanks, Mike
Mike, I see, that’s a bit different than what I assumed. Your ActiveX control might function fine on 2.0 — often 1.1 code is OK on 2.0 but not always. The issue is that the code is running in IE in a limited-trust “sandbox” and doesn’t have enough permissions to use the Oracle client. The current security zone displayed is Intranet. In order to get these clients to work, you will have to tell the .NET Framework on each client that your assembly is trusted. Since it is under five clients you can probably get away with a manual fix.
This probably won’t be exactly correct, but the right track anyway. Run Start/Control Panel/Administrative Tools/Microsoft .NET Framework 2.0 Configuration to open the configuration MMC snapin. Are you installing the control on the clients in the GAC? Once you open the MMC, browse to My Computer/Runtime Security Policy and click Increase Assembly Trust in the right-hand pane. Click Next on the first wizard page, and the second will ask for the assembly you want to trust. Unfortunately, you can’t point directly to the GAC, so you need another copy of the assembly just for the purpose of pointing to it once here. You’ll need to give it full trust. Another way you can configure .NET security is with the caspol.exe command-line tool, and you might be able to trust your entire website vs. the specific assembly. You’ll have to do a little experimentation to see what scope of trust works.
I hope that helps. — Tom
That was the ticket! I had actually gone through that exercise with the .net 1.1 wizard. For whatever reason, I didn’t think to do it for 2.0. In the 2.0 wizard, I was able to use the Adjust Zone Security wizard to grant Full Trust to the Local Intranet zone. And, like magic, no more errors!
Thanks again for all your help, Mike.
Does this require re-installation of .NET?? 🙁 …
net.2.0 😉
Kral, I’m not sure what you are referencing. Nothing in my post requires reinstalling the Framework. Thanks, Tom
Thanks for the suggestions 🙂
I had a question regarding the “Process.PrivateMemorySize” etc under the Process class in System.Diagnostics. I tried several of these for a process (wanted to check the memory usage) which runs currently on my machine and compared that with that being displayed on the Windows Task Manager. None of them matched to what was there in the Task Manager.
Which property in the Process class should i use to get the as far as possible accurate memory usage and which may turn out to be as the one in the task manager?
we are in the process of creating a setup version for an ASP .Net application in .net 2.0 using visual studio 2005 under windows 2003 environment.
the setup working fine and well. where as in case of windows 2003 OS when .net ver 1.1 co-exists with .net ver 2.0 then the IIS configures our application on by default to .Net ver 1.1 rather than .Net ver 2.0
Resulting, user has to change to ver 2.0 in IIS (as given in the snapshot ) manually.
Incase of system having only .net ver 2.0 installed there is no problem.
Is there a way in web setup, where in we can make the application install on web server and get ver 2.0 selected in site setting in IIS.
Thanks for your support!
Lovneesh, I suggest creating a custom action to execute aspnet_regiis.exe. Here is a link related to creating a custom action: http://msdn2.microsoft.com/en-us/library/d9k65z2d(VS.80).aspx. Keep in mind that a 2.0 and 1.1 application cannot run in the same IIS application pool, so you may also need to create a new application pool and configure your virtual directory application to run under the new pool. The aspnet_regiis.exe command will be something like this: Aspnet_regiis.exe -s W3SVC/1/ROOT/SampleApp. You’ll have to determine the .NET Framework install path and the IIS internal path to the vdir to put all of the pieces together. I hope that helps. — Tom
Hi Tom,
We have several ASP.NET 1.1 applications hosted on the dev server. Recently We have develped a new app in ASP.NET 2.0 using Infragistics Controls(developed using Framework 1.1). At this time we are thinking of promoting the new app developed using ASP.Net 2.0 to production server. At present we only have ASP.NET 1.1 apps on production server.
1. Does promoting the new App 2.0 to production affect the existing ASP.NET 1.1 applcations perfromance or stability?
2. Will there be any difference in terms performance and stability between the ASP.NET 2.0 application developed using only 2.0 dlls and the one using some .NET 1.1 dlls ?
Hi Sundar,
1) the 1.1 and 2.0 applications will need to run in separate IIS application pools (on Windows Server 2003). They are separated into different processes and they won’t affect each other at all.
2) There is a low chance of any difference, but it is possible that you could run into issues. An application runs either as 1.1 or 2.0, not both, so the 1.1 dlls will run under 2.0. For the vast majority of cases apps are forward compatible to 2.0, but not 100%. You would need to thoroughly test the app to ensure that there are no compatibility issues with the Infragistics controls. Otherwise, you can generally expect 2.0 apps to perform better than 1.1 apps.
Thanks, Tom
As long as I use separate app pools, if I install a 2.0 web application in a virtual folder under a 1.1 app’s virtual folder, is there anything I need to look out for? E.g.: /app_1_1/app_2_0? I know that when there’s a hierarchy of 2.0 apps then there are inheritance “features” with web.configs, but I wasn’t sure if that would occur with different frameworks.
classic_craig, I do not recommend mixing 1.1 and 2.0 applications in a folder/subfolder tree. The web.configs can interact with each other in very frustrating ways. I’ve spent many a frustrating hour trying to make such structures work. So, that isn’t to say that it isn’t possible, but expect to do a lot of testing.
Hi, I have a VB.NET program (built on v1.1) that is running on a Windows 2003 server. This machine has just the .Net Framework v2.0 installed (no v1.1).
The customer reported that the program works fine, save for one problem: after completing execution, the window stays opened, instead of automatically closing.
I’ve encountered this problem before, and I was able to fix it when I converted the program to v2.0 and set the value of the CheckForIllegalCrossThreadCalls property to FALSE (apparently, the program, being built on v1.1, is not thread-safe).
However, I do not see the converted version of the program being deployed to the client any time soon, so I was wondering if you could provide any pointers as to how to fix the error while sticking with running it (v1.1) on a v2.0 machine.
I apologize for the somewhat vague description of the problem, as I am not able to debug the program at the client’s machine.
Thanks.
PGC, I can’t tell if you have identified that the issue goes away if the 1.1 app is actually running on 1.1 Framework vs. 2.0, but there is no _technical_ reason that 1.1 can’t be installed on the Windows 2003 Server. They may not want to, which is a different issue. You would just install Framework 1.1 and then put a <program>.exe.config next to your app to force it to use 1.1.
Given what you termed as a fix on the 2.0 version of the app, I would suggest that you are likely only suppressing the error by disabling CheckForIllegalCrossThreadCalls. Threading issues are extremely hard to track down, so you might consider spending some more time trying to diagnose the core issue.
Aside from forcing the app to run on 1.1 (if that matters) or modifying the code and redeploying, I do not think there is any way to actually fix the issue. You could try workarounds like starting the app with a Scheduled Task and giving it a timeout, so it can kill the process automatically after X hours, minutes.
Thanks for reading, Tom
Yes, the problem only came up when the app was run on the 2.0 framework. On 1.1, it works fine. I guess I have to check with the customer if they’re willing to have 1.1 installed on their machine as well.
That’s right, setting CheckForIllegalCrossThreadCalls to False was just a workaround, as we were just trying to convert our objects to version 2.0 then. It seems like making v1.1 apps run on v2.0 is a hit-or-miss thing and it’s hard to pinpoint the errors, but are there things that I have to particularly look out for just to get me started on identifying the error?
Thanks for the prompt response! The help is really appreciated.
Hi PGC, in some cases 2.0 is just exposing the bad things that you could do in 1.1 that weren’t handled well. For instance, in 1.1 exceptions on non-UI threads were not handled particularly well, but that behavior was changed in 2.0. In your case, due to the particular setting that you are changing to fix/hide the issue, you may have code in a worker thread that is directly using a UI object, which is definitely off-limits. You must Invoke() back to the UI thread from the worker thread before touching any UI objects. Just a guess, but a common mistake.
When you are actually running the 1.1 app (upgraded to 2.0) in the VS 2005/08 debugger, the new Managed Debugging Assistants (Debug/Exceptions…) can be helpful for finding subtle issues. In that same dialog, if you check “Thrown” for some of the other exception types, you may find exceptions occurring where you didn’t see them before. One caution being that _some_ are actually being handled, but the debugger will let you see them before the handler takes over.
Thanks for reading, Tom
Nice. Thanks for the tips. I’ll definitiely look into those. Thanks!
Thank you so much, now my framework 1.1 and 2.0 in Windows Server 2003 is working at the same time.
Hi Thomas,
It’s a very nice article pointing to the solution directly. It saves lot of time.
I have a quick question for you. We have project where we show the .Net Windows user control developed in 1.1 framework in Internet Explorer. The web application is deployed in webserver and the clients access it from their machines.
If the client machine has both 1.1 and 2.0 frameworks installed, browser is trying to load the control using the framework 2.0 which is not acceptable in our case. If we create the config file ‘IEXPLORE.EXE.config’ with the ‘supportedRuntime’ parameters, it is working fine and loading the control with 1.1 framework.
The problem here is, our client doesn’t accept this solution and doesn’t want to create this config file in all the client machines.
Is there any other way where we can specify that the browser should use only 1.1 framework to load our dlls.
Please help me out, if you know some way. Thanks in advance.
Hi. I have an strange problem. I have a Windows Server with a little processor (1 GHz). Before the instalation of the .NET Framework 3.5 the server had some Web applications in classic ASP and ASP.NET 1.1. The server was fine. I created the pool aplication and puted an 2.0 framework web aplication here. This web site has become unpredictable. Sometimes the user see in his browser that no error is displayed, but an infinite load appear. The fist page of the site never load in the client. No errors reported in the server’s event viewer. I suspect that this is a machine’s resources problem, or may be I need an special configuration for the 2.0 framework application pool. What is the minimum hardware requirements to run the 3.5 framework? How I can configure the application pools in a limited CPU processor scenario?
Very useful information.
now i can run framework1.1 and 2.0 web applicagtion on same iis6 server.
what i did
1.I Created new application pool
2.This application pool configurated on my application website (framework 1.1)
3.I added following code on web.config
<startup>
<supportedRuntime version=”v1.1.4322″ />
</startup>
4. set aps.net version 1.1 in my web site.
Thanks
senthil Kumar
esenthil.erd@gmail.com