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

IIS + UseForwardedHeaders + System.Web.HttpContext.Current.Request.Url #80

Closed
nunomiguelsilvagoncalves opened this issue Jun 29, 2022 · 3 comments · Fixed by #92
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@nunomiguelsilvagoncalves

I created a brand new MVC .Net Framework App.

Then i used the Microsoft Project Migration Extension to create a new .Net Core App.

Changed the .Net Framework App to add

protected void Application_Start()
{
...
this.Application.AddSystemWebAdapters()
.AddProxySupport(options =>
{
options.UseForwardedHeaders = true;
});
}

I run the app in IISExpress and when i check the System.Web.HttpContext.Current.Request.Url value in the .Net Framework i have the .Net core url.

Then i change the hosting of the apps to run in IIS. I create 2 Application with 2 different Pools

Now when i check the System.Web.HttpContext.Current.Request.Url i have the .Net Framework url.

Am i missing something?

Thx

@adityamandaleeka adityamandaleeka added the bug Something isn't working label Jul 6, 2022
@twsouthwick
Copy link
Member

twsouthwick commented Jul 7, 2022

@nunomiguelsilvagoncalves I was able to reproduce it this way:

  1. Set up SiteCore to be on port 80
  2. Set up SiteFramework to be on port 5005 (not important)
  3. Deploy sites to both of these and set up configuration
  4. Accessing framework site via proxy shows it's on 5005.

Is this the set up you're seeing? This is a definitely a bug, but want to verify that it is the right issue you're seeing.

So, specific questions: what are the urls of the core and framework apps for you? What are you seeing when proxied?

@nunomiguelsilvagoncalves
Copy link
Author

@twsouthwick
Copy link
Member

Great! Once this is merged in, should be fixed, then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants