TrilonIO / aspnetcore-Vue-starter

*NEW* Asp.net Core & Vue.js (ES6) SPA Starter kit - Vuex, webpack, Web API, Docker, and more! By @TrilonIO
https://www.trilon.io
MIT License
1.22k stars 266 forks source link

Blank Page in IIS #140

Closed sksallaj82 closed 4 years ago

sksallaj82 commented 4 years ago

I have the project working on kestrel, and through IIS Express. It used to work on IIS back when I was running in asp core 2.1. However, when I upgraded everything to 2.2 including what's on the environments, I get blank pages.

The only way to circumvent this is by running self-hosting the app using kestrel and using IIS as a proxy. That's when I discovered this: https://weblog.west-wind.com/posts/2019/Mar/16/ASPNET-Core-Hosting-on-IIS-with-ASPNET-Core-22

So this basically told me the reason why it was working before, was because it was running kestrel out of the box, and was bouncing the requests back and forth using an "Out of process" mode. I'm thinking after I upgraded to 2.2, tons of things changed, with the introduction to "in process". I think this blank page problem is happening due to this being an "in process" and that I'm testing IIS running this project straight out. I've tried this on 3 different AWS machines, and they all give me the same problem. I've been fighting tooth and nail trying to get this to work for the last two days, and I've been coming up with nothing.

When I look at what's being passed across the network, everything is loaded. I compared it from the IIS environment and from IISExpress and Kestrel, and they all look exactly the same. But none of the components are rendering in IIS.

Here's what my sources look like:

image

Nordes commented 4 years ago

For info, the SourceMap should not be present in production (publish in release mode). Is your IIS usage supposed to be for development or for production usage?

In dev, if you have this issue, it will require some investigation.

sksallaj82 commented 4 years ago

In IIS it doesn't matter if I use dev or prod, if I publish either mode that SourceMap warning always shows. This is because I have certain google extensions and I suspect those are the reason those warnings show up. But I doubt this has any relevance to the immediate problem.

This is on my dev and test server, not prod. I can tell that it's prod or dev because of what is passed across the network, prod is more compact and bundled than dev. Prod files are minified and the dev files are not.

Is there anything you'd like me to show to aid in the investigation? I've been trying everything I can. It's stumping myself as well as my colleagues. We have a feature that we finished that we need to be deployed, but this is causing us some serious delays here.

I even took the starter template as is, and deployed to IIS and the same thing kept happening. Blank page with some libraries /Vue components that get loaded by never rendered.

It never mentioned that main.js or vendor.js/css is missing either, the site loads and passes them in just fine. So I'm kinda at a loss right now.

sksallaj82 commented 4 years ago

Yup, it was the chrome extensions. If I run this on incognito mode, I get no warnings or errors:

But as you can see, blank page and everything in the network shows up.

image

sksallaj82 commented 4 years ago

I really really think the only solution I have is to run this in kestrel and use IIS as a reverse proxy, which I think will lead to slower performance rather than use straight up IIS, but I see no other alternative at this point as IIS just doesn't seem to work in conjunction with this project.

sksallaj82 commented 4 years ago

I found the issue! It has nothing to do with kestrel or IIS in any way!

So there was development on the page where it will hide all vue components based on whether or not it received a token. This flag is set in the vue component, I never even bothered to check there. The environmental differences were just red herrings that led to a major distraction since they responded differently to how I get those tokens.