Don't miss out Virtual Happy Hour today (April 26).

Try our conversational search powered by Generative AI!

Is the dotnet CLI ready for prime time? epicmsempty epicommerceempty

Vote:
 

Today I was experimenting with creating new projects via the dotnet CLI, but wasn't able to get a site working.

Using both epicmsempty and epicommerceempty, the site installs, I can navigate to /util/login, and the sign in appears to work. But, after signing in, when I go to /episerver, I get a blank screen 404.

Setting up a new site the old way -- through the Visual Studio new solution/project UI -- works just fine. So I wonder, is the dotnet CLI ready for prime time?

To reproduce the issue...

1--CLI

1.a. First you need to install the Episerver Templates (documentation). If you've already done this on your local machine once, you don't need to do it again.

dotnet new -i EPiServer.Net.Templates --nuget-source https://nuget.optimizely.com/feed/packages.svc/ --force

1.b. Then install the Episerver CLI Tool. Similar to #1, this must only be done once per machine.

dotnet tool install EPiServer.Net.Cli --global --add-source https://nuget.optimizely.com/feed/packages.svc/

2--CMS

2.a. To install a CMS project, do the following:

dotnet new epicmsempty --name CmsProjectName

cd CmsProjectName

dotnet-episerver create-cms-database CmsProjectName.csproj -S . -E

dotnet-episerver add-admin-user CmsProjectName.csproj -u username -p Password123! -e user@email.com -c EPiServerDB

Note that the . in line 3 should be the name of your local MSSQL instance.

Also note that on line 4, the password must conform to the default ASP.NET Identity password requriements, otherwise you won't get past the login screen.

2.b. Once you've executed the above steps, run the site. If you're in Visual Studio, you can just Ctrl+F5. If you are in VS Code, you can type dotnet run and then open https://localhost:8001 in your browser.

2.c. Sign in with username Password123!

2.d. You are sent to the home page, which 404s -- as expected.

2.e. Navigate to /episerver -- this also 404s. Oops 🐞

3--Commerce

3.a. To install a Commerce project, do the following with a different CLI terminal and a different folder (documentation):

dotnet new epicommerceempty --name CommerceProjectName

cd CommerceProjectName

dotnet-episerver create-cms-database CommerceProjectName.csproj -S . -E

dotnet-episerver create-commerce-database CommerceProjectName.csproj -S . -E --reuse-cms-user

dotnet-episerver add-admin-user CommerceProjectName.csproj -u username -p Password123! -e user@email.com -c EcfSqlConnection

dotnet add package System.Configuration.ConfigurationManager -v 5.0.0

The same two notes above -- about MSSQL and the password -- apply here as well.

Note the last line, which installs the ConfigurationManager package. This is required otherwise the site won't even run. I assume it is a bug in the epicommerceempty template. 🐞

3.b. Run the site; same as 2.b. above. If you used dotnet run in 2.b. above, make sure you Ctrl+C in that terminal window to stop the CMS site before trying to run the Commerce site with the same port...

3.c. Sign in; same as 2.c. above.

3.d. Home page 404s, no problem; same as above.

3.e. Navigate to /episerver, get a 404 again 🐞

#271225
Edited, Feb 06, 2022 0:22
Vote:
 

Try /episerver/cms instead

#271229
Feb 06, 2022 11:36
Drew Null - Feb 06, 2022 15:41
Brilliant! Could have sworn I guessed that. Thanks 👍
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.