问题描述
我们的 QA 团队报告说,我们的一个应用程序无法在 Windows 7 的 Safari 中运行.在检查问题后,我们发现任何回发事件都无法运行.经过一些尝试,我们发现 Page.IsPostback() 报告错误,并认为这是第一次加载页面,并且回发不包括 ViewState.
Our QA team reported that one of our applications is not working in Safari in Windows 7. After checking the problem we figured out that any postback event is not working. After some tries we found that Page.IsPostback() reports false and thinks it’s a first-time load of the page and postback did not include ViewState.
我们尝试了许多解决方案,包括
Windows 7 上 Safari 中 ViewState 的 ASP.Net 回发问题
使用 Safari 时视图状态无效
ASP.NET 2.0 中的 ViewState 分块 (maxPageStateFieldLength)
We tried many solutions including
ASP.Net postback problem with ViewState in Safari on Windows 7
Viewstate invalid when using Safari
ViewState Chunking in ASP.NET 2.0 (maxPageStateFieldLength)
但都没有让 Safari 正常工作.
but all didn't bring Safari to work.
这个应用程序没有什么特别之处.普通页面使用一个非常普通的母版页.
There is nothing special about this application. It is normal pages that use one master page that is a very normal master page.
有什么建议吗?
推荐答案
如果启用了协商提供程序,则 Safari 在 IIS 下使用 Windows 身份验证时会出现问题,因此 AJAX POST 无法正常工作.
Safari has an issue when working with Windows Authentication under IIS if Negotiate provider is enabled so AJAX POST is not working.
如何解决?
在 IIS 中,转到您网站的身份验证设置.右键单击 Windows 身份验证,选择提供程序并删除协商,留下 NTLM,这样一切正常.
How to resolve?
In IIS, go to the Authentication settings of your website. Right click on Windows Authentication, choose providers and remove Negotiate, leaving NTLM this makes everything works fine.
[参考文献]
AJAX POST 请求仅在 Safari 5 中有效一次
Negotiate Mechanism 维基百科的文章显示它没有在 Safari 中实现
[References]
AJAX POST Request Only Works Once in Safari 5
Negotiate Mechanism article in Wikipedia shows that it is not implemented in Safari
这篇关于回发在 Windows 7 的 Safari 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!