Old (OLD!) legacy ASP web application. Recent upgrade of the server from Windows 2003 Server to Windows Server 2012 and IIS 8.
One particular page which uses MPC (multipage control?), tabbed control, displays all messed up in IE11.
I have tried these options:
F12 Developer toolbar, set Document Mode to 5.
Local environment result: Worked beautifully.
Client environment result: Nope. Still messed up.
I added meta http-equiv="X-UA-Compatible" content="IE=5"> to the page
Local environment result: Worked beautifully.
Client environment result: Nope. Still messed up.
Reset. I went into IIS, HTTP Response Headers and added X-UA-Compatible/IE=5.
Local environment result: Worked beautifully.
Client environment result: Nope. Still messed up.
Checked IE versions... I am on IE11, Update Version: 11.0.33. Client is on 11.0.32. But all of these steps worked on IE10 in our environment as well.
I also saw a thread about group policies and compatibility view settings. Is there something in a group policy on that client's environment that might be overriding anything else I have tried to do?
Can group policy even override F12 mode? (just searching for any possible explanation as to the differences in otherwise identical environments)
So I'm a developer/admin for a medium size .net site, and I've run across a weird inconsistency. For reference, I'm running two instances of my site on the same server (IIS 8.5, .net 4.5); the live website and a sandbox instance of the codebase so I can test all development changes before I push them live. The config files differ only in that the sandbox site uses alternate connection strings and has it's debug flag set to true, and the sites each run on their own (identically set up) application pools.
I noticed recently that anywhere I use an asp:Image, the live site renders 'style="border-style:0px;"' onto the image tag. Interestingly, however, the sandbox instance does NOT render the style attribute.
Any idea what could be causing this discrepancy? I know that a simple solution would be to just not use asp:Images where it's a problem, but if I can I'd like to fix the underlying issue since the whole point of the sandbox is to reliably test changes on the actual server before I push them to the public site.
I got back to this issue after a few days of more pressing matters.
Turns out I missed a line in my web.config. On the sandbox site, the controlRenderingCompatibilityVersion attribute of the system.web <pages> element had been updated some time ago from 3.5 to 4.0. Apparently the live site config file never got updated, and Microsoft changed the border rendering behavior between those two versions. Updated the live site and the issue resolved itself.
i have deployed my application from IIS 6.0 to IIS 7.5. the website links does not work in IE 10 from Prod but from uat the website is accessible. both the server are same.
Does anyone know why this is happening in only one server and not the other. Do i need to change some setting in IIS or config file. I am getting the error of
SCRIPT5007: The value of the property '__doPostBack' is null or undefined, not a Function object
Can anyone please help i am facing this issue on production.
"There is a bug in the browser definition files that shipped with .NET 2.0 and .NET 4, namely that they contain definitions for a certain range of browser versions. But the versions for some browsers (like IE 10) aren't within those ranges any more. Therefore, ASP.NET sees them as unknown browsers and defaults to a down-level definition, which has certain inconveniences, like that it does not support features like JavaScript."
http://www.hanselman.com/blog/BugAndFixASPNETFailsToDetectIE10CausingDoPostBackIsUndefinedJavaScriptErrorOrMaintainFF5ScrollbarPosition.aspx
Maybe that could be it?
Thought I'd share for posterity since every page on the internet links to the browser files issue.
This can also be caused in some cases by a change in the .Net Framework 4+ where encoding the __doPostBack encodes a single quote (it did not do this in 3.5).
I was able to fix a LinkButton with that error by manually putting the __doPostBack into the OnClientClick, overriding the href and not encoding a single quote. Granted, maybe not clean, but it worked for me.
http://www.blakepell.com/asp-net-4-5-1-linkbutton-the-value-of-the-property-__dopostback-is-null-or-undefined-not-a-function-object
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 discovering the joys of web design and ASP.NET, and the nightmare of trying to get things to display in the same way in IE and all the other browsers.
I am working in VS2010 and debugging my website using IE8. What I really don't get is why the website once I publish it looks different in IE from the way it looks in debug mode... I mean small things only, like border in gridviews disappearing in the published site, simple html horizontal rules aren't the same either.
It also messed up my list menu pretty bad, but I managed to fix that with the *display: inline; hack. The weird thing is that it doesn't need it in debug mode, but needs it for the published website.
I am hosting the site on my own machine, running Win XP Pro and hosting through IIS with .NET 4.0... Could the issue be IIS related?
Any help would be much appreciated, because those differences are just ridiculous and are driving me to desperation. I wish everyone over here would use Chrome or Safari, but unfortunately IE still rules in Japan...
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
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.
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.
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.
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
I have this problem where the web application that I have created in my development environment, displays differently after I upload it to the web server.
I am using the same browser and the same machine to view the pages. The only thing different, is the "server". I am using .net 3.5 and on my development environment the pages are served using the ASP.net Development Server. On the web server, the pages are served using IIS 6.0.
I have only a single CSS file that is contained within the "App_Themes/Default" folder that is used to control all the CSS in my application.
Here are some of the things that don't display the same:
1) I have a collapsible panel control that when expanded is supposed to show on top of all the other page elements. On the dev environment, it behaves correctly. On the web server, the panel slides underneath the other elements.
2) I have my element defined with a background and a certain font size. When displayed on my development environment, the text displays on one line. However, on the web server, the text is wrapped even though the text is the same size. It's as if the containing div is somehow rendered "smaller".
3) The width of buttons that do not have a fixed width (so the width is determined by the button text) is different between the development environment and the web server. The bottons on the server are always wider.
I checked to make sure there are no references to other CSS elements in the machine.config and global web.config on the server and on my development environment.
I know the server is reading from the CSS because in general, it looks similar (same colors, backgrounds, font style, etc). It's just that the sizes seems to be off and the layering of the divs.
Has anyone run in to this problem before? Any ideas of what I could look for?
Looks like you are comparing them in Internet Explorer 8. Microsoft introduced different rendering modes for local and Internet servers so that web developers would break down in tears.
If there’s no X-UA-Compatible value and site is in
Local Intranet security zone, it will be rendered
in EmulateIE7 mode by default.
Add X-UA-Compatible header or META to force full IE8 standards mode.
See also http://sharovatov.wordpress.com/2009/05/18/ie8-rendering-modes-theory-and-practice/
We were having an issue with compatibility modes too, so I ended up just adding:
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
Since I knew it worked fine in IE7, 8, and 9.
I had the same problem in Google Chrome. Apparently media queries get messed up if the page is zoomed in or out. Make sure your zoom level is 100% for both sites.
This at least sounds like that the production server added a xml declaration to the HTML or changed the doctype which caused the page being rendered in non-standards-compliant mode. This is also known as quirks mode, you see this very good back in MSIE. The symptoms which you described are recognizeable as box model bug in MSIE.
Rightclick the pages and check the HTML source. Are they both exactly the same? (including meta tags, xml declaration, whitespace, etc)
If you're FTP'ing from Windows to Linux, please ensure that you're transferring in binary mode to ensure that the whitespace (spaces, linebreaks) remain unchanged. Also ensure that you're saving documents as UTF-8 (or at least ISO-8859-1) and NOT as MS-proprietary encoding such as CP1252.
For those of you that are having this problem in an Intranet site setting the meta tag won't fix the problem if "Display intranet sites in Compatibility View" is checked on (which it is in a lot of cases)
You have to send the HTTP response header at the server level, see here
The CSS that is coming from the server may be a older cached version - try refreshing the page using Ctrl+F5 so it get re-requested.
For me, Internet Explorer's Compatibility View Settings was the issue:
After the check-boxes were un-set, the CSS renders perfectly
We had the same issue, fixed on IE9 & IE11 with this:
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
</head>
Juste add this to your web.config file :
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="X-UA-Compatible" value="IE=8" />
</customHeaders>
</httpProtocol>
</system.webServer>
I had the same issue. Our network uses Win7 with IE11 throughout. For me the solution was to, on my local machine adding "localhost" to the list in IE's compatibility settings > "Websites you've added to compatibility View". IE > Tools > Compatibilty View settings.
BTW our NA has every machine setting IE11 to "Display intranet sites in Compatibility View" automatically checked by a group policy.
This often happens to me when the 'server' version is cached somehow. Refreshing did the trick. Throwing away 'temporary internet files' does it, too.
I just had this problem. I'd changed my style sheet and HTML code. It looked great on locally but didn't work on the server. I found that in Visual Studio the CSS file's "Copy to Output Directory" was set to "Do not copy". So my CSS updates were not getting deployed. Sometimes the problem is just user error.
Can be caused by minification, e.g. on dev machine you have
<span>AAA</span>
<span>BBB</span>
but on remote server it becomes
<span>AAA</span><span>BBB</span>
and a space between them gets lost.
try this,.
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />