ASP.NET MVC application gives Internal Server Error only when viewed in Firefox

两盒软妹~` 提交于 2019-12-03 10:17:53

G_P pointed me to the solution to my problem. The root cause apparently is that Firefox does not by default work with Windows Integrated Authentication, unless the site is trusted.

To enable Windows Integrated Authentication in Firefox:

  1. Enter about:config in the address bar.
  2. Acknowledge the scary warning message.
  3. In the search bar, enter network.automatic.
  4. Double-click on network.automatic-ntlm-auth.trusted-uris.
  5. Enter the URL of the server, e.g. localhost or mycompany.com.

After that it works fine.

Unfortunately, this would mean instructing everyone in the company who wanted to access the application using Firefox that they would have to make this change (or else the IT department would have to figure out a way to do it). In this particular application, that's not a big deal, because the number of users will be quite small. For a later application, I'll probably have to figure out something else. (Perhaps I should be looking into Windows Identity Foundation? Sounds a bit scary, though.)

In any case, I'm going to call this "good enough for now" and move on with my life. Thanks very much to everyone who helped me!

P.S. Two pages with potentially useful information:

You have a cookie created on the previous Browser you were testing which doesn't exits on firefox. I really doubt if the problem has anything to do with firefox.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!