0

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!

Andrew Barber
  • 39,603
  • 20
  • 94
  • 123
  • Double check that there aren't any JavaScript errors reported, especially after you run `TestIt()`. – Dave Ward Apr 15 '13 at 15:25
  • Thanks for your reply Dave, sure there are no errors! the strange thing that IE10 is the only browser not sending parameter with request! although it does in compatibility view! – Tariq Alardah Apr 15 '13 at 16:05
  • After I noticed that running the application from VS2010 with IE10 make it works well, I tried running the application using IE10 running as admin, and it ready WORKS!!! so what should the problem be!!?? – Tariq Alardah Apr 15 '13 at 16:28
  • Long shot, but is it possible that IE has cached a version of the page/script for the IIS7.5 port that doesn't pass the parameter, but not for the dev server port and not for the admin user's cache? Have you cleared the cache in IE in the situation where it's not working? – Dave Ward Apr 15 '13 at 17:26
  • Still facing same problem reported above!!, any help? – Tariq Alardah Jul 04 '13 at 09:25
  • @TariqAlardah, I'm facing the same problem. Do you have a fix or workaround? See here: http://stackoverflow.com/questions/18758180/ie10-not-passing-parameters-to-a-web-service-method-in-an-ajax-post-request – Yosief Kesete Sep 19 '13 at 13:54

1 Answers1

1

This is a known problem. And has been reported since over a year ago in various forms.

Bug tickets on MS Connect have all been closed. However, there is this one bug ticket on jQuery: http://bugs.jquery.com/ticket/12790 which, is closed obviously but was still active until last month.

As per http://bugs.jquery.com/ticket/12790#comment:26 in that thread, some add-ins have been reported to create problems (apart from other reasons). I had this problem with download manager on my IE10/Win8. Maybe you could check if any DM/DAP add-on installed on your IE is causing problems.

Do a "Developer tools > Network > start capture" comparison between IE-normal and IE-runas-admin. This may help you spot problems.

BTW: Are you able to vote and post on SO using the same setup? If yes, then it may not really be an IE10 issue.

Abhitalks
  • 27,721
  • 5
  • 58
  • 81