Setting up Existing Project Locally - Live Site Error 500

Matthew Stone asked on October 25, 2024 00:22

We just got the project code for this Kentico13 Core Project from this other vendor and I am trying to see if everything is there that we need to take over maintenance of this site. Locally on my windows computer, I set the structure the same way up as it is on the production site, admin.site.io and site.io. The folder structure that both sites are pointing to are going to the same folder with subfolders of CMS and MVC.

I have the database brought over, I have the admin site working. I reassigned macros, did SSLs, cleared cache, checked logs both in kentico and IIS, updated appsettings.json file, updated launchSettings.json, I updated webconfigs to point to the local database. I double checked my windows features per what kentico's system requirments are. I have the correct permissions setup both on the folders and certs as well. I also have the proper licenses in place in Kentico as well as the proper urls in the sites application in kentico. However, the main site (mvc) isnt working. I keep getting an error 500 with nothing in IIS logs/nor in the logs in Kentico.

I am sure I am missing something simple, but any help to let me know what I am missing would be appreciated.

Recent Answers


Laura Frese answered on November 5, 2024 21:57

You have URL Rewrite module installed? What, specifically is the error that appears? - screenshot would help

0 votesVote for this answer Mark as a Correct answer

Matthew Stone answered on November 7, 2024 16:35

Hi Laura,

Thanks for responding. Yes I have the URL rewrite module installed locally. This was the error I was getting. I eventually did get the project to work locally, but had to reconfigure the startup.cs file... However the original startup file that was given to us works as is on the dev server. I have checked and im not sure what is installed on the server that is allowing the startup file to work there but not locally.


Image of error

0 votesVote for this answer Mark as a Correct answer

Laura Frese answered on November 7, 2024 16:46

Ok. can you change your environment variable on your local to Production? In development envt default service provider performs checks to verify that:

  • Scoped services aren't resolved from the root service provider.
  • Scoped services aren't injected into singletons.

This check is not performed on production so it does not throw the error on higher envts. However, this is still a problem that indicates that things were not set up properly. Fixing it on your local will only be an improvement. Because the way its set up now can result in multi threading issues and memory leaks.

This might help with proper refactoring. https://stackoverflow.com/questions/55089755/cannot-resolve-scoped-service

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on November 21, 2024 22:13

Do you have the SDK version of .net framework installed on your local machine this your website is using?

https://dotnet.microsoft.com/en-us/download/dotnet

0 votesVote for this answer Mark as a Correct answer

Matthew Stone answered on November 21, 2024 22:48

Brandon, the yes I checked and the versions are the same for the SDK.

Laura - I was hopeful with your suggestion, I tried this but it didn't make a difference. It does make sense though of why it could not be working locally. For now I will just have to stick with my rewritten version. The client wants to do a redesign next year, so that will be a good time for refactoring.

thanks

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.