Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET Core renderer Sitefinity URL redirects to App Service domain in v1.0.4 #2

Open
timeverts opened this issue May 2, 2023 · 4 comments

Comments

@timeverts
Copy link

I have deployed a Sitefinity 14 installation to Azure as an App Service to do some testing of Sitefinity features prior to a commencing a client project. I have configured the App Service as per this documentation. This included installing version 1.0.4 of the App Gateway Host Rewrite Module (as an App Service extension).

I've then set up the .NET Core Renderer on my local machine and have specified the URL of the app service as the Sitefinity URL in appsettings.json, similar to the below:

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "AllowedHosts": "*",
  "Sitefinity": {
    "Url": "https://mysitefinityapp.azurewebsites.net",
    "WebServicePath": "api/default"
  }
}

When I run the .NET core renderer application I can browse the front end of the Sitefinity instance just fine at https://localhost:5001. However, when I enter https://localhost:5001/Sitefinity, the .NET core renderer is then redirected to https://mysitefinityapp.azurewebsites.net/Sitefinity and all Sitefinity interaction from that point on continues on the app service URL rather than the .NET core renderer URL.

I battled with this for some time and then decided to try downgrading the App Gateway Host Rewrite Module to version 1.0.3. To my surprise, with version 1.0.3 in place, https://localhost:5001/Sitefinity no longer redirected to the app service domain and I was able to use my .NET core renderer URL to interact with Sitefinity from that point on.

So I am wondering, is there a bug with v1.0.4 of the rewrite module that is causing the redirection to take place? Or is there some other configuration I have missed in my App Service or .NET Core Renderer setup?

@Gebov
Copy link

Gebov commented May 2, 2023

Hello @timeverts. One thing that is a prerequiesite here when running this module is that the app service is set to running x64 bit process. Could that be the problem with your app service ?

@timeverts
Copy link
Author

timeverts commented May 3, 2023

Hi @Gebov. Definately running as 64 bit platform.

image

Interestingly, I tested my .NET Core renderer proxying to https://quantum-sandbox.azurewebsites.net (the Sitefinity demo site from the ASP.NET MVC samples). That worked correctly and Sitefinity requests were served from https://localhost:5001/Sitefinity without redirecting. So I'd be curious to know whether version 1.0.4 of the Host Rewrite Module is being used for that site or not.

@tslazarov
Copy link
Collaborator

tslazarov commented May 3, 2023

Hi @timeverts. Functionality wise, there is no difference between version 1.0.3 and version 1.0.4. The version was bumped due to a package name change. Since the integration worked on your end, when you downgraded to 1.0.3, can you test again with version 1.0.4, as perhaps there has been other changes together with the downgrade part which affected the integration in a positive way.

@timeverts
Copy link
Author

Hi @tslazarov.

I've installed version 1.0.4 again on the app service. Now everything seems to be working as it should.

The only significant change I've done since the last test is to install the Progress.Sitefinity.WebSecurity library/module into the CMS application. Perhaps the absence of that library causes the redirection. I'll do some more testing and let you know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants