TWO EPiServer Web Project in One Solution Do not work on Parrallel run

Member since: 2015


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?



#195869 Aug 09, 2018 17:28
  • Member since: 2010

    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.

    #195870 Aug 09, 2018 17:58
  • Member since: 2015


    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.

    #195871 Aug 09, 2018 18:02
  • Member since: 2008

    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.

    #195885 Aug 09, 2018 22:52
  • Member since: 2015


    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?

    #195894 Aug 10, 2018 12:22
  • Member since: 2008

    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?

    #195895 Aug 10, 2018 12:54
  • Member since: 2015


    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.

    #195899 Aug 10, 2018 15:07
  • Member since: 2007

    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

    #195914 Aug 10, 2018 17:53
  • Member since: 2015

    Thank you Henrik...

    We will plan accodingly as all of your suggestions.

    Thank you All...

    #195924 Aug 12, 2018 13:51
  • Member since: 2007

    Great! And your welcome!

    Please mark those answers you felt were helpful as answers


    #195927 Aug 13, 2018 8:17