开发者

Does a web.config substitute app.config?

开发者 https://www.devze.com 2023-04-09 20:04 出处:网络
I wrote a dll project in c#. I added a service reference. A app.config was automatically generated. In the same solution I have an asp.net project.

I wrote a dll project in c#. I added a service reference. A app.config was automatically generated. In the same solution I have an asp.net project.

If I copy paste the relevant configuration from the app.config to the web.config and change the client url - will it override the service url in the app.config?

The funny thing is that everything works OK even without copying this section to the web.config. How co开发者_开发技巧me?

TIA


Yes.

The config schema is the same for web and app.config. There are some sections that will only make sense for web apps, but generally not the other way around. You should be just fine copy-pasting your configuration.

The web project only looks at Web.config, so you will need to copy the configuration to your web.config.

0

精彩评论

暂无评论...
验证码 换一张
取 消