anyone care to walk me through the best way to publish a site. I am trying to take it from my local machine and put it onto a staging server to start. Once I get that working I'll need to move it to our productions servers.
I used Visual Studio to publish the site to a folder and moved the folder to the staging server. In my publish settings I did add the proper database string.
I get this error when i try to load the site in a browser
ApplicationInitException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Lawrence,
Most of these questions aren't related directly to Kentico Xperience - instead they are the details of using ASP.NET Core / IIS. Maybe you can check out Microsoft's documentation:
In regards to the CMSCIRepositoryPath, that is only important if you are using the Kentico Xperience Continuous Integration feature.
CMSCIRepositoryPath
just trying to get it to run locally from a published folder and I get this error.
NullReferenceException: Object reference not set to an instance of an object.
CMS.Membership.Internal.VirtualContextAuthenticationConfiguration.get_Audience()
Hi Lawrence,
What database are you using? Is it Azure SQL or SQL server installed on VM or something different? Also, how did you deploy your database?
We'll definitely need more information to assist you.
web.config
appsettings.json
Sorry for the very slow response. I was on vacation last week and didn't get a chance to follow up yet. I am deploying to IIS and it is the .net core application. I am using the publish to folder from visual studio. The database is sql server. For the database, I created a back-up from my local machine and restored a new db on our staging db server. my guess is, the permissions in here are what are messed up but I could be wrong.
what is the best way to publish this? Is there a way to make the appsettings point to my local db as well as the staging db as well as a production db so that we don't have to constantly change the connection string when testing and deploying? Sorry for all the newbie questions. this is our first time deploying something in .net core.
another question, in the app settings there is a CMSCIRepositoryPath line that points to a local folder. Is that important?
I think I am getting closer, no longer getting sql error but instead getting this
NullReferenceException: Object reference not set to an instance of an object. CMS.Membership.Internal.VirtualContextAuthenticationConfiguration.get_Audience()
ha, interesting, looks like I was already getting this message at one point.
So I figured it out. Because I had logged into the admin yet to change the site settings to match the new server.
@lawrence, what site settings did you have to change? The presentation url?
Please, sign in to be able to submit a new answer.