IIS trying to execute a page under 1.1

M

Michael Carr

I recently migrated a site from 1.1 to 2.0. For the most part, the site
still works. However, there is one page in particular that IIS insists on
processing with .NET 1.1, which leads to the following error:

--------------
Parser Error Message: Unrecognized configuration section 'xhtmlConformance'
Source Error:
Line 79: -->
Line 80: <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
Line 81: <xhtmlConformance mode="Legacy"/></system.web>
Line 82: </configuration>
Source File: web.config Line: 81

Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Version:1.1.4322.2032
----------------

You can see from the Version Information at the bottom that IIS is trying to
use 1.1, although the rest of the site is running under 2.0.

Here's what I've tried so far to fix this:

1. Renamed the file from "page1.aspx" to "page3.aspx"
2. Deleted all temporary IIS files in the various
Windows/Microsoft.Net/Framework directories.
3. Rebooted the machine
4. Created a new, default page in the website (which I verified to work) and
copied the code and html from this new page into the old page. Still didn't
work.
5. Deleted everything in the bin directory and rebuilt
 
J

Juan T. Llibre

Try deleting the ASP.NET 1.1 sections from your app's web.config,
and replacing them with ASP.NET 2.0-conformant sections.

btw, you did change the application's .net framework target,
from 1.1 to 2.0, by using the ASP.NET tab in the application's
"Properties" in the Internet Service Manager, right ?




Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
 
M

Michael Carr

More information on this problem:

In the Internet Service Manager, the ASP.NET version for the site is 2.0,
and for most files individually it is 2.0. However, when I check the version
for that particular file it is 1.1 and it is greyed out so I can't change
it. I tried changing the site back to 1.1 and then to 2.0 to see if this
change would propagate to the file, but it didn't. Why is this one
particular file staying set to 1.1 regardless of my attempts to change it?

Michael Carr
 
J

Juan T. Llibre

What you're describing sounds impossible.

What happens when you create a new file ?
Does it get assigned to 1.1...or to 2.0 ?

Create a new, blank, aspx file and check that.

If it gets assigned to 2.0, just copy the code
in the trouble file to the new file...and delete the old one.

I must confess, though, that I'm having a hard time thinking that
a single file can have a different .net framework version assigned to it.

That's set per application, not per file.

Again, your main problem sems to be that you have 1.1-specific
web.config settings because you have not updated your web.config
to reflect 2.0-specific settings after you upgraded the application to 2.0.

Rename your web.config to web.config.old; create a new web.config;
and make sure your new web.config *only* has 2.0-specific
entries/sections/settings in it.



Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
 
M

Michael Carr

What you're describing sounds impossible.

Yes, it sounds impossible to me too, but it's definitely happening. My
overall application is set to 2.0 but that single individal file comes up as
1.1 every time I right click on it.
What happens when you create a new file ?
Does it get assigned to 1.1...or to 2.0 ?
Create a new, blank, aspx file and check that.

It gets assigned to 2.0.
If it gets assigned to 2.0, just copy the code
in the trouble file to the new file...and delete the old one.

Yes, I already did that... but I am obsessive compulsive about things
working so I just wanted to get the old one working. :)
I must confess, though, that I'm having a hard time thinking that
a single file can have a different .net framework version assigned to it.
That's set per application, not per file.

That's what I thought too. But nothing I seem to do changes the setting,
including changing the filename.
Again, your main problem sems to be that you have 1.1-specific
web.config settings because you have not updated your web.config
to reflect 2.0-specific settings after you upgraded the application to
2.0.
Rename your web.config to web.config.old; create a new web.config;
and make sure your new web.config *only* has 2.0-specific
entries/sections/settings in it.

I deleted the entire web.config and added a new blank one to the project ...
but the same problem continues to happen.
 

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

Top