ASP.NET 2.0 app with Virtual Directory running 1.1 (different pool

G

Guest

I am running on Window 2003. I have a website built in ASP.NET 2.0. I need to
have a Virtual Directory running an application in 1.1. I have configured
each in its own Application Pool. The 1.1 application picks up and parses the
2.0 web.config. It is complaining about the connectionstrings node. If I
comment out that node the applications both run.

I have tried running the 1.1 application under 2.0 but there are some
controls used in that application that don't function properly in that
scenario. The 1.1 app cannot be converted at this time.

The issue is that I cannot use any of the new nodes in 2.0 for my 2.0
application (connection string, url rewriting).

Thoughts?

Nate
 
Y

Yuan Ren[MSFT]

Hi Nate,

Thanks for posting!

From you description, I'm sorry I can not understand the issue very
clearly. Let me explain my understanding for the current issue: the current
ASP.NET application (v2.0) is running under the setting of v1.0. If I have
misunderstood anything, please let me know.

Based on my understanding, I don't think the application can work fine in
this scenario. I suggest you configure the "ASP.NET version" to "2.0.xxxx"
in the "ASP.NET" tab in IIS. Whatever the application pool is used, the
application will work well when the correct version setting.

I appreciate your understanding and hope the above information will be
helpful, if you have any issues or concerns please let me know. I will be
happy to be of further assistance.

Regards,

Yuan Ren [MSFT]
Microsoft Online Support
 
G

Guest

Your understanding of my situation is not correct. My site is layed out like
the diagram below.

Web Sites
--ABC Site (built in and configured to use 2.0.xxxx in App Pool 1)
----A Virtual Directory (built and configured to use 1.1.xxxx in App Pool 2)

When the virtual directoy application built in 1.1 starts it throws a parse
error if there are any nodes in the web.config file of the ABC Site 2.0 site
that are specific to ASP.NET 2.0 (e.g. <connectionStrings/> or <urlMappings
enabled="true">).

I have tried running the 1.1 application under 2.0 but it does not work.

Why does the 1.1 application care what is in the web.config file of the 2.0
application? Is there some further way to seperate the two?
 
J

Juan T. Llibre

re:
Why does the 1.1 application care what is in the web.config file of the 2.0
application? Is there some further way to seperate the two?

You need to understand the difference between a Virtual Directory and an Application.

A Virtual Directory will inherit from the Application which it's a Virtual Directory of.
It makes sense that 2.0 web.config settings create problems for a 1.1 App.

An Application stands alone and does not inherit from any other Application.

Try making your 1.1 Virtual Directory an Application.

You might need to implement session-sharing between them
if you are using session state for critical application data.



Juan T. Llibre
ASP.NET MVP
ASPNETFAQ.COM : http://www.aspnetfaq.com
==================================
 
P

Patrick Teas

Hi.

I'm having the exact same problem as Nate.
My Virtual Directory has an application name, MyAppName, with a starting
point that is <Default Web Site>\MyAppName.
I have removed the application name and re-created, yet it still has a
starting point under <Default Web Site>.
I need the url for the 1.1 site to be remain under the 2.0 site like it is
now.
So how do I get my virtual directory to behave like an application of it's
own, yet still be accessed at the url http://myTopLevel2.0Site/my1.1site?

Thanks for the help.

Patrick Teas
 
Y

Yuan Ren[MSFT]

Hi Nate,

Thanks for your reply!

I'm sorry for misunderstood the current issue. As Juan mentioned, the
application is different of the virtual directory. So you should create the
application for the ASP.NET 1.1 application in IIS. I have performed the
test and there is no error has been encountered.

Regards,

Yuan Ren [MSFT]
Microsoft Online Support
 
J

Juan T. Llibre

I must admit I was mistaken.

I just reproduced your structure ( a 1.1 app running under a 2.0 app )
and have found that, indeed, the 1.1 app balks at 2.0-only web.config
configuration entries in the 2.0's app's web.config.

Now, I realize that we may have been trying to ignore Application boundaries.

An Application is defined as all the files in a subdirectory which has
been marked as an Application...and all the files in all subdirectories
of the Application's root.

Anything which is included under the application's subdirectory *must* run under
that application's "rules", and apparently that includes the target .Net Framework.

Testing further, I found that after I created the VS 2003 project and closed it,
I couldn't open it again, getting an "http 500 internal error" message.

Moreover, the 1.1 app ran OK...as long as I didn't assign it to a 1.1 AppPool.

As soon as I assigned it to a 1.1 AppPool, that caused an "Application Unavailable"
error message in all my 2.0 apps, which can only mean that it's running under 2.0 rules,
even though the ASP.NET tab is marked as targeting the 1.1 Framework.

Bottom line : you can't mix .Net Frameworks within the same application.

Sorry. I wish I had better news for you.




Juan T. Llibre
ASP.NET MVP
ASPNETFAQ.COM : http://www.aspnetfaq.com
==================================
 
J

Juan T. Llibre

Yuan,

further testing leads me to believe that it's impossible to run a 1.1 app as a subapp
of a 2.0 app, or as an independent 1.1 App, as long as it's physically under a 2.0 App.

Read the details in my last post in this same thread.

I deleted my test files, but can repro them easily.



Juan T. Llibre
ASP.NET MVP
ASPNETFAQ.COM : http://www.aspnetfaq.com
==================================
 
P

Patrick Teas

Hi Juan,

Thanks very much for your investigation.

So, now that we have proven that my current implementation will not work,
can you suggest a different way of achieving the url addressing that appears
below the default web site, yet refers to an application that is not
actually a child of the default web site?

What I need is a way to access a page like
www.myweb.com/mySubWeb/mypage.aspx while mySubWeb is not actually a child
site under myWeb.com in IIS, so it can be configured as it's own application
with it's own framework version.

Thanks for the help.

Patrick Teas
 

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,697
Latest member
AugustNabo

Latest Threads

Top