401仅使用多个身份validation方法IE 10

我不知道这是更多的编码问题或服务器安装问题,所以我已经把它张贴在计算器上 ,在这里…

在我们的生产网站上,我们遇到了特定于Internet Explorer 10的问题。

我正在使用jQuery做一个ajax POST到同一个域上的web服务和IE10我得到一个401响应,IE9的工作完全正常。 我应该提到,我们在我们的网站的另一个区域有镜像代码,它在IE10中工作得很好。 这两个领域唯一的区别是一个是在一个子域下,另一个是在一个子域。 www.my1stdomain.comportal.my2nddomain.com

服务器上的这些目录结构是:

\my1stdomain\webservice\name\service.aspx \portal\webservice\name\service.aspx 

\portal\\my1stdomain\文件夹里面,我有一个页面,可以进行ajax调用,两个页面都是相同的。

 $.ajax({ type: 'POST', url: '/webservice/name/service.aspx/function', cache: false, contentType: 'application/json; charset=utf-8', dataType: 'json', data: '{ "json": "data" }', success: function() { }, error: function() { } }); 

我已validation在服务器端的两个文件夹上的权限是相同的。 我已经应用了解决方法,将<meta http-equiv="X-UA-Compatible" value="IE=9">强制为兼容性视图(将IE置于兼容模式可解决问题) 。 这似乎是在Windows 7上的IE10工作,但是在Windows 8上的IE 10仍然看到同样的问题。 这些页面是包含标题的经典asp,也没有其他元标记被使用。 门户页面上的doctype被指定为<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//" "http://www.w3.org/TR/html4/loose.dtd"> ,在主域上的<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

UPDATE1


我在服务器上使用Microsoftnetworking监视器3.4来捕获请求。 我用下面的filter来捕获401:

 Property.HttpStatusCode.StringToNumber == 401 

这是回应

 - Http: Response, HTTP/1.1, Status: Unauthorized, URL: /webservice/name/service.aspx/function Using Multiple Authetication Methods, see frame details ProtocolVersion: HTTP/1.1 StatusCode: 401, Unauthorized Reason: Unauthorized - ContentType: application/json; charset=utf-8 - MediaType: application/json; charset=utf-8 MainType: application/json charset: utf-8 Server: Microsoft-IIS/7.0 jsonerror: true - WWWAuthenticate: Negotiate - Authenticate: Negotiate WhiteSpace: AuthenticateData: Negotiate - WWWAuthenticate: NTLM - Authenticate: NTLM WhiteSpace: AuthenticateData: NTLM XPoweredBy: ASP.NET Date: Mon, 04 Mar 2013 21:13:39 GMT ContentLength: 105 HeaderEnd: CRLF - payload: HttpContentType = application/json; charset=utf-8 HTTPPayloadLine: {"Message":"Authentication failed.","StackTrace":null,"ExceptionType":"System.InvalidOperationException"} 

这里真正突出的东西是

未经授权的URL:/webservice/name/service.aspx/function使用多种身份validation方法

有了这个我仍然困惑,为什么这只发生在IE10,如果它是一个权限/身份validation问题。 什么是加到10,或者我应该在哪里寻找这个根本原因?

UPDATE2


这里是从提琴手的客户端机器(服务器信息删除)的标题:

主要

 SESSION STATE: Done. Request Entity Size: 64 bytes. Response Entity Size: 9 bytes. == FLAGS ================== BitFlags: [ServerPipeReused] 0x10 X-EGRESSPORT: 44537 X-RESPONSEBODYTRANSFERLENGTH: 9 X-CLIENTPORT: 44770 UI-COLOR: Green X-CLIENTIP: 127.0.0.1 UI-OLDCOLOR: WindowText UI-BOLD: user-marked X-SERVERSOCKET: REUSE ServerPipe#46 X-HOSTIP: ***.***.***.*** X-PROCESSINFO: iexplore:2644 == TIMING INFO ============ ClientConnected: 14:43:08.488 ClientBeginRequest: 14:43:08.488 GotRequestHeaders: 14:43:08.488 ClientDoneRequest: 14:43:08.488 Determine Gateway: 0ms DNS Lookup: 0ms TCP/IP Connect: 0ms HTTPS Handshake: 0ms ServerConnected: 14:40:28.943 FiddlerBeginRequest: 14:43:08.488 ServerGotRequest: 14:43:08.488 ServerBeginResponse: 14:43:08.592 GotResponseHeaders: 14:43:08.592 ServerDoneResponse: 14:43:08.592 ClientBeginResponse: 14:43:08.592 ClientDoneResponse: 14:43:08.592 Overall Elapsed: 0:00:00.104 The response was buffered before delivery to the client. == WININET CACHE INFO ============ This URL is not present in the WinINET cache. [Code: 2] 

门户

 SESSION STATE: Done. Request Entity Size: 64 bytes. Response Entity Size: 105 bytes. == FLAGS ================== BitFlags: [ClientPipeReused, ServerPipeReused] 0x18 X-EGRESSPORT: 44444 X-RESPONSEBODYTRANSFERLENGTH: 105 X-CLIENTPORT: 44439 X-CLIENTIP: 127.0.0.1 X-SERVERSOCKET: REUSE ServerPipe#7 X-HOSTIP: ***.***.***.*** X-PROCESSINFO: iexplore:7132 == TIMING INFO ============ ClientConnected: 14:37:59.651 ClientBeginRequest: 14:38:01.397 GotRequestHeaders: 14:38:01.397 ClientDoneRequest: 14:38:01.397 Determine Gateway: 0ms DNS Lookup: 0ms TCP/IP Connect: 0ms HTTPS Handshake: 0ms ServerConnected: 14:37:57.880 FiddlerBeginRequest: 14:38:01.397 ServerGotRequest: 14:38:01.397 ServerBeginResponse: 14:38:01.464 GotResponseHeaders: 14:38:01.464 ServerDoneResponse: 14:38:01.464 ClientBeginResponse: 14:38:01.464 ClientDoneResponse: 14:38:01.464 Overall Elapsed: 0:00:00.067 The response was buffered before delivery to the client. == WININET CACHE INFO ============ This URL is not present in the WinINET cache. [Code: 2] 

您可能要testing这里描述的客户端registry设置:

将预authentication头与Internet Explorer和Internet信息服务一起使用时,将返回意外的401.1状态
http://support.microsoft.com/kb/2749007

客户testing:

 Key: HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Internet Settings/ Value: DisableNTLMPreAuth Data Type: REG_DWORD Value: 1 

服务器修复:

要在IIS中修改此行为,请禁用IIS Web应用程序的内核模式身份validation。

  • 打开Internet信息服务(IIS)pipe理器
  • 在“连接”窗格中,展开服务器名称,展开网站,然后展开要禁用其内核模式身份validation的网站,应用程序或Web服务。
  • 滚动到“主页”窗格中的“安全”部分,然后双击“身份validation”。
  • 在身份validation窗格中,selectWindows身份validation。
  • 在“操作”窗格中单击高级设置。
  • 出现“高级设置”对话框时,取消选中“启用内核模式validation”checkbox
  • 单击确定closures高级设置对话框。

重要提示:禁用内核模式身份validation可能会导致需要Kerberos身份validation和委派的Web应用程序失败。