错误401和403仅在Internet Explorer中(不在Chrome,Firefox,..) - IIS配置? [英] Error 401 and 403 only in Internet Explorer (not in Chrome, Firefox, ..) - IIS configuration?

查看:568
本文介绍了错误401和403仅在Internet Explorer中(不在Chrome,Firefox,..) - IIS配置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试连接到本地计算机上的IIS上运行的站点。

I am trying to connect to a site that is running on IIS on my local machine.

当我使用匿名身份验证时,它在Chrome和Firefox中运行良好,但在IE中,我得到HTTP错误401.0 - 未经授权。

When I am using Anonymous Authentication, it works fine in Chrome and Firefox, but in IE I get HTTP Error 401.0 - Unauthorized.

错误详情如下:

模块:ManagedPipelineHandler

通知:ExecuteRequestHandler

处理程序:System.Web.Mvc.MvcHandler

错误代码:0x00000000

请求的URL: http:// localhost:80 /

登录方法:匿名

登录用户:匿名

The error details are:
Module: ManagedPipelineHandler
Notification: ExecuteRequestHandler
Handler: System.Web.Mvc.MvcHandler
Error Code: 0x00000000
Requested URL: http://localhost:80/
Logon Method: Anonymous
Logon User: Anonymous

使用Windows身份验证时,它也适用于Chrome和Firefox,但在IE中我得到HTTP错误403.0 - 禁止使用。

When using Windows Authentication, it also works in Chrome and Firefox, but in IE I get HTTP Error 403.0 - Forbidden.

错误详细信息的唯一区别是登录用户(我登录到Intranet网络)和登录方法(Negotiate或NTLM,具体取决于我选择作为Windows身份验证的提供程序 - 根据 Windows身份验证不起作用ie7 401 - 仅在IE7中未经授权使用Windows身份验证。

The only difference in error details is the Logon User (which is my login to intranet network) and Logon Method (which is "Negotiate" or "NTLM", depending on which I choose as provider for Windows authentication - according to windows authentication not working in ie7 and 401 - Unauthorized in IE7 only with windows authentication.)


  • 我可以访问在IE中另一台机器上运行的网站

  • 开不同的机器可以在IE中访问其localhost中的站点

  • 我的计算机上运行的站点可以从Chrome或Firefox中的其他计算机访问,但不能在IE中访问(给出401或403)

  • 我在Windows 7上使用IIS 7.5,IE 11

  • I can access the site running on another machine in IE
  • On different machine the site in its localhost can be accessed in IE
  • The site running on my computer can be accessed from other computers in Chrome or Firefox, but not in IE (gives 401 or 403)
  • I am using IIS 7.5 on Windows 7, IE 11

似乎是公关oblem位于IIS配置中的某个位置,或者可能是IE和IIS之间的某些不兼容。我无法找到计算机上的配置与其他配置之间的区别。

It seems that the problem is somewhere in the IIS configuration or maybe in some incompatibility between IE and IIS. I am not able to locate the difference between the configuration on my computer and the others.

任何帮助表示赞赏。

更新:
它在IE 10和9的兼容模式下运行。
(我正在看IIS配置,以至于尝试兼容模式根本没有让我想到。)不过,我的同事以某种方式使用相同版本没有任何问题。

UPDATE: It works in compatibility mode with IE 10 and 9. (I was looking at IIS configuration so much that trying compatibility mode didn't cross my mind at all.) Still, my colleague was somehow using the same version without any problem.

推荐答案

如果有人对我有用的解决方案感兴趣:

In case there was someone interested in a solution that worked for me:

问题是,直到版本10,Internet Explorer在其用户代理字符串中使用MSIE。我们使用用户代理将其识别为已知浏览器,因此更改此逻辑可修复我的问题。

The problem was that up to version 10, Internet Explorer was using "MSIE" in its user agent string. We were using the user agent to recognize it as a known browser, so changing this logic fixed my issue.

这篇关于错误401和403仅在Internet Explorer中(不在Chrome,Firefox,..) - IIS配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆