locked
how to use more web.config in one domain RRS feed

  • Question

  • User643189141 posted

    Hello,

    I have 1 project in one map. Binding my project in more domain.
    How to use more web.config with domain.

    Like:
    Domain1.com I have web.config-->>ApplicationName=domain1.com
    Domain2.com I have web.config-->>ApplicationName=domain2.com
    Domain3.com I have web.config-->>ApplicationName=domain3.com

    Please help.

    Thanks.

    Monday, December 9, 2013 11:43 AM

Answers

  • User-801004448 posted

    This application is for each domain is the same but if will different will be only other css and applicationname... applicationame needs because in this case is possible to insert the same email address,username,etc..

    You can just create different websites/applications. Each with its own folder. It would take less time then finding out solution for what you want to achieve.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 11, 2013 10:12 PM

All replies

  • User753101303 posted

    Hi,

    What are the different settings you want ? Another approach would be to use as single web.config but to fetch connection strings and settings based on the domain name (ie having a domain1, domain2 and domain3 connection string in the same web config file).

    Monday, December 9, 2013 11:56 AM
  • User643189141 posted

    I want to use the same db for with more different domains.
    No needed 10 different connection strings, just i want to use applicationname=domain1.com applicationname=domain2.com.
    Or for each domain each web.config (directory stay the same)

    Monday, December 9, 2013 12:07 PM
  • User-1853252149 posted

    I'm not sure I see the issue.  As long as each domain is in its own folder and that folder is an application root, you have no problem.  Though using a single database is a weird requirement.

    Jeff

    Monday, December 9, 2013 2:07 PM
  • User643189141 posted

    This I have a problem.
    If I have in one map and then binding more domain name....

    Monday, December 9, 2013 3:14 PM
  • User753101303 posted

    Either you are doing a single app (the app can get the domain and act accordingly to have a domain specific configuration). Then there is no need to have a different web.config. What exactly will be the difference between those apps ? Using Request.Url.Host allows to know on which domain you accessed this app (and for example use this as a key in your db to get additional config info).

    If on the other hand you consider this as multiple apps (which could be wanted for safety reasons), it's likely easier then to just handle this at deployment time (it would be quite easy to have a process that just copy the app to all or some folders and keep a separate web.config with its own settings (possibly autogenerated based on the domain name)).

     

     

     

    Tuesday, December 10, 2013 7:17 AM
  • User643189141 posted

    This application is for each domain is the same but if will different will be only other css and applicationname... applicationame needs because in this case is possible to insert the same email address,username,etc..

    Tuesday, December 10, 2013 5:36 PM
  • User-801004448 posted

    This application is for each domain is the same but if will different will be only other css and applicationname... applicationame needs because in this case is possible to insert the same email address,username,etc..

    You can just create different websites/applications. Each with its own folder. It would take less time then finding out solution for what you want to achieve.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 11, 2013 10:12 PM