Do you have a web.release.config that set the setting to On?
I just went through the exact steps from scrach again. Again the project compiled no problem, and published with no errors. But when I go to the website I get: "The page cannot be displayed because an internal server error has occurred." When are these errors logged? There is nothing in application insights. The only difference between this attemp and the first attempt, is that this attempt, when I created the Alloy project, I unticked the search options as per the instructions (the first attempt I tried to publish an existing Alloy demo project, which had the default search options selected). However, neither work. I follwed the instructions to the exact letter, expcept where the UI has changed considerably becaues these in structions are based on an onld verison of CMS, unfortunately.
Do you have access to the PAAS Portal?
If you do and have set up the logging according to:
and also this
Then you should be able to see it in the PAAS Portal.
If not, contact support firstname.lastname@example.org and ask then for the logs.
Yes, I have access to paasportal, which I undestand is just for pushing from integratoin to preprod to prod - nothting to do with publishing from VS to Integration.
I see it has the ability to download logs. I see this error in the logs. Any idea what this error means, and how to fix? There is no mention of cmdlet in the instructions.
System.NotSupportedException: The database schema for 'CMS' is not installed. Update the database manually by running the cmdlet 'Initialize-EPiDatabase' in the package manager console or set createDatabaseSchema=""true"" on episerver.framework configuration element.
at EPiServer.Data.SchemaUpdates.Internal.DatabaseSchemaManagerImplementation.ThrowCreateDatabaseException(String displayName)
at EPiServer.Data.SchemaUpdates.Internal.DatabaseSchemaManagerImplementation.EnsureDatabaseSchema(DataAccessOptions dataAccessOptions)
at EPiServer.Data.DataInitialization.Initialize(InitializationEngine context)
at EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key)
at EPiServer.Framework.Initialization.Internal.ModuleNode.Initialize(InitializationEngine context)
OK, I found several other people with the same error (I guess the documentation "Creating a new CMS site and deploying" is wrong or missing a step).
One published solution was to add <episerver.framework updateDatabaseSchema="true"> in the web.config. I did this, and now in the paas logs I see:
Skip: objectName="^configProtectedData$"" Provider: auto, Path: A tracing deployment agent exception occurred that was propagated to the client. Request ID 'e35331c8-f5aa-4baf-b23c-22c0d302735c'. Request Timestamp: '11/02/2020 14:27:25'. Error Details: ERROR_SQL_EXECUTION_FAILURE Microsoft.Web.Deployment.DeploymentDetailedClientServerException: An error occurred during execution of the database script. The error occurred between the following lines of the script: "15" and "22". The verbose log might have more information about the error. The command started with the following: ""CREATE TYPE [dbo].[AddApprovalTable] AS TABLE ("" The type 'dbo.AddApprovalTable' already exists, or you do not have permission to create it. http://go.microsoft.com/fwlink/?LinkId=178587 Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_SQL_EXECUTION_FAILURE. ---> System.Data.SqlClient.SqlException: The type 'dbo.AddApprovalTable' already exists, or you do not have permission to create it. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.Web.Deployment.DBStatementInfo.Execute(DbConnection connection, DbTransaction transaction, DeploymentBaseContext baseContext, Int32 timeout) --- End of inner exception stack trace --- at Microsoft.Web.Deployment.DBStatementInfo.Execute(DbConnection connection, DbTransaction transaction, DeploymentBaseContext baseContext, Int32 timeout) at Microsoft.Web.Deployment.DBConnectionWrapper.ExecuteSql(DBStatementInfo sqlStatement, DeploymentBaseContext baseContext, Int32 timeout) at Microsoft.Web.Deployment.SqlScriptToDBProvider.AddHelper(DeploymentObject source, Boolean whatIf) at Microsoft.Web.Deployment.DeploymentObject.AddChild(DeploymentObject source, Int32 position, DeploymentSyncContext syncContext) at Microsoft.Web.Deployment.DeploymentSyncContext.HandleAddChild(DeploymentObject destParent, DeploymentObject sourceObject, Int32 position) at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source) at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source) at Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject) at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable`1 syncPassId, String syncSessionId) at Microsoft.Web.Deployment.DeploymentAgent.HandleSync(DeploymentAgentAsyncData asyncData, Nullable`1 passId, String user, String siteName) at Microsoft.Web.Deployment.DeploymentAgent.HandleRequestWorker(DeploymentAgentAsyncData asyncData) at Microsoft.Web.Deployment.DeploymentAgent.HandleRequest(DeploymentAgentAsyncData asyncData) ",4edda355-4f47-499e-a630-73354c6706ae
Well, it used to be like that but now it has a lot of functions that you need.
It sounds like the init SQL script is not run on your database
Did you do this step?
Read more here
Is there any way to see if the database is actually on the integration server? E.g. any way to connect to it remotely, or some tool to view the tables?
From what it seems, the database has already been created on the server which is why you are unable to create new tables with the same name.
Are you able to browse to ~/episerver? Maybe it's the issue with the home page not configured under Admin > Manage Sites?
I tried to deploy again, this time removing <episerver.framework updateDatabaseSchema="false"> and unticking "update database" in the publish dialog. Now I get this when I try to browse the site:
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="Off"/> </system.web> </configuration>
With a lot of help from an episerver expert, we got a "hello world" alloy project to deploy to integration.
There are several manual steps you need to do in addition to the instructions here: https://world.episerver.com/digital-experience-cloud-service/deploying/creating-a-new-cms-site-and-deploying/
1) to ceate the database.
It was not possible to create the database via the publish profile, nor via <episerver.framework updateDatabaseSchema="true">.
The only way which worked was to use Update-EPiDatabase command and hard code the azure connedtion strings in to the web.config.
<add name="EPiServerDB" connectionString="Data Source=xxxx.database.windows.net,1433;Initial Catalog=epicms;User Id=epiuser@xxx;Password=xxx;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
<add name="EPiServerAzureBlobs" connectionString="DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx==;" />
<add name="EPiServerAzureEvents" connectionString="Endpoint=sb://xxx.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=xxxxx" />
These connection strings must be retrieved from the "App service" resource for your environment in portal.azure.com. Under "settings"->"Configuratoin" on the left nav, then ou will see "connection strings" at the bottom of the page on the right. You need the DB, Azure events and Azure blobs to get it working.
You have to untick the "update database" in the publish dialog. We could not get this to work with the provided documentation.
2) add "Remove additional files at destination" in the settings section of the publish profile. This is critical.
3) you have to get episerver to whitelist your public IP with the target integration environment for Update-EPiDatabase to work.
4) make sure you have EPiServer.Azure package installed.
5) when you deploy or hit the site, make sure you are running the log stream so you can see errors. In https://paasportal.episerver.net/ for your subscriptoin, select "troubleshoot" then "open log stream window" for your integation env.
6) you will want to add custom errros in the Web.config so you can see what the actual error is on the page:
<customErrors mode="Off" />
Glad to see you finally get it working. I tried response your thread a few times, but my browser (new Microsoft Edge) got crashed every time I submitted.
Has your company bought Developer training subscription? If yes, I highly recommend you watch Developing for DXC Service . You'll learn everything as you need to set up, deploy and working your project on DXC. Most of the issues you've been through are covered in the training material e.g. how to deploy database first time, what azure packages need to be installed in your solution to get it working on DXC, what transformation you'll need for working on both local and DXC environment etc.
I setup VS 2019 as per EPiServer instructions and got Alloy working locally.
Our organisation setup a DXC subscription, and I was sent the publish details for the integration env.
I followed the exact instructions here: https://world.episerver.com/digital-experience-cloud-service/deploying/creating-a-new-cms-site-and-deploying/
If I hit plublish, I see this in the output window:
2>Adding child sitemanifest (E:\dev\xxx\epi_projects\Alloy1\obj\Release\Package\PackageTmp).
2>Adding child sitemanifest (E:\dev\xxx\epi_projects\Alloy1\obj\Release\Package\PackageTmp).
2>Adding child sitemanifest (E:\dev\xxx\epi_projects\Alloy1\obj\Release\Package\PackageTmp\App_Data).
2>Web App was published successfully http://rnkg0xxxxxxxinte.dxcloud.episerver.net/
The publish was intant (less than 1 sec) which seems odd, however, the integration DXC site has gone from a dummy welcome page to the following:
I tried adding <customErrors mode="Off"/> to the existing system.web section in the existing Web.config, saved it, then rebuilt and replublished, but get same error.
I tried looking in application insights, but strangely, under deployments there is no record of my deployment, and under logs is nothing - no logs.
Under "activity log" and "quick insights" there is nothing for "failed deployemnts" nor "errors"
How can I debug this? The publish from VS did someting (as now I get an error message on the integration website), but there seems to be no record of it, and no errors.
Any help appreciated.