November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
It looks like CMO database connection is not configured properly. Could you check that connection string named CmoEntities is defined in your website configuration?
By default connectionStrings.config file contains following connection string after installing EPiServer CMO:
<connectionStrings>
<add name="CmoEntities" connectionString="provider connection string="Data Source=YourDataServer;Initial Catalog=yourDatabase;Integrated Security=False;User ID=yourUser;Password=yourPassword;Connect Timeout=10";metadata=res://*/Entities.CmoModel.csdl|res://*/Entities.CmoModel.ssdl|res://*/Entities.CmoModel.msl;provider=System.Data.SqlClient" providerName="System.Data.EntityClient" />
</connectionStrings>
Yes, maybe it is because of this problem.
I tried to look for the "CmoEntities" in the Web.config file, but it was not found.
So what should I do now? I did try to select all of items when I was installing those components from EPiServer Deployment Center.
But why is that the CMO is still not installed?
You can run Deployment center and try to re-installl EPiServer CMO in that site.
By default CMO database connection string should be added in connectionStrings.config file. In the same file you have connection string for CMS database. Do you have anything in that file?
Can you describe steps to reproduce this issue?
The below is the connectionStrings.config file in my Alloy project:
What should i do then?
<connectionStrings>
<clear/>
<add name="EPiServerDB" connectionString="Data Source=BEN-PC\SQLEXPRESS;Initial Catalog=dbAlloy;Integrated Security=False;User ID=dbUserAlloy;Password=@123456;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
</connectionStrings>
Ah, ok, now I see what could be a problem. Everytime when you rebuild Alloy templates project it generates website configuration files based on templates in [Configuration] folder.
So probably you installed CMO, then rebuilt the project and all CMO configuration was lost.
See following blog postss and documentation for more details:
Hi Dmytro,
Thanks for your reply! That might be the problem. But I think I still got some problems to resolve my problem.
Actually the reason why I want to build the project is because I want to create a block type and block template in the Alloy project.
I was following the below link to create it
I have created the MyBlock.cs and MyBlockTemplate.ascx in the project, but when I go to the admin mode of Alloy site, and the block I just created does show up in the Block Type ietms. So I thought I need to build the project to make it appear in the Block Type item. That is why I built the project. However once I build the project, I cannot even open the site anymore for some reason.
Ben
Sure, you have to build the project to get new content type. I would suggest to create new site, install everything what you need on that site and remove that build event in Alloy project that generates configuration files everytime you rebuild the project. In this case any changes in configuration won't be overriden.
Ok. I am doing that now.
What do you mean "remove that build event in Alloy project that generates configuration files everytime ou rebuild the project" ?
Can I have more detail about this?
Thank you very much for your help , Dmytro!
I have refer to the link : http://world.episerver.com/Blogs/Jeff-Wallace/Dates/2012/11/Developers-Before-You-Build-that-Alloy-7-Project/
and I have done the following steps one by one
1. Install the integrated Alloy site with all the compulsory modules(e.g. CMO, Database etc) by running EPiServer Deployment Center and choosing the right option.
2. After this step, the site can be open by entering http://localhost:17000, it is definitely working
2. Copy the <YourSiteRoot>\[Configuration]\EPiServer folder and put it in the root folder.
3. Build the Alloy project from Visual studio
4. Copy the EPiServer folder under the root folder back to the <YourSiteRoot>\[Configuration].
Now I still cannot run the site because the CMO is also gone.
Was I misunderstand anything about those steps before first build of Alloy site?
Hi Ben,
There are two scenarios in this article: http://world.episerver.com/Documentation/Items/Installation-Instructions/Installation-Instructions---EPiServer-7/Modules-and-Alloy-Templates-Configuration/ for a new site and for a site with Alloy Templates already installed.
In your case, as I understand, you are trying to install a new site. So you should do installation in a certain sequence:
1. Install an empty EPiServer CMS site. (It means no Alloy, no CMO just an empty site. No optional modules should be choosen in the Deployment Center, except Search)
2. Install all required modules (CMO is installed on this step)
3. Install the Alloy Templates (the Alloy is installed the last)
If you do the installation according to these steps then you don't need to copy configuration files manually.
Hi Sergii,
Thanks for replying. I am sure you have expained it very clearly now and I understand that totally.
Now the thing is: which action should I choose from EPiServer Deployment Center in order to install a totally clean, empty, pure site without any module? I cannot see any option from it.
I doubt that if I should choose "-> Install site without database?"
I am using EPiServer 7.
I think if I can get this step solved, then the rest should be no problem at all. This step confused me.
Ben
In order to install an empty site you should:
After that you will get an emtpy EPiServer site (with a database) that doesn't have any modules and no pages.
Hi Sergii,
It is very clear now !
It is 100% working now!
Thank you so much!
Ben
Hi there, anyone has any idea about the below error? Thanks!
Server Error in '/' Application.
Connection string 'CmoEntities' is not found
Parameter name: name
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Connection string 'CmoEntities' is not found
Parameter name: name
Source Error:
Source File: c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\7f2d109f\8499e8ac\App_global.asax.0.cs Line: 0
Stack Trace:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18033