Web farm name for live site is incorrect

Sylvain C. asked on March 15, 2023 18:06

Good morning,

My live site on development machine does not have the correct name for the web farm.

My presentation URL in correctlt set up in the admin site and is https://localhost/MyLive, my virtual path on IIS is /MyLive and I can access my site on https://localhost/MyLive. However all my medias (getmedia), links within pages don't maintain the MyLive domain. Moreover, my page tab in the admin site is showing degraded views as the css, js, images are not shown anymore as the links are broken. It looks like the virtual directory is not know by the admin site. A good example is the naming of the web farm which should be MyPC_MyLive_AutoExternalWeb but is MyPC_AutoExternalWeb. I tried to create a new web farm with the correct name but it didn't work.

The only thing I have done before it stops working properly was to install the latest version of VS2022 (17.5.2) and the .Net 7 SDK to work on Blazor. It is probably unrelated but in case it might be useful.

In order to make sure that it wasn't related to my project, I also tried with the DancingGoatCore website: Migrated it to K13 v13.0.99, updated it to .Net6 and rebuilding it in VS17.5.2 and I have the same error as I have on my project: The web farms name for the live site is not based on the virtual application and all the getmedia, links are broken. So it must be related to this new version of VS2022 or to .Net7...

Thank you very much for your help as it is driving me crazy.

Recent Answers


Brenden Kehren answered on March 15, 2023 22:17 (last edited on March 15, 2023 22:20)

The webfarm name doesn't matter or have any impact on what URL is generated. The issue with your set up is you have a virtual application you're using and your URLs are not properly working because of it. You may want to share how you have IIS set up and what your site structure is within IIS. In most cases the main site displays the public facing website and a virtual application is set for the CMS.

So something like so:

  • example.com = MVC site
  • example.com/cms = CMS site (vitrual application)

Using the above, the following settings in your site would be as such:

  • Presentation URL = https://example.com
  • Admin URL = example.com/cms

As Juraj mentioned in your post on StackOverflow, it's not a web farm or Kentico issue, it's an IIS set up issue.

0 votesVote for this answer Mark as a Correct answer

Sylvain C. answered on March 16, 2023 00:41 (last edited on March 16, 2023 01:48)

Thank you Brenden,

This is what I have got already on my project and everything was working fine before I decided to swith from VS 17.3.6 to VS 17.5.2 and installed .Net7.

My concern is that I also tried with the DancingGoatCore website which was working fine and migrated it to .Net6 and compiling it with VS22 17.5.2 and I have the same kind of behaviour (broken links, getmedia issues) with this default website.

It really seems to be related to the installation of the latest VS and .Net7 otherwise I wouldn't have the same behaviour on both my project and the DancingGoatCore website.

When I look at the webfarms for the DancingGoatCore website, the webfarm for the live has been rewritten from MyPC_DancingGoatCore_AutoExternalWeb to MyPC_AutoExternalWeb so it is a good indication that the admin site can not read the virtual application directory as it used to do before this upgrade of VS.

I am not saying that it is a Kentico issue but a hotfix could be needed to make it work in this environnment as .Net 7 would be installed more frequently.

Thank you,

Sylvain

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on March 16, 2023 06:49

The support for .NET 7 (STS) is mentioned in this article. We are still checking this but the interesting thing is that I updated VS yesterday too, changed the target framework for the Dancing Goat Core project and everything works fine for me. IT is still possible the issue is related to our environment setup or project startup routine.

0 votesVote for this answer Mark as a Correct answer

Sylvain C. answered on March 16, 2023 08:10

Thank you very much Juraj for the link, very useful.

Since my site stopped working properly after being built by VS17.5.2 and the fact that the DancingGoatCore had the same behaviour after being rebuilt in the same VS version made me think that this new version of VS which also installed .Net7 was connected to my issues.

Both my project and the DancingGoatCore sites are targeting .Net6 and both of them were working fine until this VS update. I thought that even without being directly targeted by some projects, .Net7 could have caused some breaking changes. I check all my IIS applications, virtual path, presentation URL and they looks good.

Thank you again for your help.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on April 20, 2023 10:38

Hi! I was dealing with something else and I think I got it - I assume you are using .NET6, right? While everything works fine on .NET3.1 even after VS update, with .NET6 it does not - there was something change in the "hosting model" - the default "InProcess" does not work anymore. You need to switch to "OutOfProcess". We are investigating why the "InProcess" is not working after the update...

0 votesVote for this answer Mark as a Correct answer

Sylvain C. answered on April 20, 2023 15:54 (last edited on April 20, 2023 16:18)

Thank you very much Juraj for letting me know and yes, I am using .Net6. I knew there was something weird as the same problem happened whith the DancingGoatCore after installing .Net7 SDK even if the website was only targeting .Net 6. However,it was difficult to track it down. I am glad you were able to find the isssue and working on a fix for the InProcess as it performs better for the benefits of the Kentico community.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on April 21, 2023 05:16

You are welcome! One of our QA engineers noticed this difference when inspecting some other issue that .NET6 and maybe also .NET7 behave differently on different hosting models.

0 votesVote for this answer Mark as a Correct answer

Sylvain C. answered on May 5, 2023 11:55

Hello Juraj,

I just wanted to know if you team has made progress regarding this different behavior on hosting models for .NET7. I was checking the latest hotfix but didn't see any reference to it.

Thank you in advance for your help,

Sylvain

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on May 9, 2023 05:22

Not yet as they are working on other priorities yet and it is not really a Kentico issue. If time allows, we will continue in the investigation.

0 votesVote for this answer Mark as a Correct answer

Sylvain C. answered on November 8, 2023 19:09

Hello Jurag,

I just wanted to check with you if this issue with .Net 7 has been solved regarding this different behavior on hosting models for .NET7. I haven't applied the latest hotfixes (Still on 114) and was hoping that one of them would fix this.

Thank you again for your help,

Sylvain

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on November 9, 2023 05:35

.NET7 is not officially supported. You can see our .NET support strategy here. It seems that we will target the .NET 8 LTS in the upcoming weeks - at our developers best efforts.

0 votesVote for this answer Mark as a Correct answer

Sylvain C. answered on November 9, 2023 21:11

Thank you Juraj for your answer. This is excellent news regarding the .Net 8 LTS.

0 votesVote for this answer Mark as a Correct answer

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