ASP.NET website looks different when deployed

后端 未结 5 1198
野性不改
野性不改 2021-02-19 18:10

I have googled around for the answer to this question, but haven\'t come up with anything. Maybe the search terms I used were too generic... Anyway, here goes:

I am disc

相关标签:
5条回答
  • 2021-02-19 18:19

    I've seen similar behavior related to trusted sites/intranet sites/internet sites security settings. When you run in debug mode is the URL you are using different from when you publish it? I've seen sometimes when I debug using a URL like http://localhost/xxx and when I access the same site straight from IIS using a URL like http://machinename.domain.com/xxx that one resolves to a trusted site or local intranet and the other to internet and it changes the appearance based on the IE settings.

    0 讨论(0)
  • 2021-02-19 18:21

    I find it better to override compatibility in the HTTP Reponse Headers in IIS, adding header:

    X-UA-Compatible: IE=Edge
    

    The IE=Edge part will set compatibility to use the highest mode available, will apply to all users, and also apply to all pages in the site whilst only having to put the header in one place.

    0 讨论(0)
  • 2021-02-19 18:25

    I think you did not have given the correct path in the <script src="path">. Please check your path and also check the related file u must place this file in the project folder

    I hope this suggestion solve your problem

    0 讨论(0)
  • 2021-02-19 18:29

    This works for me, overrides the setting in ie

    META Tag in HEAD element of your web page (or better in master page)

    <meta http-equiv=“X-UA-Compatible” content=“IE=8” />
    

    link here to info http://blogs.msdn.com/b/askie/archive/2009/03/23/understanding-compatibility-modes-in-internet-explorer-8.aspx

    0 讨论(0)
  • 2021-02-19 18:42

    For those using ASP.NET MVC, you can add kgp4death's

    <meta http-equiv=“X-UA-Compatible” content=“IE=8” />

    to the head element in your _Layout.cshtml.

    0 讨论(0)
提交回复
热议问题