Question

We have an ASP.NET application that works without any problem in previous version of Internet Explorer 10.

But the same application does not work in Internet Explorer 10.

When I investigated the issue, I found out the references of .asmx web services gets 401-unauthorized error.

The only difference between an problematic request of IE10 and working request of IE9 is : User-Agent string.

Let me show you the difference:

Below request is the problematic request of IE10.


GET http://abc.com/Services/ResourceService.asmx/jsdebug HTTP/1.1
Accept: application/javascript, */*;q=0.8
Referer: http://abc.com/def/ghi.aspx
Accept-Language: tr-TR
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)
Connection: Keep-Alive
DNT: 1
Host: sgmiis2:8090
Cookie: .ASPXANONYMOUS=XXXASP.NET_SessionId=YYY;ASPXAUTH=ZZZ;

It is getting

401 - Unauthorized: Access is denied due to invalid credentials.


Here is the same application's request via before IE10 .

GET http://abc.com/Services/ResourceService.asmx/jsdebug HTTP/1.1
Accept: application/javascript, */*;q=0.8
Referer: http://abc.com/def/ghi.aspx
Accept-Language: tr-TR
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/6.0;)
Connection: Keep-Alive
DNT: 1
Host: sgmiis2:8090
Cookie: .ASPXANONYMOUS=XXXASP.NET_SessionId=YYY;ASPXAUTH=ZZZ;

But this request is working and getting

HTTP/1.1 200 OK


As you can see the only difference is "MSIE 10.0" and "MSIE 7.0/MSIE 8.0/MSIE 9.0" sections of user-agent header.

I am creating the request via Fiddler's Composer section. So there is no risk of really getting 401 error. (with faulty cookies I mean) Because when I changed the user-agent string only, I can successfully get the response of HTTP 200.

Any idea how can I figure out the issue?

Thanks,

Fatih.

Was it helpful?

Solution

There are so many issues with ie 10.

A hotfix is available for the ASP.NET browser definition files in the Microsoft .NET

please refer http://support.microsoft.com/kb/2600088 for .NET 4.0 Refer http://support.microsoft.com/kb/2608565 for .Net 3.5

Please also check this :-http://connect.microsoft.com/VisualStudio/feedback/details/662275/asp-net-user-agent-sniffing-and-ie10-internet-explorer-10

I hope it will help you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top