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

route /signin-oidc produces 404 when running production build in iis #74

Open
WalterEbbers opened this issue Sep 12, 2019 · 1 comment

Comments

@WalterEbbers
Copy link

commented Sep 12, 2019

Hi,
i recently build a project that uses the plugin to connect to our identityserver. When using 'au run --watch' and navigating to the app with http://localhost:9000 everything works fine.
But when i create a production build and place it within a IIS folder to test it there, the redirection from identityserver back to the app fails with a HTTP Error 404.0 - Not Found.
I tried the provided samples but the result is the same.
IIS tries to resolve the following url:
http://pcname/prod/client/signin-oidc#id_token=eyJhbGciOiJSUzI1NiIsImtpZCI6IjU2NTg3MTViNzY2NzYyYTA5OWJjZGM1Y2M3YTMzNDM2IiwidHlwIjoiSldUIn0.eyJuYmYiOjE1NjgyOTQyMjksImV4cCI6MTU2ODI5NDUyOSwiaXNzIjoiaHR0cHM6Ly9kZW1vLmlkZW50aXR5c2VydmVyLmlvIiwiYXVkIjoiaW1wbGljaXQiLCJub25jZSI6IjhkNjcwMjg4ZDRkOTQxYTM5NzBmMWYxMTRhMjc0MzFiIiwiaWF0IjoxNTY4Mjk0MjI5LCJzaWQiOiIyYjZkMTI1MmFhODAwM2I1Njg2YWVkNGY0YTY1Y2RkYyIsInN1YiI6IjExIiwiYXV0aF90aW1lIjoxNTY4MjkzNzIzLCJpZHAiOiJsb2NhbCIsIm5hbWUiOiJCb2IgU21pdGgiLCJnaXZlbl9uYW1lIjoiQm9iIiwiZmFtaWx5X25hbWUiOiJTbWl0aCIsImVtYWlsIjoiQm9iU21pdGhAZW1haWwuY29tIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsIndlYnNpdGUiOiJodHRwOi8vYm9iLmNvbSIsImFtciI6WyJwd2QiXX0.iU1X4nh6xovF2pFTwP08atAT1G0JwZXDfmj0O_3U60e38fO4sNnY4zDDZ0SUDp40j9B0QOmDq6cZHudtlLr56TaQg8AxiqkpeT3ah-L6ZcKmmxBryPPUOmCJedHUJBGrdMJivjMUTS2uYSuRxHwiObsTA2oe8uG18v7zg-r5MvUM-Ua7LDQeCll4QkbX6XGU-42x3DoDeNEF5rs7WIoGARqxWimkhJyShtKlHGJYFd6nWzawmJwkOGyhzwd3r3_LJbgrVAzFesrf93EH2wGtN2LzfWTRQfp6L7aO5VYzx_SmQa0zuQpKXxYHVo7XACyJLynpUB-cY0763mxdhJSYqQ&scope=openid%20email%20profile&state=7b34342c7d3849c481448bb09dfa5a9f&session_state=k_k_03A6a3UDZkaIwTpgfHd29xM-8EYSSjyjC4u1p54.b3be8e29db5e46b1320e0140bce22933

In the aurelia-app sample when publishing and opening i got a white page at first, but after i disabled the pushsstate within routerconfig i got to see the sample and tried to login. The above issue occured.

if i have config.options.pushState = true; i'm not being redirected to the login page, but when i comment it(//config.options.pushState = true;) i do get redirected.

The app is being run for example from this location: http://pcn-walter/profilename/product/client/

i tried url rewrite as found in another topic, but that did not help as the problem stayed.
@shaunluttin or anyone else is this a known issue, and if so, is there a solution available?

Kind regards,

Walter

@WalterEbbers

This comment has been minimized.

Copy link
Author

commented Sep 13, 2019

So after someone on gitter suggested to install url rewrite and helped me figure out the appropiate web.config i managed to get the redirection to work.
I really hope some other fix will be made but for now this 'temp' fix will do.
the blogpost that helped me: https://weblog.west-wind.com/posts/2017/Apr/27/IIS-and-ASPNET-Core-Rewrite-Rules-for-Static-Files-and-Html-5-Routing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.