简体   繁体   English

ASP.Net网站无法在客户端上正确呈现

[英]ASP.Net website not rendering correctly on client

I have deployed a ASP.net website and for whatever reason the website is rendering like it should on the web server, but when i access it from a client some of the formatting is lost, so for instance the menu items disappear from the menu, i am at a loss as to where to begin as the website is functional, it just isn't rendering how it should, i suspect that it might have something to do with CSS, but really not sure. 我已经部署了一个ASP.net网站,并且无论出于何种原因,该网站都会像在Web服务器上那样呈现,但是当我从客户端访问它时,某些格式丢失了,例如,菜单项从菜单中消失了,我对网站的功能从何开始感到迷茫,它只是没有呈现它应该如何呈现,我怀疑它可能与CSS有关,但真的不确定。

I have tried to make remove some reference to bundles and called the style sheets directly using link with no difference. 我试图删除一些对包的引用,并直接使用链接来调用样式表,没有区别。

I have checked i am able to access the site.css from a client too. 我已经检查过我也可以从客户端访问site.css。

Having looked a bit further into it, IE is returning the following two errors: 进一步研究之后,IE返回以下两个错误:

SCRIPT5007 : Unable to get property 'createElement' of undefined or null reference jquery-3.3.1.min.js (2,6997) SCRIPT5007 :无法获取未定义或空引用jquery-3.3.1.min.js的属性'createElement'(2,6997)

SCRIPT5022 : Bootstrap's JavaScript requires jQuery bootstrap.min.js (6,31) SCRIPT5022 :Bootstrap的JavaScript需要jQuery bootstrap.min.js(6,31)

Have you checked the mime type registered on iis? 您是否检查了在IIS上注册的MIME类型? It could be possible that the response for the css request could have a different mime type than what the browser expected and thus did not parse it/apply the style rules. css请求的响应可能具有与浏览器预期不同的mime类型,因此无法解析/应用样式规则。 To check/fix this, open server manager -> browse to your site. 要检查/解决此问题,请打开服务器管理器->浏览到您的站点。 In the IIS settings panel would be Mime types, ensure that text/css is the MIME Type for the .css extension, also in your link tag try including type="text/css" as well. 在IIS设置面板中将是Mime类型,请确保text / css是.css扩展名的MIME类型,也请在您的链接标记中尝试也包括type="text/css"

谢谢大家,设法弄清楚了,问题是有一个GPO设置被选中,以兼容模式显示Intranet网站,我未选中它,它开始按预期工作,希望对其他人有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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