1

So, I have an application that needs multiple Webconfigs. I seperated each Web form in its own folder and put a web config file.

enter image description here

How do I make sure that Login Webform only uses the LoginWeb.Config?

This is my root Web Config and that is what it's using.

enter image description here

I've done searches, and the closest thing I came too was this in my LoginWeb.config file

<appSettings>
    <add key="theme" value="Login theme"/>
  </appSettings>

No idea how to link that to my Login.aspx web form so it can use that specific config file. Help would be appreciated.

Airizzo
  • 165
  • 1
  • 12
  • Why do you think younneed multiple web config files? – mason Mar 25 '20 at 04:06
  • Because certain webforms are only going to be allowed by your role. It's a good way for me to dictate what a person with Admin has and what a normal user has access too. – Airizzo Mar 25 '20 at 14:44
  • You don't need multiple web.config files to accomplish that. It's easy to do that [from a single web.config](https://weblogs.asp.net/gurusarkar/setting-authorization-rules-for-a-particular-page-or-folder-in-web-config). – mason Mar 25 '20 at 14:53
  • I understand I can do that, but for greater security and to have more control, we need seperate config files. It's easier when the module is in its own folder as well. This way, I'm not editing a location path that doesn't need to be edit. Normal users won't be as privy as we are. This kind of deletes the need for user error too. – Airizzo Mar 25 '20 at 15:13
  • I don't understand how a separate web.config gives you greater security or more control. If anything it spreads security controls across multiple files, decentralizing your security and making it harder to manage, plus bringing all of the headaches that having more than one web.config in a project brings. – mason Mar 25 '20 at 15:15

0 Answers0