2

I am using a really old website running on .net 2 but I am adding an addition to it that is MVC 3 running on .net 4, created as a virtual directory under the original website.

The problem is that if I get the "Server Application Unavailable" with one of the frameworks I can run aspnet_regiis for that framework and it fixes it but then it make the other framework give this error

I fix one it breaks the other

is there any way around this

I need this asap, client is breathing down my neck

1
  • 4
    Are you running both applications under the same application pool? You can't mix and match framework versions in a single app pool.
    – Tim
    Jan 31, 2012 at 1:44

3 Answers 3

7

Just create two application pools targeting each respective framework.

5
  • thank you so much I can't believe I never thought of this. I guess because of my panic
    – user758105
    Jan 31, 2012 at 1:59
  • 1
    @Gabe On IIS6, I cannot find the place to change aplication pool to target respective framework. How would you do that?
    – Jonas T
    Apr 3, 2013 at 0:27
  • You change it on the website properties, not in the app pool properties, which was confusing for me too Jul 5, 2013 at 18:39
  • I'll add that I had to force the app pool to recyle through IIS to get my page to come back. Dec 13, 2013 at 19:54
  • @JonasT - You change the target framework by right clicking on the applciation then going to the ASP.net tab in IIS6
    – Gabe
    Dec 15, 2013 at 16:03
1

IIS does not support running multiple .Net frameworks within a single application pool. If an application requires a different framework version than other applications in the same application pool, it must be placed in a new application pool.

You need to use different Application pools for each of the framework versions.

0

You have three choices:

  1. Upgrade the existing site to .net 4.
    This might be a lot of work.. or it might not.

  2. Start over with your "additions".
    This time using the same tech as the site is built in. Without knowing how involved your additions were, this might be easier than #1.

  3. Create a new app pool just for your 4.0 site.
    This item has the caveat that you aren't going to be sharing session data between the two. But may be the most expedient. Given that you are just now finding the problem I'm going to guess that the addition really isn't that tightly integrated and so you'll probably be just fine.

Either way I hope the lesson you take from this is that using new trinkets on an existing site is probably not the best way to go. ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.