Running a 1.1 app under a 2.0 root web....

J

Jim Butler

I started to struggle with this recently. We have already crossed the
inheritance issue with root web's/assemblies and so on from the web.config
(ie we are using the remove assembly attribute in sub webs). Anyway, we
have upgraded our main root site to .net 2.0. We have a few other apps
under the root that are 1.1 and started reporting this error.

Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.

Parser Error Message: Unrecognized configuration section 'xhtmlConformance'

So the 1.1 engine has no clue what that tag means and craps out. I found a
few posts that stated this was by design (which is a huge problem for us)
here is the link:

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=102118

I think i have found a workaround based on information/trial and error but
need to know if there are any side effects that would possibly be a problem.

I took the problem tag <xhtmlConformance mode="Legacy"/> out of the root
web site web.config and added it to the web.config under the server
%windows%\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config

We don't/can't imagine a situation where we would need to set this by web
site ( the tag value ). So, my question is, is this ok, does it pose any
problems, risks? It seems to me that this is fine. I find it hard to
believe that its ok based on the above post from ms and they stated
basically by design, no workarounds other than changing the url.
 
C

Cowboy \(Gregory A. Beamer\)

Create separate app pools for 1.1 and 2.0. That is your first step. Next,
place the 1.1 apps in the 1.1 application pool. That should solve your
problems.
 
J

Jim Butler

Thanks for the response, but, we already did that and that will fix the
reverse of this situation. The problem is the root web app is 2.0 and there
are some sub apps that are still 1.1, When a 1.1 sub web app loads, it
loads all configs in a heirarchial fashion from the root (the 2.0 version)
and when it hits a tag it doesn't understand, it craps out. It is easily
reproducible, if you check the ms link you can repro easily. I only need to
know if i am doing something will cause undesired side effects, which i am
guessing not, but wanted to check.

Thanks,

jim

Anyway, just wondering what side effect if any, of moving the tag to the 2.0
web config
 
T

Turkbear

Thanks for the response, but, we already did that and that will fix the
reverse of this situation. The problem is the root web app is 2.0 and there
are some sub apps that are still 1.1, When a 1.1 sub web app loads, it
loads all configs in a heirarchial fashion from the root (the 2.0 version)
and when it hits a tag it doesn't understand, it craps out. It is easily
reproducible, if you check the ms link you can repro easily. I only need to
know if i am doing something will cause undesired side effects, which i am
guessing not, but wanted to check.

Thanks,

jim
We had that situation and could only solve it by setting up a new web site ( on the same IIS 6 server ) and using the
header info to set the new URL host name..
Register this header name entry with your DNS and it is 'seen' as a totally separate site ( it can then have 1.1 as its
default .NET) and 2.0 can stay as default on the original site..
 
J

Jim Butler

Thanks for the response, i worry about the url issues that we pull js and
images from the root. But anyway, luckily we are not using anything out of
the box ( net 2.0 features that would require a significant customization to
the web.config, we had already built all that stuff into our framework), so
there was only one tag that was a problem, and by moving it to the 2.0
framework web.config, it allowed the 1.1 app to work properly because the
1.1 engine has no knowledge of the 2.0 web.config that sits in the
%windows%framework.... directory, therefor it won't try to load it.

Thanks,

jim

ps, just offering what we figured out as a work around (which will be even a
greater problem with the release of .net 3.0), and wondering if anyone knew
of any side effects of taking this approach.
 
S

Steven Cheng[MSFT]

Hi Jim,

Yes, you're right, the problem you met is an existing limitation of the
ASP.NET web.config inheritance. The ASP.NET application will inherit the
web.config in its super path hierarchy regardless of the super
application's version. Generally the recommendation is as below:

** if possible, isolate ASP.NET 1.1 and 2.0 applications in different
website, of course the application pool should also be separated.

** If we can not avoid deploy both 1.1 and 2.0 ASP.NET applications in the
same IIS site, we'd better always put 1.1 application at super level path.
In other words, try avoid putting ASP.NET 1.1 applications as sub
application under ASP.NET 2.0 application.

for your scenario, it is a parituclar case that you can not avoid nesting
ASP.NET 1.1 app under 2.0 app, I think the workaround you got from product
feedback center is the reasonable approach( put 2.0 specific global setting
into the machine level web.config file).

BTW, I've also met some other issue like the super web.config's
<httphandler> setting be inherited by sub applications(unexpectedly). In
ASP.NET 1.1, this is also restricted, while in ASP.NET 2.0, we can use the
<location> element to remove the httphandler setting for such certain sub
directory. e.g

=========================
<location path="subdir1">
<system.web>
<httpHandlers>
<clear/>
</httpHandlers>
</system.web>
</location>
==========================


#How to: Configure Specific Directories Using Location Settings
http://msdn2.microsoft.com/en-us/library/ms178692.aspx


Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jim Butler

Thanks for the info,

jim
Steven Cheng said:
Hi Jim,

Yes, you're right, the problem you met is an existing limitation of the
ASP.NET web.config inheritance. The ASP.NET application will inherit the
web.config in its super path hierarchy regardless of the super
application's version. Generally the recommendation is as below:

** if possible, isolate ASP.NET 1.1 and 2.0 applications in different
website, of course the application pool should also be separated.

** If we can not avoid deploy both 1.1 and 2.0 ASP.NET applications in the
same IIS site, we'd better always put 1.1 application at super level path.
In other words, try avoid putting ASP.NET 1.1 applications as sub
application under ASP.NET 2.0 application.

for your scenario, it is a parituclar case that you can not avoid nesting
ASP.NET 1.1 app under 2.0 app, I think the workaround you got from product
feedback center is the reasonable approach( put 2.0 specific global
setting
into the machine level web.config file).

BTW, I've also met some other issue like the super web.config's
<httphandler> setting be inherited by sub applications(unexpectedly). In
ASP.NET 1.1, this is also restricted, while in ASP.NET 2.0, we can use
the
<location> element to remove the httphandler setting for such certain sub
directory. e.g

=========================
<location path="subdir1">
<system.web>
<httpHandlers>
<clear/>
</httpHandlers>
</system.web>
</location>
==========================


#How to: Configure Specific Directories Using Location Settings
http://msdn2.microsoft.com/en-us/library/ms178692.aspx


Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



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

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,698
Latest member
LydiaHalle

Latest Threads

Top