Skip to content
This repository has been archived by the owner on Nov 1, 2018. It is now read-only.

Require the MSAspNetCoreToken or send a 400. #148

Merged
merged 1 commit into from
Apr 22, 2016
Merged

Conversation

Tratcher
Copy link
Member

#141 @blowdart

@Eilon @DamianEdwards Please approve for RC2.

@Tratcher Tratcher self-assigned this Apr 21, 2016
@Tratcher Tratcher added this to the 1.0.0-rc2 milestone Apr 21, 2016
@@ -57,7 +57,7 @@ public IISMiddleware(RequestDelegate next, ILoggerFactory loggerFactory, IOption
if (!string.Equals(_pairingToken, httpContext.Request.Headers[MSAspNetCoreToken], StringComparison.Ordinal))
{
_logger.LogTrace($"'{MSAspNetCoreToken}' does not match the expected pairing token '{_pairingToken}', skipping {nameof(IISMiddleware)}.");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, you should consider updating the log level of this message to error (or critical, since it would indicate that the request wasn't handled by IIS, which may be terribad in production).

@Tratcher
Copy link
Member Author

Updated the log level.

@muratg
Copy link
Contributor

muratg commented Apr 22, 2016

@Tratcher did you start an internal thread for RC2 approval?

@blowdart
Copy link
Member

Yes he did

@muratg
Copy link
Contributor

muratg commented Apr 22, 2016

👍 :shipit:

@Tratcher Tratcher merged commit fcdf8dd into dev Apr 22, 2016
@Tratcher Tratcher deleted the tratcher/required branch April 22, 2016 20:25
@jakejscott
Copy link

I'm getting an error

'MS-ASPNETCORE-TOKEN' does not match the expected pairing token '7f91cf1a-9295-4bcc-9e3d-88ae09909389', request rejected.

Any ideas as to what I'm doing wrong? I'm deploying onto a windows service with IIS

@Eilon
Copy link
Member

Eilon commented Aug 15, 2016

@superlogical can you log a new bug on this, including any info you have on which versions of ASP.NET Core and the ASP.NET Core Module you're using?

@Tratcher
Copy link
Member Author

That's very unexpected. This check is used to block requests that bypass IIS and are sent directly to the back-end process. Which port did you configure IIS on, and which port did you send the request to?

What do you mean you're deploying IIS in a windows service? IIS runs as it's own service, not inside your own service. Or are you trying to use IIS Express?

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

Successfully merging this pull request may close these issues.

7 participants