Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

asp.net - Will a child application inherit from its parent web.config?

I setup a IIS application from within an existing application.

Will the parents web.config be inherited or is that something I have to set explicitly?

See Question&Answers more detail:os

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

1 Answer

0 votes
by (71.8m points)

Yes it will without setting anything explicitly, and I don't know any way to prevent it.

However many configuration sections will allow you to clear data inherited from parent files.

E.g.

<appSettings>
   <clear/>
   <add key=...>
</appSettings>

<connectionStrings>
   <clear/>
   <add ... />
</connectionStrings>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...