Can I reference a 2.0 framework DLL from a website that is running under the asp.net 1.1 framework?

FreightTrain
FreightTrain used Ask the Experts™
on
I have a an interesting setup of 3 different websites that are referenced by each other.  2 of them have been upgraded to utilize the 2.0 framework and I have setup new application pools for them and the 3rd is still running under the 1.1 framework.  The 3rd one referenced the dll of the 2nd project, but now it has been upgraded to use the 2.0 framework.  Can I reference a 2.0 dll from a website that runs under the 1.1 framework?  

Thank you in advance for your help.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Will that particular section of the site run only the .net 2.0 dll/application?

If so you can modify the folder that the code is in that references the 2.0 dll into an application and change the application to use .net 2.0 without affecting the rest of the site. If you go to IIS manager and expand it to get to the site in question and then expand the individual site you'll see a list of folders. Right click the folder and click properties and click "create" under the directory tab.

This will allow you to set the asp.net version for the folder itself but still allow you to run the main site itself in .net 1.1. Be sure to give it a different application pool so it doesn't share the same app pool as the main site.

Author

Commented:
This is a great idea...There is only one DLL that is referenced within the site that was compiled in the 2.0 framework, everything else in the wesite is 1.1, so it is not a "folder" level issue, but a file level issue.  I don't want to have to recode the application.  

I am having some issues with my Form Authentication peice and I am wondering if it could be related to the mixing of different framework references.
Commented:
I'm not sure you'll be able to get it to work the way you want to, try this link to see if it points you in the right direction:

http://social.msdn.microsoft.com/forums/en-US/winforms/thread/db81cecd-ae6a-41f7-a5f2-a403bf1aaf5b/
The short answer is no, you can't.  That would constitute forward compatibility, which is not possible.  You can do it the other way around, and use 1.1 assemblies in a 2.0 application, because 2.0 is backward compatible.  Microsoft will not be supporting 1.1 much longer (if they even still do) so I strongly recommend you recompile your app use the 2.0 framework.  All you should need to do is load it up in VS2005, change the framework in the project properties and recompile.  Unless you are doing something really out there, it should compile just fine to 2.0 assemblies.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial