简体   繁体   中英

ASP.Net MVC app not working in chrome although it does in Edge and Internet explorer

my question is about asp.net mvc, it used to display the UI correctly in google chrome up until yesterday, because today it is broken.

It displays everything correctly in internet explorer or edge, but it shows code in chrome which is not present in visual studio itself from which I run my project. (the code that is displayed in chrome debugger I used to have in my project but I deleted it in visual studio, though it still appears in chrome producing a wrong result).

I had my project uploaded to github (that version of my project was working fine in chrome) so I tried pulling it but git told me "my project is already up to date" so it did not fix it.

I attached some pictures which can help identify the problem.

css file present in Visual studio

css file shown in chrome debugger

thanks for your help in advance

Your css present in Visual Studio is called Site.css

Your css in chrome debugger is site.css

Considering those files are case-sensitive, that could be one reason for those files to not work, except in IE locally on Windows, where the files are not case sensitive.

Check if your css file has been renamed recently, from s/S[ite.css] to S/s[ite.css] .

When reference your file, use @Url.Content("~/style/example.css") to make sure that you referencing the correct file maybe same file on wrong path.

Also: Try to click ctrl + F5 on chrome to force refresh the browser.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM