Web.config file is making problem, when it is locate in root directory(wwwroot) - by Nanda kumar R

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


0
0
Sign in
to vote
ID 329367 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 2/20/2008 7:39:50 AM
Access Restriction Public

Description

Hi,

If we hosted asp.net 2.0 application at root directory(C:\inetpub\wwwroot) it is making problem to other application which is hosted it's (wwwroot) child directory.

All Child directories application (developed using asp.net 1.1) is taking root directory's web.config file.

By naturally asp.net appliction can not understand asp.net 2.0 's config elements like <connectionStrings>,<healthMonitoring> etc.

I can eleminate these element using "ignoreconfigsection".

But i can not eleminate  the below section

<compilation debug="true">
			<assemblies>
				<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
				<add assembly="Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
				<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
				<add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>
		</compilation>


		<httpHandlers>
			<remove verb="*" path="*.asmx"/>
			<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
			<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
			<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
		</httpHandlers>
		<httpModules>
			<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
		</httpModules>


if you will give me option to ignore root directory's config file, very well other application will work fine hopefully.

I dont know whether the asp.net application has hosted at root directory is right or not.

Sign in to post a comment.
Posted by M21 on 7/28/2008 at 7:37 AM
Was this ever resolved?
Posted by Nanda kumar R on 2/22/2008 at 10:35 PM
Really i am very happy for your response. nice workaround.
Please dont mistake me, If a httpHandler or httpModule belongs to my application(at root).
In the same time all other apps not required the handlers. at that time what can i do?


Thanks.
Posted by Nanda kumar R on 2/22/2008 at 10:34 PM
Really i am very happy for your response. nice workaround.
Please dont mistake me, If a httpHandler or httpModule belongs to my application(at root).
In the same time all other apps not required the handlers. at that time what can i do?


Thanks.
Posted by Microsoft on 2/22/2008 at 5:35 PM
The configuration systems for both ASP.NET 1.1 and 2.0 are hierarchichal. As a result if a different framework version is a child of the root website (which is usually inetpub\wwwroot), then the configuration system in the child will attempt to merge the configuration from the root website. This behavior is by design since both the 1.1 and 2.0 configuration systems walk up the physical directory structure looking for parent web.configs.

A simple workaround is to move the common 2.0 configuration information to the root web.config file for the 2.0 framework. The root web.config is located at: C:\windows\Microsoft.NET\Framework\v2.0.50727\CONFIG. With this approach all of your 2.0 applications will pick up the common sections while 1.1 applications won't see the sections.

Thank you for submitting this issue. Hope the above information is useful for you.
Posted by Microsoft on 2/20/2008 at 11:22 PM
Thanks for your feedback.

We are escalating this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Thank you,
Visual Studio Product Team