I am having two EPiServer Web Project (WebProject1 and WebProject2) pointing to the same Database. And The EPiServer Page/Block/Variation Models are placed in Common Assembly project (Web.Common) reference to the both (WebProject1 and WebProject2) application.
Running the project induvidually works well. But accessing them in the same time keep the Site Down. EPI APIs Do not work. IContentLoader actions threws Null exception.
Do we missed any configs in this approach?
Can you help us?
Hi, why do you try to use the same database for two different sites (based on your description you have two IIS web sites as you have two different codebases)? As you have to separate sites you should have own database per site.
Same database is used in multi-site setup but the sites have the same code base in that case.
Due to the bussiness need we are approching the way. Since contents are shared among the sites. But WebProject1 is act as the Website. WebProject2 will be used as WebService calls.
That sounds completely dangerous that you have two separate websites running the same database. You can do that with the same application running on the same database when you're doing a load balanced environment. But this is really asking for trouble.
I agree with Antti, If you really want to have two websites (domains) I'd say it's better to have a multisite solution with only one IIS site and multiple start pages in Epi.
I completely agree with you. But In our end, Its completely depends on running them in the seperate IIS thread due to performance concerns. The WebProject1 is running on heavy weight implementation having depenendency with 3rd party webservice calls. But WebProject2 does not have any 3rd party dependencies.
Considering the performance factor we have decided to seperate them to running in each IIS instance.
is that possible or not while via referencing the same assembly having the EPi models?
What kinds of performance concerns?
Otherwise, what about using the same application that contains both the website and the webservices, but one site only receives webservice traffic and the other one the website-traffic?
Due to the 3rd party WebService calls in the WebProject1, may goes down/too slow interms of App Pool Utilization whenever the 3rd party responses are lagging. So for, We are planning to use seperate app pool instances.
That is a very dangerous setup that I would not recommend at all.
If I read and understand your need correctly you have the need for one site and one api.
If that is the case the I would recommend you to not have two episerver sites, but one and then an ordinary web api solution in for example .net core.
If you need authentication between them you could implement that with federated security and for example IdentityServer 4.
This will give you the best solution and best performance
Thank you Henrik...
We will plan accodingly as all of your suggestions.
Thank you All...
Great! And your welcome!
Please mark those answers you felt were helpful as answers