The following scenario works fine with all common browsers except IE10 without compatibility view!
I am using ASP.NET PageMethods in my application as follows:
[System.Web.Services.WebMethod]
public static string TestItWM(string param1)
{
return "This is : " + param1;
}
And the related JavaScript is:
function TestIt() {
var param1 = $("#testWebMethod").val();
PageMethods.TestItWM(param1, OnSucceeded, OnFailed);
}
function OnSucceeded(result, userContext, methodName) {
alert(result);
}
function OnFailed(error, userContext, methodName) {
alert("error:" + error._message);
}
The above sample works well on Chrome26, FireFox16, IE10-CompatibilityView, but not working with IE10!. Using Fiddler2 I can see in all browsers, the request has the parameter sent, except IE10, nothing sent to web method!
Note: the app is hosted locally in my machine's IIS7.5/Windows7 with sample URL:
http://localhost/MyApp1/Test.aspx
Your help is appreciated!
It seems it is a bug in IE10 or .NET identification of IE10 on Windows 7:
As said before, running IE10 as admin solves the problem.
And to solve it for clients I had to add the following meta:
<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7" />
To force IE works as 9 max!