Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
540 views
in Technique[技术] by (71.8m points)

c# - How do I stop web.config inheritance

Ok

I have a Asp .net 3.5 Website in IIS6 on Windows Server 2003 (32bit).

with a Asp.Net 1.1 WebApplication in a sub virtual directory. (this is set to use the older 1.1 .net runtime and is configured with it's own App Pool. So for all intents and purposes is completely seperate.

Except it keeps on inheriting the root website's .net 3.5 web.config.

I've tried adding

<location path="." inheritInChildApplications="false">

to the root websites web.config but it doesn't seem to work.

Strangely the error is actually

<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

which is being reported from the .net 1.1 runtime with the website path WEBSITE/OLD_WEBAPP but it's moaning about the webSite (as in the .net 3.5 one's) web.config and how it doesn't understand the type attribute on the sectionGroup tag.

What am I doing wrong? Please tell me it's something obvious. Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
<location path="." inheritInChildApplications="false">
  <system.web>
    ...
  </system.web>
</location> 

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...