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
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).
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)
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.
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)).
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..
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.
Participant
753 Points
2611 Posts
how to use more web.config in one domain
Dec 09, 2013 11:43 AM|programercek|LINK
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.
All-Star
48260 Points
17978 Posts
Re: how to use more web.config in one domain
Dec 09, 2013 11:56 AM|PatriceSc|LINK
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).
Participant
753 Points
2611 Posts
Re: how to use more web.config in one domain
Dec 09, 2013 12:07 PM|programercek|LINK
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)
All-Star
25749 Points
10436 Posts
Re: how to use more web.config in one domain
Dec 09, 2013 02:07 PM|jeff@zina.com|LINK
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
Participant
753 Points
2611 Posts
Re: how to use more web.config in one domain
Dec 09, 2013 03:14 PM|programercek|LINK
This I have a problem.
If I have in one map and then binding more domain name....
All-Star
48260 Points
17978 Posts
Re: how to use more web.config in one domain
Dec 10, 2013 07:17 AM|PatriceSc|LINK
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)).
Participant
753 Points
2611 Posts
Re: how to use more web.config in one domain
Dec 10, 2013 05:36 PM|programercek|LINK
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..
Contributor
3390 Points
1079 Posts
Re: how to use more web.config in one domain
Dec 11, 2013 10:12 PM|kctt|LINK
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.