Reputation: 155
I have problems with a huge financial ASP.Net application, written in .Net 4.0 when accessed through IE11.
When customers access it with Windows tablets running Windows 8.1, IE11 as browser (version 11.0.9600.16438), it returnes a script error __doPostback undefined.
If Compatibility mode is forced, everything works fine again though.
I apologize for verbosity but unfortunately it is not so straight.
I added in folder App_browsers a browser file with a regular expression to interpret correctly the user agent string from IE11 (no more MSIE, Trident,....etc). Now the user agent string is correctly parsed.
I compiled on my local machine, I got the only sample we have of this Windows tablet and tried: success, it worked.
I committed, the project is then compiled on another machine and deployed on a third machine.
Sadly the problem was still there. Following post __doPostBack is undefined in IE11 I added by hand the definition of __dopostback and theform as document.forms[myformid]. Redeployed the application, now it gives the error Sys.WebForms.PageRequestManager undefined in a js script as
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(ResizeTexboxKendo);
Strange enough just above a ScriptManager was defined as
<asp:ScriptManager ID="ScriptManager1" runat="server" />
How come now the definition gets stripped off ? I controlled in developer tools it is not there, while if I run my local version there is ? In principle my local machine, compiler machine and deploy machine should be the same: Windows 2003 server (!!), .Net 4.0. I will check the .Net updates, unfortunately the machine is not under my control.
Does the browser version play any role apart from sending another user agent string ?
I will be grateful for any help
regards
Marco
Upvotes: 1
Views: 852
Reputation: 31345
You mentioned you tried adding a .browser
file in the app_browsers
folder. I think the browser file is easy to get wrong. Like you, I created a browser file, but after trying several variations, javascript value="true", etc
. it never worked. Finally using the exact browser file from this blog post fixed my issue.
Upvotes: 1
Reputation: 57085
Your server needs the updated browser definitions file so that it recognizes IE11 as a browser that can run JavaScript. See http://blogs.msdn.com/b/ieinternals/archive/2013/09/21/internet-explorer-11-user-agent-string-ua-string-sniffing-compatibility-with-gecko-webkit.aspx for download links.
Upvotes: 0