页面未在输入时显示登录窗口

时间:2014-02-11 10:16:22

标签: c# asp.net-mvc twitter-bootstrap firefox

您好我有使用Windows身份验证的网页。 它在

中运作良好
  • IE

并且没有在

工作
  • 火狐

在Firefox和Opera中,当我尝试进入我的页面模态窗口时,会出现询问Windows登录名和密码。当我输入它们时,我可以浏览我的页面。在Chrome和IE中,我不需要做任何事情。 对我来说很奇怪。

控制器:

using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Mvc;
using magazyn.Models;
using magazyn.Autorization;
using System.Text;
namespace magazyn.Controllers
{
    public class HomeController : Controller
    {
        private EquipmentEntities db = new EquipmentEntities();
        [AllowAnonymous]
        public ActionResult Index()
        {
            return View();
        }
        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";
        return View();
    }

    public ActionResult Error401()
    {
        return View();
    }

}
}

正如你可以看到[AllowAnonymous]属性那么为什么Firefox和Opera要求登录和密码才能进入页面?

@Update: 我检查IIS配置。启用了匿名身份验证。

1 个答案:

答案 0 :(得分:0)

好的找到解决方案。 我需要按照以下步骤操作:

  • 打开Firefox
  • 在地址栏中输入about:config
  • 在搜索/过滤字段中输入ntlm
  • 将network.automatic-ntlm-auth.trusted-uris设置为.company_name.com
  • 右键单击并选择“切换”
  • ,将network.automatic-ntlm-auth.allow-non-fqdn设置为true
  • 在搜索/过滤字段中,键入negotiate
  • 将network.negotiate-auth.trusted-uris设置为.company_name.com
  • 右键单击并选择“切换”,将network.negotiate-auth.allow-non-fqdn设置为true
  • 点击确定(如果有)
  • 重启Firefox。

很简单,但现在我需要告诉所有使用FF的用户或告诉他们更改浏览器...奇怪的是他们并没有像其他浏览器一样实现Windows身份验证