2

I have a .Net 1.1 web application sitting in a folder called C:\inetpub\wwwroot\MyTestApp, where 'MyTestApp' is a virtual directory and is configured to be on ASP.Net version 1.1.4322 in IIS 5.1.

In the root directory (C:\inetpub\wwwroot) there is a web.config file for a .Net2.0 application, because the root folder contains some web pages written in .Net2.0.

Whenever I try to access 'MyTestApp' though I get an error...

Parser Error Message: Unrecognized configuration section 'connectionStrings'

Source File: c:\inetpub\wwwroot\web.config    Line: 17 

The .Net1.1 application in the MyTestApp folder is trying to access the web.config file in the root folder, and getting upset because it is on a different version. How can I tell the MyTestApp folder NOT to use the web.config file in the root folder, but instead just use the web.config in its own folder?

Is such a thing possible, or is nesting a .Net 1.1 application in a sub-folder under a .Net 2.0 application a no-no?

2 Answers 2

1

I think you need to configure your virtual directory for your 1.1 app as a "application" directory.

I am on IIS7, so I am providing this from memory!

If you right click it in IIS, and then click "Create Application" that should do the trick.

Web.config is always read based on proximity (closest to application first, up through folder structure, right up to Machine.config).

Hope this helps.

Edit

Checkout the guide on MSDN on creating Virtual Directories. It also touches on creating Applications.

Sign up to request clarification or add additional context in comments.

2 Comments

Alas, it is indeed already created as an application. Tts Application protection level is also set to High (Isolated).
When you access the virtual directory properties, and click the ASP.NET tab. There should be a button in there to edit the configuration, what configuration file information is listed when you do?
0

You want to use the InheritInChildApplications setting in the root web.config and set this to false.

1 Comment

more info related to this suggestion: stackoverflow.com/questions/367282/…

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.